I'm trying to fix my virtual domain configuration with postfix, which as
noted in a prior discussion was done incorrectly by some unknown to me
person in the past.
The main issue right now is that it has:
virtual_transport = error
which I was told makes little sense, so I'm trying to correct our
configuration.
First, all of our data is stored in LDAP (domains, users, etc). For my
test setup, the "real" domain is zre-ldap002.eng.vmware.com. I've created
a virtual (alias) domain "example.com".
With my default configuration, if I send mail to u...@example.com AND the
user exists as u...@zre-ldap002.eng.vmware.com, mail delivery occurs.
However, I'm completely unclear as to what I should be setting
virtual_transport to be that isn't error that will allow delivery to occur.
I've been reading over
<http://www.postfix.org/LDAP_README.html#example_virtual>, but it assumes
that you have matching user entries for every user in the alias domain for
LDAP lookups to work. What is just a base domain entry:
dn: dc=example,dc=com
zimbraDomainType: alias
zimbraMailCatchAllForwardingAddress: @zre-ldap002.eng.vmware.com
zimbraDomainAliasTargetId: 4791b22a-9d9f-4a1b-b334-e3fd3244c561
zimbraDomainStatus: active
objectClass: dcObject
objectClass: organization
objectClass: zimbraDomain
objectClass: amavisAccount
zimbraId: 4e14bf2f-de63-4068-bb54-ee3327ad69b1
zimbraCreateTimestamp: 20130409230803Z
zimbraDomainName: example.com
zimbraMailStatus: enabled
zimbraMailCatchAllAddress: @example.com
o: example.com domain
dc: example
The catchall domain (real domain) is stored in the
zimbraMailCatchAllForwardingAddress line.
The (real) user entry looks like:
zimbra@zre-ldap002:~$ ldapsearch -LLL -x -H ldapi:// -D cn=config -w zimbra
-b "dc=zre-ldap002,dc=eng,dc=vmware,dc=com" uid=user
dn: uid=user,ou=people,dc=zre-ldap002,dc=eng,dc=vmware,dc=com
objectClass: inetOrgPerson
objectClass: zimbraAccount
objectClass: amavisAccount
zimbraId: 3f59de93-52d8-4f43-89cd-ecadd78e1929
zimbraCreateTimestamp: 20130409235225Z
zimbraAccountStatus: active
zimbraMailHost: zre-ldap002.eng.vmware.com
zimbraMailTransport: lmtp:zre-ldap002.eng.vmware.com:7025
zimbraMailStatus: enabled
zimbraMailDeliveryAddress: u...@zre-ldap002.eng.vmware.com
mail: u...@zre-ldap002.eng.vmware.com
cn: user
sn: user
uid: user
userPassword:: =
zimbraPasswordModifiedTime: 20130409235225Z
postmap on my base transport works for this:
zimbra@zre-ldap002:~$ postmap -q u...@zre-ldap002.eng.vmware.com
ldap:/opt/zimbra/conf/ldap-transport.cf
lmtp:zre-ldap002.eng.vmware.com:7025
However, I don't see a way to get postfix to understand it should look for
@zre-ldap002.eng.vmware.com (from the zimbraMailCatchAllForwardingAddress
attribute) anytime it gets an email for @example.com (from the
zimbraMailCatchAllAddress attribute), and then do the lookup as
u...@zre-ldap002.eng.vmware.com.
Pointers *much* appreciated.
Thanks!
--Quanah
--
Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra :: the leader in open source messaging and collaboration