I have a Posix mail server that serves as a gateway to an MS Exange
server. The Posix server contains aliases (stored in openldap) that
match the users in the MS Exchange server. So somebody could send an
e-mail to j...@example.com (the MX register for example.com is my Posix
server), this would reach this Posix server that would check for the
alias in the ldap directory. This would retrieve
j...@corporative.example.com whose mailbox is in the MS Exchange
Server.

Since I'm new to Posix (and my duty is to learn how this system is
working), I think that maildrop performs a DNS request for the MX
register for the domain corporative.example.com and then an SMTP
connection is established between Posix and MS Exchange, that
eventually would deliver the e-mail to j...@corporative.example.com in
his local mailbox. But I'm not sure about how this works.


This is how this is configured in main.cf:
--------------------------------------------------------------------------------
myhostname = some.example.com
myorigin = /etc/mailname
mydestination = some.example.com, some, localhost.localdomain, localhost
relayhost =
relay_domains = corporative.example.com otherdomain.com
mynetworks = 127.0.0.0/8 10.120.200.0/24

virtual_alias_maps = ldap:valiases
valiases_server_host = localhost
valiases_search_base = ou=alias,dc=example,dc=com
valiases_result_attribute = maildrop

virtual_transport = maildrop
virtual_mailbox_base = /var/vmail/
virtual_mailbox_maps = ldap:ldapvirtualmap

ldapvirtualmap_server_host = localhost
ldapvirtualmap_server_port = 389
ldapvirtualmap_bind = no
ldapvirtualmap_search_base = ou=users,dc=example,dc=com
ldapvirtualmap_result_attribute = mailbox
--------------------------------------------------------------------------------

The MX register for some.example.com is the MS Exange server. Since
virtual_alias_domains is not defined, I suppose that every time an
email is sent to someb...@example.com, a lookup in the ldap directory
is performed. If I set virtual_alias_domains to example.com (or any
other domains I serve), wouldn't this be enough to reject everything
that's not directed to the domains I serve? I must say that everything
works ok but I don't know why there's no need to set
virtual_alias_domains.

Reply via email to