On Wednesday, August 05, 2009 at 12:37 CEST,
     Yeray Gutiérrez Cedrés <yera...@gmail.com> wrote:

> On Wed, Aug 5, 2009 at 10:18 AM, Magnus Bäck<mag...@dsek.lth.se> wrote:
>
> > Yes, but Postfix must know which domains are virtual mailbox
> > domains, i.e. which domains should be passed off to virtual(8).
> > It's not necessarily wrong to list $virtual_mailbox_maps in
> > virtual_mailbox_domains (it's there by default for backwards
> > compatibility reasons), but unless you actually list the virtual
> > mailbox domains in lookup tables specified in $virtual_mailbox_maps
> > there is no point in listing $v_m_m in v_m_d.
> 
> So qmgr(8) checks that the domain is a virtual mailbox domain
> (performing a lookup in a hash listed in virtual_mailbox_domains)
> before passing it off to virtual(8). Then, the mail delivery agent
> virtual(8) performs a lookup in the LDAP server (listed in
> virtual_mailbox_maps). Is my reasoning right?

Yes.

> If it's right and virtual_mailbox_domain is not set, so its default
> value is virtual_mailbox_maps (wich lists an LDAP database), Postfix
> would perform twice the same LDAP lookup (one time in qmgr(8) and
> another time in virtual(8)).

Yes.

> I suppose that I'm wrong with that, but I can't see how does this
> behave. If I were right, that would mean that's much better to list
> virtual domains in virtual_mailbox_domains with a simple hash than
> just leaving it to its default value.

Yes. Setting v_m_d to an explicit value (without $v_m_m) is preferable
to leaving it at the default value. Of course, if v_m_m only uses e.g.
hash maps it really doesn't matter, but in you're case you're using LDAP
so it does make a difference.

-- 
Magnus Bäck
mag...@dsek.lth.se

Reply via email to