[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
postfix,openldap,cyrus working example
Hi All,
I looked around in the different FAQ and mailing lists for my problem.
But I had to play with the LDAP_README and postfix configuration for
myself.
My goal was to get infos of mailgroups, mailforwarders and mailbox-infos
out of OpenLDAP, take it thru Postfix which does the expansion of
mailgroups and mailforwarders and take it to Cyrus for local mailbox
receivers.
This scenario comes from a Netscape original Mail Server configuration
which should be migrated by OpenLDAP, Postfix and Cyrus IMAP.
I post this working solution for me and for all their out having the
same problem.
Basics of config:
Data in LDAP (possible attributes)
uid: the final destination of local e-mail users
mail, mailalternateaddress: primary and secondary mail addresses
mailforwardingaddress: the mail-address to forward the origin to
maildeliveryoption: 'mailbox' - set if mail should delivered local to
cyrus - if not set than only forward
objectclass: 'person' - for a single mail address person
objectclass: 'mailGroup' - for a group of mail receipients
member, uniquemember: dn's members of the mailGroup
Data in main.cf (postfix config)
virtual_maps: ldap:mailgroups, ldap:mailboxes, ldap:forwardonly
mailgroups replaces the single mailgroup-address by every receipients
uid or mailforwardingaddress
mailboxes replaces all local receipients with local mailbox delivery or
forwarders
forwardonly replaces all local receipients by forward-only mail address
Regards,
Dirk
--- START MAIN.CF ---
# ADDRESS REDIRECTION (VIRTUAL DOMAIN)
#
# Insert text from sample-virtual.cf if you need virtual domain support.
mydomain: datzert.de
virtual_maps = ldap:mailgroups, ldap:mailboxes, ldap:forwardonly
mailgroups_server_host = localhost
mailgroups_search_base = o=datzert,c=de
mailgroups_query_filter =
(&(|(mail=%s)(mailalternateaddress=%s))(objectclass=mailgroup))
mailgroups_result_attribute = uid,mailforwardingaddress
mailgroups_special_result_attribute = member,uniquemember
mailgroups_domain = $mydomain
mailboxes_server_host = localhost
mailboxes_search_base = o=datzert,c=de
mailboxes_query_filter =
(&(|(mail=%s)(mailalternateaddress=%s))(maildeliveryoption=mailbox)(objectclass=person))
mailboxes_result_attribute = uid,mailforwardingaddress
mailboxes_domain = $mydomain
forwardonly_server_host = localhost
forwardonly_search_base = o=datzert,c=de
forwardonly_query_filter =
(&(|(mail=%s)(mailalternateaddress=%s))(objectclass=person))
forwardonly_result_attribute = mailforwardingaddress
forwardonly_domain = $mydomain
mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
biff = no
--- END MAIN.CF ---
--- START SAMPLE.LDIF ---
dn: o=datzert,c=de
o: Datzert
c: de
objectclass: top
objectclass: organisation
dn: uid=dirk,o=datzert,c=de
uid: dirk
objectclass: top
objectclass: person
mail: dirk.datzert@datzert.de
mailalternateaddress: dirk@datzert.de
maildeliveryoption: mailbox
mailforwardingaddress: dirk.datzert@gmx.de
dn: cn=mailgroup,o=datzert,c=de
cn: mailgroup
objectclass: top
objectclass: mailGroup
objectclass: groupOfUniqueNames
uniquemember: uid=dirk,o=datzert,c=de
uniquemember: uid=wolf,o=datzert,c=de
mail: mailgroup@datzert.de
mailforwardingaddress: test@test.de
dn: uid=wolf,o=datzert,c=de
uid: wolf
mail: wolfgang@datzert.de
mailforwardingaddress: test@test.de
--- END SAMPLE.LDIF ---