1

I don't really have much experience with mail servers so forgive me if some of my terminology is off.

First of all, here's what I'm trying to do:

  1. get user information using ldap (postfix?)
    • separate user accounts and ml accounts (ml accounts can be predefined)
  2. deliver to MLs (Mailman)
    • add sequence number to the subject
    • save ML spool in /mnt/ml/{ml-name}/spool
    • expand ML using ldap
    • deliver to users (step 3) [via postfix?]
  3. deliver to users (dovecot-lda)
    • save message in /mnt/mail/{user-name}/

There are a few components to my question.

Mailman/ldap:

  1. Is it possible to use Mailman to get the subscribers of a ML using ldap?
    • (from what I've researched it looks like I'd need to use a script to sync Mailman with ldap but I'd like to confirm)

Mailman

  1. I think adding the sequence number to the email subject is possible but I can't find any information on it. Could someone help me out or tell me what I should google?

  2. Saving the ML emails in a custom directory. To be honest I haven't really looked looked but a quick pointer telling me where it's done would help a bunch.

Postfix/dovecot/ldap:

  1. I've been trying to get the mail for all users (which are gotten using ldap) into a custom mounted directory /mnt/mail/{user-name}/. I think I need to use virtual mail boxes but I haven't been successful. Is using dovecot-lda the right way to do this?

I know I'm asking a lot but if people could answer any of the 4 questions or tell me if I'm making a mistake in my understanding of the roles each component plays, it would help a bunch.

Thanks!

Alan

1 Answers1

1

Assuming that you are trying to route mail to a mailman list, here are a few pieces you can fit into the puzzle. First, some LDAP:

 # mailroute, system, mydomain.net
 dn: ou=mailroute,ou=system,dc=mydomain,dc=net
 objectClass: top
 objectClass: organizationalUnit
 ou: mailroute

 # forward0, mailroute, system, mydomain.net
 dn: cn=forward0,ou=mailroute,ou=system,dc=mydomain,dc=net
 objectClass: top
 objectClass: MailForwardOnly
 cn: forward0
 MailAlternateAddress: hostmaster@mydomain.net
 MailAlternateAddress: postmaster@mydomain.net
 MailAlternateAddress: webmaster@mydomain.net
 MailForwardingAddress: sysadmin@lists.mydomain.net
 displayName: RFC emails to system administrator

Then, some Postfix config:

 /etc/postfix/main.cf:   
 relay_domains = lists.mydomain.net
 virtual_mailbox_domains = mydomain.net
 virtual_mailbox_maps = proxy:ldap:/etc/postfix/ldap/virtual_mailbox_maps.cf

 /etc/postfix/transport:  
 lists.mydomain.net mailman:

 /etc/postfix/ldap/virtual_mailbox_maps.cf:
 version = 3
 server_host = ldaps://a.mydomain.net:636
 search_base = ou=people,dc=mydomain,dc=net
 query_filter = (&(objectClass=*)(mail=%s))
 result_attribute = uid
 bind = yes
 bind_dn = cn=postfix,ou=applications,ou=system,dc=mydomain,dc=net
 bind_pw = czczczcz
rleir
  • 372
  • 1
  • 7