Lade...
 

configuring postfix

configuring postfix


The first goal is to force postfix to ask openldap for valid email addresses. This is very easy. If you have a "simple" setup, then you just have to set
local_recipient_maps =ldap:/etc/postfix/ldap-local_recipients.cf

in /etc/postfix/main.cf. The file /etc/postfix/ldap-local_recipients.cf contains the ldap setup:

server_host = ldap.redflo.de
version = 3
search_base = dc=redflo, dc=de
query_filter = (&(objectClass=inetOrgPerson)(mail=%s))
result_attribute = mail


In this case you have to fill the "mail" attribute for persons that should be able to receive mail. You can also use another attribute like "sn" or "uid". The default domain is always added in checks, so you can fill the "mail" attribute with "flo" or "flo@redflo.de".

If your mailserver has the nsswitch for passwd set to ldap and you have configured your /etc/ldap.conf accordingly, than you even don't have to do that (unchecked! todo: check)!

If you have a more complex setup with a mailrelay located near your firewall you may want to use:
relay_recipient_maps =ldap:/etc/postfix/ldap-relay_recipients.cf

instead.
If you do virtual hosting then you should use:
virtual_alias_maps = ldap:/etc/postfix/ldap-virtual.cf

and use result_attibute=cn in your config file.


Next we have to connect postfix to deliver mail to the cyrus imap server. This is acheived with the setting:
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp



Erstellt von admin. Letzte Änderung: Sonntag Februar 19, 2006 00:11:49 GMT-0000 by admin.