Hi everyone, I am trying to get message bounces/delays piped into a script while keeping the user-visible From: header intact. To do this, I have asked the senders to relay through me and include a header of the form X-bounces-to: scriptal...@mydomain.com. In the postfix relay host I added main.cf: header_checks = regexp:/etc/postfix/header_checks header_checks: /^Return-Path: (.*)/ REPLACE X-Original-Return-Path: $1 /^X-bounces-to: (.*)/ REPLACE Return-Path: $1 The log does say postfix/cleanup: replace: header X-bounces-to: scriptal...@mydomain.comfrom somehost[1.2.3.4]; from=< z...@domain1.com> to=<a...@domain2.com> proto=SMTP: Return-Path: scriptal...@mydomain.com which sounds a bit odd - is this a concatenation of several informations from the message headers or some error on my part?
The messages do go out with the wrong return-path - the address used in the MAIL FROM: line, in this case z...@domain1.com. My question would be: does cleanup(8) do another replace of the headers just before the message leaves the system? If so, can it be disabled?