[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postfix-users
Subject:    Re: Remove duplicate header 'MIME-Version'
From:       Wietse Venema <wietse () porcupine ! org>
Date:       2019-10-21 16:10:55
Message-ID: 46xhSv5mZPzJrNt () spike ! porcupine ! org
[Download RAW message or body]

lucas2@dds.nl:
> Hello Group, 
> 
> I have configured Postfix as a relay to forward all messages to the AWS
> SES mail service. 
> 
> SES bounces some messages with the following error: 
> 
> status=bounced (host email-smtp.eu-west-1.amazonaws.com[52.48.248.62]
> said: 554 Transaction failed: Duplicate header 'MIME-Version'. (in reply
> to end of DATA command)) 
> 
> These messages are sent by a scanner and I have no influence on the
> scanner configuration. 
> 
> Is there a way to remove the duplicate header in Postfix? 

No. You can use a Milter to count MIME-Version headers and then
delete the duplicate ones. Milters can be implemented in Perl or
Python, but it is an extra thing to care for and feed.

Whether this breaks signatures depends on how/when mail is signed.

> Alternatively, is it possible to remove the MIME-Version header(s)
> altogether? Would this break the message (or the mail client from the
> recipient)? 

You can remove all MIME-Version headers with the header_checks
IGNORE action (header_checks has no counter). But that will 
almost certainly break signed messages (DKIM/DMARC).

> 
> Thank you, 
> 
> Lucas
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic