Strange Postfix-LDAP-Amavis behaviour
Hi again
I've recently installed a mail server using Postfix-LDAP-Amavis. I stored
accepted domains on a file "postmapped" (/etc/postfix/virtualdomains) and
everything was ok. Now I've tried to store this accepted domains in the LDAP
server and I've found some problem: amavis returns non-local aliases. No
problem with local aliases, no problem with local delivery.
Well, this config works perfectly (well, at least it seems to):
/etc/postfix/main.cf:
virtual_mailbox_domains = $virtual_mailbox_maps
hash:/etc/postfix/virtualdomains
/etc/postfix/virtualdomains:
mydomain.com required
LDAP Alias:
dn: cn=Aliased account,ou=People,dc=mydomain.com,ou=Commercial,
ou=Dealer,dc=root,dc=ldap
mail: aliased@mydomain.com
sn: Aliased account
cn: Aliased account
objectClass: courierMailAlias
objectClass: inetOrgPerson
objectClass: top
maildrop: aliased@non-local.domain.com
LDAP MyDomain:
dn: dc=mydomain.com,ou=Commercial,ou=Dealer,dc=root,dc=ldap
associatedDomain: mydomain.com
dc: mydomain.com
objectClass: top
objectClass: dnsdomain
objectClass: domainRelatedObject
main.cf:
virtual_maps = ldap:valiases
valiases_server_host = localhost
valiases_search_base = dc=mydomain,dc=com
valiases_query_filter = (&(mail=%s)(objectClass=CourierMailAlias))
valiases_result_attribute = maildrop
And this other don't work at all. All the same except:
virtual_mailbox_domains = $virtual_mailbox_maps ldap:accepteddomains
accepteddomains_server_host = localhost
accepteddomains_server_port = 389
accepteddomains_search_base = dc=mydomain,dc=com
accepteddomains_query_filter = (associatedDomain=*)
accepteddomains_result_attribute = associatedDomain
This config works correctly with local mail, local aliases, but not with
non-local aliases. When I send an email to this aliased account, I get an
email from AMAVIS with the following error:
From: amavisd-new <postmaster@mydomain.com>
To: <tomas@grupoeon.net>
at host mydomain. Our internal reference code for your message
is 22949-09.
Return-Path: <tomas@apliasi.com>
Your message <200405051857.55576.tomas@grupoeon.net> could not be delivered
to:
<aliased@non-local.domain.com>: 127.0.0.1 said:
550 5.1.0 <aliased@non-local.domain.com>: User unknown in virtual mailbox
table
I've been looking everywhere for what am I doing wrong, but I can't find it.
I've got tons of docs, mans and discussion threads but unsuccessful. Any of
you can tell me where to look at, please? Where may be the problem?
Thanks ins advance
Reply to: