How do I install Mailman in a Postfix system?
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Postfix
- Mailman
Issue
- How do I install the Mailman list administrator in a server that has Postfix as its default MTA?
Resolution
NOTICE: This article assumes that you have an already-configured and working postfix server.
- Install the Apache httpd and Mailman packages:
# yum install httpd mailman
- Stop the involved services:
RHEL 5, 6
# service httpd stop # service sendmail stop # service postfix stop # service mailman stop
RHEL 7, 8# systemctl stop httpd # systemctl stop postfix # systemctl stop mailman
- Remove from your system the sendmail package:
RHEL 5, 6# yum remove sendmail
- Edit /usr/lib/mailman/Mailman/mm_cfg.py and append the following line to the end of file:
MTA = 'Postfix'
- cd to directory /usr/lib/mailman/bin and initialize the aliases database:
# ./genaliases
- Fix mailman permissions in aliases database:
# chmod 660 /etc/mailman/aliases*
- Define an administrator password for mailman:
# ./mmsitepass my_admin_passwd
- Create the default Mailman list (it must exist). Change the parameters mailman.admin@mylistserver.com and the my_admin_password, to suit your email address and mailman admin password.
# ./newlist mailman mailman.admin@mylistserver.com my_admin_passwd
- Edit /etc/postfix/main.cf and change the line alias_maps to:
alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases
- Start and enable your Apache httpd.
RHEL 5, 6
# chkconfig httpd on # service httpd start
RHEL 7, 8
# systemctl enable httpd # systemctl start httpd
- Start and enable your Postfix
RHEL 5, 6
# chkconfig postfix on # service postfix start
RHEL 7, 8
# systemctl enable postfix # systemctl start postfix
- Start and enable your Mailman
RHEL 5, 6# chkconfig mailman on # service mailman start
RHEL 7, 8
# systemctl enable mailman # systemctl start mailman
- You can administer your lists at the URL http://mylistserver.com/mailman/admin
Root Cause
- Mailman have default settings for Sendmail integration
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments