Discussion:
virtual_alias_maps precedence behavior
(too old to reply)
br+ (Ben Rosengart)
2003-08-28 00:09:02 UTC
Permalink
virtual_alias_maps = hash:hashvirt,
regexp:revirt

hashvirt:

***@example.com ***@example.net

revirt:

/^(.+)@example\.com/ pollywog+${1}@example.net

Will the entry in hashvirt take precedence over the entry in revirt?
Why or why not? Thanks in advance.
--
Ben Rosengart (212) 741-4400 x215
To accuse others for one's own misfortunes is a sign of want of education.
To accuse oneself shows that one's education has begun. To accuse neither
oneself nor others shows that one's education is complete. -- Epictetus
Wietse Venema
2003-08-28 00:36:30 UTC
Permalink
Post by br+ (Ben Rosengart)
virtual_alias_maps = hash:hashvirt,
regexp:revirt
Will the entry in hashvirt take precedence over the entry in revirt?
Why or why not? Thanks in advance.
Postfix searches each listed map until it finds match.

Thus, ***@example.com will match as expected.

Wietse
br+ (Ben Rosengart)
2003-08-28 00:40:50 UTC
Permalink
Post by Wietse Venema
Postfix searches each listed map
In the order specified in main.cf?
Post by Wietse Venema
until it finds match.
--
Ben Rosengart (212) 741-4400 x215
To accuse others for one's own misfortunes is a sign of want of education.
To accuse oneself shows that one's education has begun. To accuse neither
oneself nor others shows that one's education is complete. -- Epictetus
br+ (Ben Rosengart)
2003-09-02 19:41:40 UTC
Permalink
Post by br+ (Ben Rosengart)
virtual_alias_maps = hash:hashvirt,
regexp:revirt
Hmm. In my admittedly complex configuration, it doesn't.

"example.com" (names changed to protect the innocent) appears in
the map "domainx":

example.com x

Then there are some example.com addresses in an ordinary hash
virtual_alias_map -- they look up to themselves -- and then there's
the regexp map, as described above.

Mail sent to ***@example.com is bounced with "Unknown virtual
recipient".
--
Ben Rosengart (212) 741-4400 x215
To accuse others for one's own misfortunes is a sign of want of education.
To accuse oneself shows that one's education has begun. To accuse neither
oneself nor others shows that one's education is complete. -- Epictetus
Victor Duchovni
2003-09-02 20:03:22 UTC
Permalink
Post by br+ (Ben Rosengart)
Hmm. In my admittedly complex configuration, it doesn't.
Then your question is wrong, but the original answer is correct.
With stacked maps (my term for lack of anything better) the first map to
match wins, maps are tried in order.
Post by br+ (Ben Rosengart)
"example.com" (names changed to protect the innocent) appears in
example.com x
Then there are some example.com addresses in an ordinary hash
virtual_alias_map -- they look up to themselves -- and then there's
the regexp map, as described above.
recipient".
This is too obfuscated to be useful :-(

Is the bounce from the queue manager or from the "virtual" delivery agent?
Send a dummy message, show some unmodified logs and unmodified table
entries.
--
Viktor.
br+ (Ben Rosengart)
2003-09-02 20:26:23 UTC
Permalink
Post by Victor Duchovni
Post by br+ (Ben Rosengart)
Hmm. In my admittedly complex configuration, it doesn't.
Then your question is wrong, but the original answer is correct.
I have no doubt of that.
Post by Victor Duchovni
Post by br+ (Ben Rosengart)
"example.com" (names changed to protect the innocent) appears in
example.com x
This would have been more helpful if I'd remembered to mention that
domainx is a virtual_mailbox_map.
Post by Victor Duchovni
Is the bounce from the queue manager or from the "virtual" delivery agent?
Sep 2 15:30:16 mail1 postfix-mailhost/smtpd[10706]: BD99048846:
reject: RCPT from absinthe.tinho.net[166.84.5.228]: 550
<***@rosengart.com>: Unknown virtual recipient;
from=<> proto=ESMTP helo=<absinthe.tinho.net>
Post by Victor Duchovni
Send a dummy message, show some unmodified logs and unmodified table
entries.
I won't -- I get enough spam as it is -- but what's below is damn close.

virtual_mailbox_maps = hash:/etc/postfix/domainx,
hash:/etc/postfix/mhthemdoms,
hash:/etc/postfix/femhthemdoms
virtual_alias_maps = hash:/etc/postfix/virtual,
hash:/etc/postfix/mhrecip,
hash:/etc/postfix/femhrecip,
regexp:/etc/postfix/usersdotpanix
regexp:/etc/postfix/catchalls

# grep rosengart.com domainx
rosengart.com x
# grep rosengart.com mhthemdoms
rosengart.com x

# grep rosengart mhrecip
***@rosengart.com ***@rosengart.com
***@rosengart.com ***@rosengart.com
# grep rosengart virtual
***@rosengart.com ***@rosengart.de

# grep rosengart catchalls
/^(.+)@rosengart\.com ben+${1}***@example.net
--
Ben Rosengart (212) 741-4400 x215
To accuse others for one's own misfortunes is a sign of want of education.
To accuse oneself shows that one's education has begun. To accuse neither
oneself nor others shows that one's education is complete. -- Epictetus
Continue reading on narkive:
Loading...