OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: virtual_alias/mailbox_maps/domains trouble

From: /dev/rob0 (rob0gmx.co.uk)
Date: Thu Jul 27 2006 - 09:23:02 CDT


On Thursday 27 July 2006 08:54, Christian Schneider wrote:
> Here is the relevant part from /etc/postfix/main.cf:

"postconf -n" is preferred because it shows what Postfix actually is
using.

> virtual_mailbox_domains = ldap:/etc/postfix/ldap-virtual-domains.cf

And this doesn't tell us what the domains are.

> virtual_mailbox_maps = ldap:/etc/postfix/ldap-virtual-mailboxes.cf
> #virtual_alias_domains = ldap:/etc/postfix/ldap-virtual-domains.cf

See "postconf -d virtual_alias_domains".

> virtual_alias_maps =
> ldap:/etc/postfix/ldap-virtual-forwards.cf,
> ldap:/etc/postfix/ldap-virtual-accounts.cf,
> ldap:/etc/postfix/ldap-virtual-aliases.cf

Okay.

> alias_maps = hash:/etc/aliases
> local_transport = local:$myhostname
> local_recipient_maps = proxy:unix:passwd.byname $alias_maps

These apply to $mydestination, and all are defaults, so why are you
using these settings?

> Don't know why, but with this configuration, postfix seems to ignore
> the accoutActive flag in the filter, lookup the domain (or only the
> alias?) and delivers a mail for alias1domain.tld to
> account1domain.tld. Maybe I missed something...
> If I uncomment the virtual_alias_domains line, I get the following
> error in /var/log/mail.log:
> Jul 27 11:22:25 mail postfix/error[28882]: 5833574DDA:
> to=<account1domain.tld>, orig_to=<alias1domain.tld>, relay=none,
> delay=0, status=bounced (User unknown in virtual alias table)

An address must be in exactly one address class. Perhaps your
virtual_alias_domains lookup is overlapping with your
virtual_mailbox_domains lookup? See ADDRESS_CLASS_README.html for
explanation of address classes in Postfix.

"User unknown in virtual alias table" means that the recipient domain
was found in virtual_alias_domains, but the userdomain was NOT found
in virtual_alias_maps.

> Why does my virtual_alias_domains stop the account lookup?
>
> Here are the contents of the ldap-virtual-*.cf files. I removed
> server_host, server_port, search_base, bind, version and debuglevel
> parameters for better readability.

None of this tells us what data is being returned with the LDAP
lookups. That's where the problem lies.

> Is there somesting, I missunderstood? I searched for documentation
> about ldap lookups, in which order they are performed, what is when

My guess, it's a general Postfix issue, not specific to LDAP at all.
See DEBUG_README.html#mail for information on how to post a better
problem report.
--
    Offlist mail to this address is discarded unless
    "/dev/rob0" or "not-spam" is in Subject: header