Basic mailman server configuration with postfix
From Notes_Wiki
<yambe:breadcrumb>Mailman_server_configuration|Mailman server configuration</yambe:breadcrumb>
Basic mailman server configuration with postfix
One can setup a local mailman server to support mailing lists using following steps:
- Install mailman using 'yum -y install mailman'
- Install and configure apache as desired. For example for HTTPS install mod_ssl and edit '/etc/httpd/conf.d/ssl.conf' appropriately.
- Edit '/etc/httpd/conf.d/mailman.conf' and uncomment "RedirectMatch ^/mailman[/]*$ /mailman/listinfo"
- Restart apache using 'service httpd restart'
- Enable apache to run on start-up using 'chkconfig httpd on'
- Set site wide admin password using '/usr/lib/mailman/bin/mmsitepass <password>'
- Configure mailman by editing '/etc/mailman/mm_cfg.py' as follows:
- Modify 'DEFAULT_URL_HOST' and set its value to " '<lists-server-fqdn>' " (enclosed in single quotes). For example lists.example.com.
- Modify 'DEFAULT_EMAIL_HOST' and set its value to " '<email-domain>' " (enclosed in single quotes). For example example.com.
- Append "MTA = 'Postfix' "
- Note that site specific config file is at "/usr/lib/mailman/Mailman/mm_cfg.py" and installation defaults are mentioned in "/usr/lib/mailman/Mailman/Defaults.py".
- Create mailman mailing list. This is absolutely necessary.
- /usr/lib/mailman/bin/newlist mailman
-
- Enter list admin email and list password as desired.
- Create test mailing list.
- /usr/lib/mailman/bin/newlist test
- Configure postfix by editing '/etc/postfix/main.cf' as follows:
- Append
- myhostname = <lists-server-fqdn>
- mydomain = <lists-server-fqdn>
- myorigin = $mydomain
- local_recipient_maps =
- append "recipient_delimiter = +"
- Replace
- inet_interfaces = all
- alias_maps = hash:/etc/aliases,hash:/etc/mailman/aliases
-
- (Do not add value to alias_database)
- and restart postfix
- Append
- Set proper permissions by running check_perms twice
- /usr/lib/mailman/bin/check_perms -f
- /usr/lib/mailman/bin/check_perms -f
- Start mailman service and enable on startup using:
- service mailman start
- chkconfig mailmain on
- Add members to test list using
- echo 'user1@example.com' > members.txt
- echo 'user2@example.com' > members.txt
- echo 'user3@example.com' > members.txt
- /usr/lib/mailman/bin/sync_members -f members.txt test
- /usr/lib/mailman/bin/list_members test
Access mailman web interface at http://<lists-server-fqdn>/mailman/
Public list archives are available at http://<lists-server-fqdn>/pipermail/
Converting list to private
To convert mailing list to private use following steps:
- Create a text file with line 'archive_private = 1'
- Run "/usr/lib/mailman/bin/config_list -i <text-file-path> <list-name>"
Most steps learned from http://www.yolinux.com/TUTORIALS/LinuxTutorialMailman.html
Learn more mailman command line admin tools from http://www.gnu.org/software/mailman/site.html
<yambe:breadcrumb>Mailman_server_configuration|Mailman server configuration</yambe:breadcrumb>