244192Re: trivial-rewrite regular expression substitution
- Oct 1, 2008On Wed, Oct 01, 2008 at 01:38:36PM -0600, David DeFranco wrote:
> Thanks for the answers.Use (regexp) virtual alias mapping to rewrite recipients to suitably
> This is an internal mail server for system generated mail, and I'm
> re-writing the address before determining the transport so there's sanity
> checking already in place. I would never consider this kind of setup on a
> user/internet relay server. Heck, I wouldn't consider this solution in the
> first place, but it's legacy ( currently on sendmailx ) and I have to make
> it work. I wanted to avoid using an explicit map file because it could be
> complex and has to be updated manually.
> Is there another way to programmatically determine the next-hop?
selected artificial domains that map statically to the right transport.
In the transport, use smtp_generic_maps to undo the virtual mapping,
so the destination sees an unmodified recipient address.
user1@... -> user=example.com@...
user2@... -> user=example.com@...
mysmtp ... smtp
mysmtp_generic_maps = pcre:/etc/postfix/undo_adhoc_routing.pcre
virtual_alias_maps = pcre:/etc/postfix/do_adhoc_routing.pcre
Beware of loops! Do not let the PCRE LHS pattern match the RHS output!
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
- << Previous post in topic Next post in topic >>