Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1605919

Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent spurious warnings

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent spurious warnings
Date 2017-03-21 20:00 +0100
Message-ID <tnxaG-7fa-13@gated-at.bofh.it> (permalink)
References <tnuZb-5Ru-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2017-03-21 at 09:30 -0700, John 'Warthog9' Hawley (VMware) wrote:
> Spamassassin sticks a long (~79 character) long string after a
> line that has a single space in it. The line with space causes
> checkpatch to erroniously think that it's in the content body, as
> opposed to headers and thus flag a mail header as an unwrapped long
> comment line.

If the spammassassin header is like

email-header-n: foo
email-header-m: bar
 
X-Spam-Report: bar

Does that form follow rfc 5322?

If it does then any email header could have that
form and the header wrapping test should be
updated from

		if ($in_header_lines && $realfile =~ /^$/ &&
		    !($rawline =~ /^\s+\S/ ||
		      $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) {
			$in_header_lines = 0;
			$in_commit_log = 1;
			$has_commit_log = 1;
		}

to something like

		if ($in_header_lines && $realfile =~ /^$/ &&
		    !($rawline =~ /^ (?:\s*\S|$)/ ||
		      $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) {

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent spurious warnings "John 'Warthog9' Hawley (VMware)" <warthog9@eaglescrag.net> - 2017-03-21 17:40 +0100
  Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent  spurious warnings Joe Perches <joe@perches.com> - 2017-03-21 20:00 +0100
    Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent  spurious warnings Darren Hart <dvhart@infradead.org> - 2017-03-22 16:30 +0100
      Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent  spurious warnings Joe Perches <joe@perches.com> - 2017-03-22 19:20 +0100
        Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent  spurious warnings Darren Hart <dvhart@infradead.org> - 2017-03-23 08:50 +0100
          Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent  spurious warnings Joe Perches <joe@perches.com> - 2017-03-23 09:40 +0100
    Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent  spurious warnings John 'Warthog9' Hawley <warthog9@eaglescrag.net> - 2017-03-24 21:20 +0100
      Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent  spurious warnings John 'Warthog9' Hawley <warthog9@eaglescrag.net> - 2017-03-24 21:20 +0100

csiph-web