Perhaps against my better judgment...
On 9 Feb 2016, at 17:12, @lbutlr wrote:
On Tue Feb 09 2016 14:46:15 Bill
Cole <postfixlists-070...@billmail.scconsult.com> said:
both in its ultimate purpose
Purpose is my son’s email is in a mysql domain, and he is getting
emails for a trip to Japan later this year. We need to forward all
those mails from the trip coordinator to me and his mother and to him.
It would be easiest, of course, to tell the trip coordinating people
to change his emails to an email alias, but that’s not going to
happen.
OK, so sender_bcc_maps is what you need. Forget about using REDIRECT in
a header_checks map. Forget about REDIRECT at all if you're tying to add
recipients.
Looking back I see thatyour message of Sat, 6 Feb 2016 17:26:08 -0700
makes an odd statement:
On Sat Feb 06 2016 16:46:37 Wietse Venema <wie...@porcupine.org>
said:
Use sender_bcc_maps if all you really want is to add an extra
address.
Oh. I didn’t know about that. But there seems to be an underlying
issue.
Here is the log with minimal munging for using either header_checks
or check_sender_access:
Feb 6 17:04:08 mail submit-tls/smtpd[17045]: 3pyW1N4JB1zJMjC:
*stuff*, sasl_method=PLAIN, sasl_username=kreme
Feb 6 17:04:08 mail postfix/cleanup[17047]: 3pyW1N4JB1zJMjC:
redirect: header From: kreme+ja...@kreme.com from *stuff*
from=<kreme+ja...@kreme.com> to=<lbu...@kreme.com> proto=ESMTP
helo=<[10.0.0.125]>: ja...@example.com
Which indicates some misunderstanding about what you did, thought you
did, or thought was being advised.
Those log lines show with 100% CERTAINTY that a header_checks
redirection acted. If you had redirected by some other means, it would
not say "redirect: header From:" it would say something related to
whatever other method you used. Pick exactly one method. Routing based
on a From header is indubitably the worst possible choice.
sender_bcc_maps is designed precisely for what you are trying to do.
So, step by step:
1. Remove the REDIRECT from your header_checks.pcre file
2. In sender_bcc.pcre add a line like this (using the actual SMTP
envelope used by the trip coordinator inside the //):
/cooordinator@outside.domain/ pare...@kreme.com
3. In your virtual file add this (with whatever real local targets you
actually want):
pare...@kreme.com m...@kreme.com, d...@kreme.com
4. postmap hash:/etc/postfix/virtual
5. postfix reload
6. Use your favorite ultra-versatile MUA (I prefer "telnet localhost 25"
for such things) to construct and send ('forge' is such a judgy word...)
a message using the 'cooordinator@outside.domain' address you used Step
2 as the envelope sender.
7. If it doesn't work, check your logs. Find ALL lines with the same
queue ID.