Am 28.11.2014 um 18:32 schrieb Viktor Dukhovni:
On Fri, Nov 28, 2014 at 08:11:54AM -0500, Wietse Venema wrote:
Dirk St?cker:
For some subdomains when switching from catchall to individual settings I
simply set a CNAME to another name with correct MX settings

name.domain.tld --> mail.domain.tld (containing A,AAAA and MX)

It worked for many servers, but some started to deliver mail to
u...@mail.domain.tld instead of u...@name.domain.tld. They shouldn't
rewrite the mail address, should they?

That goes back to RFC 821. RFC 2821 explicitly allows aliases in
commands. Postfix still has a now-unused smtp_unalias module to
replace domain name aliases in MAIL FROM and RCPT TO.

Very old Sendmail config files used to by default canonicalize (aka
unalias) the domain part of recipient addresses so as to conform
to RFC 821.  This was the right thing to do some 20+ years ago.

Most Sendmail systems no longer do this, but perhaps some operators
never got the message.  Don't unalias the recipient domain

we use a config like below to rewrite the destination domain combined with a more or less complex view to also list the correct valid addresses in "local_recipient_maps" and avoid backscatters

recipient_canonical_maps = mysql:/etc/postfix/mysql-rewritedomains.cf

[root@localhost:~]$ cat /etc/postfix/mysql-rewritedomains.cf
user     = dbmailro
password = *******
dbname   = dbmail
hosts    = unix:/var/lib/mysql/mysql.sock
query = select target from dbma_rewrite_domains where source='%d' and ((select count(*) from dbmail_aliases where alias=(select concat('%u', (select target from dbma_rewrite_domains where source='%d' limit 1)) from dbma_rewrite_domains limit 1))>0 or (select count(*) from dbmail_aliases where alias='%u@' limit 1)>0) limit 1;

Reply via email to