|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Victor Duchovni (Victor.Duchovni
morganstanley.com)Date: Sun Jul 01 2001 - 21:38:30 CDT
There is a simple trick that solves the "how to reject" problem without
code changes. The recipients are rejected after the mail is accepted rather
than in smtpd. Some consider not rejecting invalid addresses in SMTP to be
a feature (makes it harder to fish for valid recipient addresses), I
personally think that it is a tolerable misfeature of the approach.
The basic idea is to structure the configuration as follows:
/etc/postfix/main.cf:
virtual_maps hash:/etc/postfix/virtual, hash:/etc/postfix/nosuch
/etc/postfix/virtual:
nosuchuser.virtual.domain whatever
user1
virtual.domain user1-virtual
user2
virtual.domain user2-virtual
/etc/postfix/nosuch:
virtual.domain
nosuchuser.virtual.domain
Known users in virtual.domain get resolved to appropriate local names. Non
existent users get rewritten to unknown.user
nosuchuser.virtual.domain and
this is bounced in qmgr/nqmgr.
> >
> > Wietse, how about approach already proposed here for virtual_domains?
> > The idea was: instead of having virtual_maps that lists everything,
> > have two maps, standard virtual_maps and new virtual_domains.
>
> Oh, great, so one needs two maps instead of one. Is this progress?
>
Making it possible to separate the virtual domains from the virtual
mailboxes is in fact progress:
1. There is a problematic ambiguity between
"local.mailbox somewhere
dom.ain" AND
"virtual.dom.ain whatever"
If one cannot predict the contents of the virtual map in advance,
local names might (inadvertently) block mail to accidentally virtual
domains.
2. There is a performance cost for "misses" in the virtual table when
Postfix is check whether is virtual (that isn't). The domain in
question is looked up in every virtual map, including "slow" ones
such as LDAP, or MySQL.
3. If one had $virtual_domain_maps, one could just set it by default to
$virtual_maps, for complete backwards compatibility. I have a patch
that implements this if you are interested???
-- Viktor.- To unsubscribe, send mail to majordomo
postfix.org with content (not subject): unsubscribe postfix-users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]