nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] mhfixmsg on a pathological mail


From: Håkon Alstadheim
Subject: Re: [Nmh-workers] mhfixmsg on a pathological mail
Date: Fri, 18 Aug 2017 14:25:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

Den 18. aug. 2017 13:49, skrev Håkon Alstadheim:
> 
> 
> Den 18. aug. 2017 13:04, skrev Ralph Corderoy:
>>
>>
>> Hi Håkon,
>>
>>> Trying to run mhfixmsg on it just removes the entire body of the mail.
>>
>> Can you give a command that fails?  It seems OK here.
> I'm running debian jessie which has 1.6 as package. Compiled but not
> installed 1.7 from source. I did apt-get build-dep nmh first, which gets
> me build-dependencies for 1.6.
> 
> Running with PATH="<src>/uip:<src>/sbr:$PATH"
> 
> Copied the etc/* files to where the binaries are looking for them,
> (checked with strace ) but the build fails during tests with the
> attached log. I thought that was a false alarm, but maybe not?
> 
> Anyway, as per now I get
> ----
> $ mhlist -version
> mhlist -- nmh-1.7-RC2 built 2017-08-18 11:32:04 +0000 on garbo
> $ mhlist 1
> mhlist: bogus multipart content in message 1
>  msg part  type/subtype              size description
>    1       multipart/mixed            32K
> $ mhfixmsg 1 -outfile - | tail -5
>  R_SPF_ALLOW(-0.20)[+ip4:140.211.167.216]
>  RCPT_COUNT_ONE(0.00)[1]
>  DMARC_POLICY_SOFTFAIL(0.10)[cisco.com : SPF not aligned (relaxed), No
> valid DKIM,none]
> 

Update: It dawned on me that sending the attachment might have changed
it somehow, so getting the attachment from the outgoing message, I see
that a ^M before each line-feed has been removed, both in headers and in
the body.

Sure enough this:
---
$ cd Mail/inbox
$ sed -e 's/\r$//' < 1 | mhfixmsg -file - -outfile -
---
Works as intended.
I'll use this for the moment, but it would be nice to find the culprit,
as this might conceivably remove som ^M from body-parts that explicitly
want those.

I'd also like to put mhfixmsg in my mail-server BEFORE spam-filtering,
but removing and subsequently adding ^M back would surely break
something unless the remove/re-add was done in a very clever manner.


> --===============0051142480612052064==--
> 
> ----
> 
>>
>>     $ mhfixmsg -version
>>     mhfixmsg -- nmh-1.7-RC2 1.7-RC2-1-g42b75672 built 2017-08-18 06:44:22 
>> +0000 on orac
>>     $ scan -file 9707.2.email -format '%{message-id}'
>>     <address@hidden>
>>     $ mhfixmsg -file - -outfile - <9707.2.email >fixed
>>     $ echo $?
>>     0
>>     $ mhlist -file 9707.2.email
>>      msg part  type/subtype              size description
[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]