On Tue, Nov 30, 2010 at 11:57:08AM -0600, Noel Jones wrote:

>> We have a canonical.regexp:
>>
>> /us...@.*\.subdomain\.com/           u...@domain.com
>>
>> main.cf:
>>
>> canonical_maps = hash:/usr/local/postfix/etc/canonical
>>                   regexp:/usr/local/postfix/etc/canonical.regexp
>> canonical_classes = envelope_sender, header_sender, header_recipient

Unfortunately, while leaving out "envelope_recipient" disables the
associated rewrite, it does not disable the recipient validation lookup
against canonical_maps, and so if this MTA accepts external email for
any of the sub-domains in question, it will backscatter invalid
recipients.

It is now best to rewrite addresses to external form in smtp_generic_maps,
not canonical_maps. One can also use a different setting of smtp_generic_maps
for the "smtp" and "relay" transports if the mapping needs to be diffent
for mail going in vs mail going out.

-- 
        Viktor.

Reply via email to