* Peter Blair <popc...@snickers.org>: > On Mon, Aug 15, 2011 at 10:30 AM, Jerico2day <jerico2...@gmail.com> wrote: > > I'd like to have postfix dynamically change "my.domain.com" only on > > Message-Id header to some arbitrary domain that would be > > public-facing for all outgoing mail and change it back for incoming > > mail. > > > > Unfortunately, I'm not quite sure how to do that. I would appreciate > > any assistance. > > First in your main.cf: > > header_checks = pcre:/etc/postfix/header_checks > > Secondly in your /etc/postfix/header_checks: > > /Message-Id:\s+<(.*?)@my.domain.com>/ REPLACE Message-Id: > <$1...@my.domain.net>
Warning: this might also alter Resent-Message-Id: into Message-Id:!!! /^Message-Id:\s+<(.*?)@my\.domain\.com>$/ REPLACE Message-Id: <$1...@my.domain.net> could be more robust. -- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebra...@charite.de | http://www.charite.de