hi, we want to migrate from Sendmail to Postfix and on our testsystem we found the following solution, to convert the setup:
main.cf: ========================================= [...] myhostname = mx01.our.domain mydomain = our.domain append_at_myorigin = no append_dot_mydomain = no # lists are Mailman lists mydestination = localhost.our.domain, localhost, $myhostname, list1.$mydomain, list2.$mydomain alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases alias_database = hash:/etc/aliases # our.domain via lmtp to dovecot server transport_maps = hash:/etc/postfix/transport # relay_domain_maps -> other.domain1 and other.domain2 to other server (lmtp:server1/smtp:server2 etc.) # virtual_domains -> Standard map with all domains, except our.domain for example: other.domain1 Other Domain1 relay_domains = hash:/etc/postfix/relay_domain_maps, hash:/etc/postfix/virtual_domains # Mailman settings mailman_destination_recipient_limit = 1 # Virtual Domains and Maps virtual_mailbox_base = /var/mail # all domains, except our.domain virtual_mailbox_domains = hash:/etc/postfix/virtual_domains # Contains all mail addresses from our.domain and other domains, we receive for (virtual_mailbox_domains) virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox_maps # and here we have all aliases virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps, hash:/var/lib/mailman/data/virtual-mailman ========================================= /etc/postfix/virtual_alias_maps: ================================ postmaster@our.domain admin1@our.domain,admin2.our.domain admins@our.domain admin1@our.domain,admin2.our.domain firstaidhelper@other.domain1 user1@our.domain,user1@other.domain1,user3@other.domain2,us...@yahoo.com,us...@gmx.net [ ... ~5600 other entries ... ] ================================ At the moment, it seems to be working, but ...: The mailserver doesn't store any mails local, all mails are stored on a different IMAP server (dovecot), via LMTP or other SMTP server. Dovecot itself has three backends: 1. passwd-ldap-dump -> dump from ldap 2. ldap -> if not found in passwd-ldap-dump try LDAP server directly 3. passwd-other-domain1 - passwd file for other.domain1 passwd-other-domain2 - passwd file for other.domain2 The mailusers in other.domain1 and other.domain1 aren't stored in LDAP We have also entries, that doesn't exist in LDAP and DoveCot too, like "firstaidhelper". These entries are generated from a different department admin and copied to our system (every morning), where we merge them with the virtual_alias_maps. So, users have to wait, until the next morning, if they have bad luck. In the actually system, a Makefile does this job (via cron) and breaks, if we have duplicates ... so, a lot of work. As I said, I want to have the important parts into LDAP. For all real users (@our.domain + ObjectClass posixAccount), it is a easy job, because they have all the mail attribute, only the attribute "receivemail" (true/false) or anything else is missing ... to refuse mails for him/her. But, how I get all the other mail recipients from the virtual_alias_maps into the LDAP ? Like, firstaidhelper, user1@other.domain .... I found many many howtos, LDAP schemas and a lot of ideas, but they all remains on exiting users in LDAP, so the class GroupOfNames ... memberUID .... etc. doesn't work. Also, I want that the other department can push/delete the aliases directly into the LDAP on any time, so a I need to create separate LDAP branch (for ACL): ou=aliases,ou=other.department,ou=mail,ou=services,dc=our,dc=domain (for example), which contains maybe all aliases as single attributes or more: cn=firstaidhelper,ou=aliases,ou=other.department,ou=mail,ou=services,dc=our,dc=domain objectClass: Mail (or anything else, because I haven't found a good postfix.schema, which fits) mailAlias: user1@our.domain,user1@other.domain1,user3@other.domain2,us...@yahoo.com,us...@gmx.net or: mailAlias: user1@our.domain mailAlias: user1@other.domain1 mailAlias: user3@other.domain2 mailAlias: us...@yahoo.com mailAlias: us...@gmx.net I think, the second one is easier for adding/deleting. So, I need a bit help, to get it working :-) Thanks for reading, too ;-) cu denny