On Sat, Mar 10, 2012 at 05:25:05AM -0500, Allan Wind wrote: > I have an odd requirement of redirecting info@ for a reasonable > large number of domains to i...@example.com.
Wietse has already answered about the problem you made, but I have some things to add. First, WHY are you doing this? Why all domains and why only info@? This does not make much sense. > Figured this could be done with 2.7.1 using: > > virtual_alias_domains = pcre:${config_directory}/virtual_alias_domains > > /.*/ anything Same as "virtual_alias_domains = static:yes". > virtual_alias_maps = pcre:${config_directory}/virtual_alias_maps > > /^info@.*/ i...@example.com > > however this fails with: > > Mar 10 09:14:26 regatta postfix/cleanup[1448]: 881C16B: > message-id=<> > Mar 10 09:14:26 regatta postfix/qmgr[1441]: 881C16B: > from=<al...@lifeintegrity.com>, size=199, nrcpt=1 (queue active) > Mar 10 09:14:26 regatta postfix/error[1449]: 881C16B: > to=<al...@example.com>, orig_to=<i...@example.org>, relay=none, > delay=9.4, delays=9.4/0.01/0/0.01, dsn=5.0.0, status=bounced > (User unknown in virtual alias table) This means that example.com is in virtual_alias_domains, but i...@example.com does not resolve in virtual_alias_maps to an address which is NOT in virtual_alias_domains. > Mar 10 09:14:26 regatta postfix/bounce[1450]: 881C16B: sender > non-delivery notification: 8039170 > Mar 10 09:14:26 regatta postfix/qmgr[1441]: 881C16B: removed > > I think this because postfix is not able to validate the > sender, al...@lifeintegrity.com, as a valid virtual user. Not so. The sender address has nothing to do with it. > This is usually the desired behavior, but in this case every Is it desired? Why? I don't try to validate sender addresses, and neither does/should most of the rest of the Internet. > domain is considered virtual. alias maps is complete, i.e. > I do want to bounce all other recipients besides info@. Typically one should also have postmaster@ and abuse@ role addresses. > smtpd_reject_unlisted_sender is set to default 'no', and > smtpd_sender_restrictions is empty. If I tweak the pcre to > exclude the domain of sender it works as expected, and it also > works fine with I bite the bullet and explicitly list out > all the domains either with a pcre or switching to hash. So why not do this? What is wrong with bullet biting? That is, in fact, the best possible answer I can see, from my very limited perspective of understanding the real problem and goal. > Is there a way to disable the sender check? Or tell > postfix that every user is valid for the sender check > but not as a recipient? You have seen a correlation and have assumed causation. This is fallacious. We don't know what this example.org and example.com really are. When munging domain names you must be perfectly consistent; otherwise you will make it impossible to diagnose mail routing problems. -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: