On 28/04/23 21:19, Andreas Cieslak via Postfix-users wrote:
Why are To and From replaced in the header but not the subject?
Am I perhaps missing the right expression here and could someone give me some advice?
Or is there really no way around Mailmunge or MimeDefang etc.?
Any hints would be appreciated.

Others have already answered this. header_checks operates on only ONE HEADER AT A TIME. If you match the To: header then the REPLACE operation replaces the To: header with whatever you put in the replacement text, so when you are trying to replace the Subject header you are literally replacing the To: header in the message with a second Subject: line thereby resulting in a message with no To: header and two Subject: headers. The way that this is treated in the email client is very much undefined.

The only way to accomplish what you want is with either a milter or a content filter.


Peter
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to