For a given virtual domain, I would like to send mail with a certain prefix to
another process (via pipe) while all other mail gets delivered normally.
Here are the (hopefully) relevant pieces of my various config files:
/etc/postfix/master.cf
list-expander unix - n n - - pipe
flags=DRhu user=nobody:nobody argv=/usr/bin/list-expander ${recipient}
/etc/postfix/transport
/^[email protected]$/ list-expander:unix
/etc/postfix/main.cf
transport_maps = regexp:/etc/postfix/transport
virtual_mailbox_domains = mydomain.com
If I ask for a delivery report (sendmail -bv '[email protected]') I get
what I was expecting:
<[email protected]>: delivery via list-expander: delivers to
command: /usr/bin/list-expander
But the Postfix Virtual Domain Hosting Howto seems to say that what I've done
above won't work:
"Why does this example use a clumsy virtual alias instead of a more elegant
transport mapping? The reason is that mail for the virtual mailing list would
be rejected with "User unknown". "
And, sure enough, when I try to send mail to my list, it bounces with
"Recipient address rejected: User unknown in virtual mailbox table;". (Virtual
aliases for the domain are delivered without problem.)
So, my question is, why doesn't the transport map work? Or do I have something
misconfigured?
Thanks,
David