Mailing Lists in 10.8 Server

Apple have now self contained most of the config files for it’s services in the /Library/Server folders.

To make a mailing list you need to edit files in /Library/Server/Mail/Config/postfix

The file you need to edit is virtual_users

The format is

email@for_mailing_list.com      Localuser1,Localuser2,localuser3

afterward you must postmap this file

postmail /Library/Server/Mail/Config/postfix/virtual_users

If you want to use an LDAP group try this :-

1. Use Directory Utility to add the field “EMailAddress” to the group considered, and specify the group email address in this field.

 

2. Create a file /etc/postfix/ldap-groups.cf or /Library/Server/Mail/Config/postfix/ldap-groups.cf and edit it with the following content (where server01 is obviously the name of the server):

version = 3

server_host = localhost

search_base = cn=groups,dc=server01,dc=pretendco,dc=net

query_filter = (mail=%s)

result_attribute = memberUid

result_format = %u@pretendco.net

 

3. Test the configuration by typing

postmap -q (EMailAddress)@pretendco.net ldap:/etc/postfix/ldap-groups.cf

where (EmailAddress)@pretendco.net is the group email address. You should see a list of the users belonging to the group.

 

4. Edit the file /Library/Server/Mail/Config/postfix/main.cf and put the following two lines at the end

virtual_maps = ldap:/etc/postfix/ldap-groups.cf

virtual_alias_maps = $virtual_maps

 

5. Restart postfix

sudo postfix reload