Discussion:
mutt destroying formatting of spamassassin headers
(too old to reply)
Marc Haber
2017-07-24 11:41:50 UTC
Permalink
Hi,

mutt destroys the formatting of spamassassin's report inserted into
the header. I don't remember for how long this has been happening, but
it has started to annoy me.

Here is what is in the maildir (looked at with less):

|X-Spam-Report: torres.zugschlus.de
|
| Content analysis details: (-6.8 points, 5.0 required)
|
| pts rule name description
| ---- ---------------------- -------------------------------------------
| -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high
| trust
| [82.195.75.100 listed in list.dnswl.org]
| -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3)
| [82.195.75.100 listed in wl.mailspike.net]
| -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain
| 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
| domains are different
| -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
| [score: 0.0000]
| 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid
| -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders
| 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid

And this is what mutt displays:

|X-Spam-Report: torres.zugschlus.de Content analysis details: (-6.8 points, 5.0
| required) pts rule name description ---- ----------------------
| ------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL:
| Sender listed at http://www.dnswl.org/, high trust
| [82.195.75.100 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good
| reputation (+3) [82.195.75.100 listed in
| wl.mailspike.net] -0.0 RP_MATCHES_RCVD Envelope sender domain matches
| handover relay domain 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd
| level mail domains are different -1.9 BAYES_00
| BODY: Bayes spam probability is 0 to 1% [score:
| 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not
| necessarily valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0
| T_DKIM_INVALID DKIM-Signature header exists but is not valid

In the spool, the line breaks are 0x0a in header and body (hexdump -C
on the maildir file), and it looks like mutt is collapsing whitespace
into spaces and then re-flowing the header.

The body just displays nicely.

Is there any muttrc setting that I might have inadvertently used,
breaking my display?

Using mutt 1.7.2 (which identifies itself as NeoMutt) from Debian
stable.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834
Peter Pearson
2017-07-24 16:27:56 UTC
Permalink
Post by Marc Haber
mutt destroys the formatting of spamassassin's report inserted into
the header. I don't remember for how long this has been happening, but
it has started to annoy me.
[lines truncated at column 75]
Post by Marc Haber
|X-Spam-Report: torres.zugschlus.de
|
| Content analysis details: (-6.8 points, 5.0 required)
|
| pts rule name description
| ---- ---------------------- -------------------------------------------
| -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,
| trust
| [82.195.75.100 listed in list.dnswl.org]
| -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3)
| [82.195.75.100 listed in wl.mailspike.net]
| -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover rela
| 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
| domains are different
| -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
| [score: 0.0000]
| 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not nece
| -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders
| 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not vali
|X-Spam-Report: torres.zugschlus.de Content analysis details: (-6.8 poi
| required) pts rule name description ---- -------
| ------------------------------------------- -5.0 RCVD_IN_DNSWL_HI
| Sender listed at http://www.dnswl.org/, high
| [82.195.75.100 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3
| reputation (+3) [82.195.75.100 listed
| wl.mailspike.net] -0.0 RP_MATCHES_RCVD Envelope sender dom
| handover relay domain 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and
| level mail domains are different -1.9
| BODY: Bayes spam probability is 0 to 1%
| 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK sign
| necessarily valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good send
| T_DKIM_INVALID DKIM-Signature header exists but is not va
In the spool, the line breaks are 0x0a in header and body (hexdump -C
on the maildir file), and it looks like mutt is collapsing whitespace
into spaces and then re-flowing the header.
For what it's worth, mutt is displaying the "unfolded" version of
the SMTP header field (RFC 5322). Maybe knowing the terminology
will help find something in mutt's documentation.
--
To email me, substitute nowhere->runbox, invalid->com.
Jorgen Grahn
2017-07-24 23:50:13 UTC
Permalink
Post by Peter Pearson
Post by Marc Haber
mutt destroys the formatting of spamassassin's report inserted into
the header. I don't remember for how long this has been happening, but
it has started to annoy me.
[lines truncated at column 75]
Post by Marc Haber
|X-Spam-Report: torres.zugschlus.de
|
| Content analysis details: (-6.8 points, 5.0 required)
...
Post by Peter Pearson
For what it's worth, mutt is displaying the "unfolded" version of
the SMTP header field (RFC 5322). Maybe knowing the terminology
will help find something in mutt's documentation.
My gut reaction is that Spamassassin shouldn't try to present
formatted information in a mail header. It wouldn't surprise me if
the RFCs say the folding carries no information (but I can't be
bothered to check).

/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Marc Haber
2017-07-25 10:50:06 UTC
Permalink
Post by Peter Pearson
For what it's worth, mutt is displaying the "unfolded" version of
the SMTP header field (RFC 5322). Maybe knowing the terminology
will help find something in mutt's documentation.
It helped me find #3135, fixed in 1.5.18. I do have 1.7.2, so the fix
should be in there, but neither ":set wrap=0" nor "set wrap_headers=0"
do change displaying of the spamassassin header.

The docs suggest that both settings only affect outgoing mail, but
that's not my issue. I want mutt not to destroy the (admittedly not
very rfc compliant) formatting of the header when _displaying_ a
message.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834
Loading...