[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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):
virtual_mailbox_domains = $virtual_mailbox_maps 

mydomain.com required

LDAP Alias:
dn: cn=Aliased account,ou=People,dc=mydomain.com,ou=Commercial, 
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

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 
  <aliased@non-local.domain.com>: said:
   550 5.1.0 <aliased@non-local.domain.com>: User unknown in virtual mailbox 

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: