CentOS Stream 8
Sponsored Link

Mail Server : Install Mailman2021/03/16

 
Install [Mailman] which is the mailing list management tool.
[1]
[2]
[3] Install Mailman.
[root@mail ~]#
dnf module -y install mailman
[root@mail ~]#
vi /etc/mailman/mm_cfg.py
# line 86 : change to your hostname (with FQDN)

DEFAULT_URL_HOST =
'mail.srv.world'

DEFAULT_EMAIL_HOST =
'mail.srv.world'
[root@mail ~]#
vi /usr/lib/mailman/Mailman/Defaults.py
# line 509 : change default MTA

MTA = '
Postfix
'
# line 988 : change to your language

DEFAULT_SERVER_LANGUAGE = '
ja
'
# line 1024 : change if you need

OWNERS_CAN_DELETE_THEIR_OWN_LISTS =
Yes
# line 1251 : change if you need

# set action when peopel who are not list member send to mailing list

# 0 = Accept

# 1 = Hold

# 2 = Reject

# 3 = Discard

DEFAULT_GENERIC_NONMEMBER_ACTION = 1
# line 1313 : change if you need

# 0 - Reply-To: not munged

# 1 - Reply-To: set back to the list

# 2 - Reply-To: set to an explicit value (reply_to_address)

DEFAULT_REPLY_GOES_TO_LIST = 0
# generate alias file

[root@mail ~]#
/usr/lib/mailman/bin/genaliases

# set Mailman admin password

[root@mail ~]#
/usr/lib/mailman/bin/mmsitepass

New site password:
Again to confirm password:
Password changed.
# check permissions

[root@mail ~]#
/usr/lib/mailman/bin/check_perms

/usr/lib/mailman/Mailman/mm_cfg.pyc bad group (has: root, expected mailman)
.....
.....
# improve permissions with option [-f]

[root@mail ~]#
/usr/lib/mailman/bin/check_perms -f

[root@mail ~]#
/usr/lib/mailman/bin/check_perms

No problems found
# improve other permissions

[root@mail ~]#
chown apache /etc/mailman/aliases

[root@mail ~]#
chmod 664 /etc/mailman/aliases*

[root@mail ~]#
chmod 2775 /etc/mailman

# create administrative list [mailman]

[root@mail ~]#
/usr/lib/mailman/bin/newlist mailman

Enter the email of the person running the list:
mailman@mail.srv.world

Initial mailman password:
Hit enter to notify mailman owner...
[root@mail ~]#
systemctl enable --now mailman
[4] Configure Postfix.
[root@mail ~]#
vi /etc/postfix/main.cf
# line 405 : add

alias_maps = hash:/etc/aliases,
hash:/etc/mailman/aliases
# line 416 : add

alias_database = hash:/etc/aliases,
hash:/etc/mailman/aliases
[root@mail ~]#
systemctl restart postfix httpd
[5] Access to the [(Server's hostname or IP address)/mailman/admin] from any client computer, then, Mailman admin site is displayed.
[6] Click [create a new mailing list], then registration form is shown like follows.
[Initial list password] is the password which owner of this mailing list can manage settings.
[7] [List creatoer's password] is the one which you added in [3] section as Mailman admin password.
[8] After successfully created, notification email is sent to mailing list owner's address.
[9] New mailing list is shown on the list.
Matched Content