One of our customers has complained that our mail system is broken. We have
been using postfix for many years and have come across the behaviour the
complaint is about a number of times but haven’t spent a lot of time or energy
trying to solve it. I would like to try to do so now.
The issue is that when a mailing list sends messages, the final recipient is in
none of the internal headers i.e. to: cc: etc. If the message goes into a
mailbag i.e. shared mailbox, when the messages are retrieved by the customers
Exchange server they are not having much luck with determining who to deliver
the message to.
Received: from smtp.godzone.net.nz ([127.0.0.1])
by localhost (mail1.godzone.net.nz [127.0.0.1]) (amavisd-new, port
10025)
with ESMTP id VcaxufMCHuBi for <[email protected]>;
Sat, 27 Feb 2016 08:59:06 +1300 (NZDT)
I have noted that the actual recipient is often in the Received: envelop header
and thought that it might be possible to extract it using header_checks and
create an X-To: header they can then use but I am not having much success.
I created the following pcre map;
/^Received: from smtp.godzone.net.nz .* for <(.*?)>;/ PREPEND X-To: $1
And added this to main.cf
header_checks = pcre:/etc/postfix/header-checks
I am not seeing anything being added to any of the messages, yet my tests did
seem to show that the RE does match.
Is this an appropriate way to solve this problem or is there a better way of
dealing with it.
Any assistance, as always, would be much appreciated
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Glen Eustace,
GodZone Internet Services, a division of AGRE Enterprises Ltd.,
P.O. Box 8020, Palmerston North, New Zealand 4446
Ph +64 6 357 8168, Mob +64 27 542 4015
“Specialising in providing low-cost professional Internet Services since 1997"