Configure Virtual Server as Mailman Server
-
Check if python is installed
rpm -qa | grep –I python -
tar –zxvf mailman-version.tgz
-
Add Mailman group and user
groupadd mailman
useradd -c “GNU Mailman” -s /sbin/nologin -M -g mailman mailman -
Create mailman folder in default prefix /usr/local/mailman
mkdir /usr/local/mailman
cd /usr/local/mailman/
chgrp mailman .
chmod a+rx,g+ws . -
Install Mailman from /usr/src/mailman-version
./configure –with-mail-gid=mail –with-cgi-gid=apache
make
make install -
Check and fix any permission error
Check file permission, /usr/local/mailman/bin/check_perms
Fix file permission error, /usr/local/mailman/bin/check_perms –f -
Add the following line in httpd.conf and restart httpd
<IfModule mod_alias.c>
ScriptAlias /mailman/ “/usr/local/mailman/cgi-bin/”
Alias /pipermail/ /usr/local/mailman/archives/public/
</IfModule>NameVirtualHost *:80
<VirtualHost *:80>
ServerName mailman.ywso.com
ServerAdmin support@1.com.my
DocumentRoot “/home/admin/web”
ErrorLog /etc/httpd/logs/admin_error_log
CustomLog /etc/httpd/logs/admin_access_log combined
… -
vi /usr/local/mailman/Mailman/mm_cfg.py
IMAGE_LOGOS = 0
SMTP_MAX_RCPTS = 0 -
Create a symbolic link to Mailman’s wrapper program
cd /etc/smrsh
ln -s /usr/local/mailman/mail/mailman mailman -
Start the Mailman qrunner
cp scripts/mailman /etc/init.d/mailman
chkconfig –add mailman
bin/mailmanctl start -
Create a site password
/usr/local/mailman/bin/mmsitepass <your-site-password> -
Create a list creator password
/usr/local/mailman/bin/mmsitepass -c <list-creator-password> -
Setup the following cron tasks from cron/crontab.in
# At 8AM every day, mail reminders to admins as to pending requests.
# They are less likely to ignore these reminders if they’re mailed
# early in the morning, but of course, this is local time… ;)
0 8 * * * /usr/bin/python -S /usr/local/mailman/cron/checkdbs
#
# At 9AM, send notifications to disabled members that are due to be
# reminded to re-enable their accounts.
0 9 * * * /usr/bin/python -S /usr/local/mailman/cron/disabled
#
# Noon, mail digests for lists that do periodic as well as threshhold delivery.
0 12 * * * /usr/bin/python -S /usr/local/mailman/cron/senddigests
#
# 5 AM on the first of each month, mail out password reminders.
0 5 1 * * /usr/bin/python -S /usr/local/mailman/cron/mailpasswds
#
# Every 5 mins, try to gate news to mail. You can comment this one out
# if you don’t want to allow gating, or don’t have any going on right now,
# or want to exclusively use a callback strategy instead of polling.
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/python -S /usr/local/mailman/cron/gate_news
#
# At 3:27am every night, regenerate the gzip’d archive file. Only
# turn this on if the internal archiver is used and
# GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py
27 3 * * * /usr/bin/python -S /usr/local/mailman/cron/nightly_gzip -
Create the first mailing list mailman as side-wide mailing list.
If you want the email hostname to be different from the one looked up by the DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST, you can specify them with newlist command in /usr/local/mailman/bin,
bin/newlist –urlhost=www.mydom.ain –emailhost=mydom.ain mailman
Eg,
Website Solution (http://www.1.com.my) would like to setup a mailing list to send out offers to all clients. The mailing list is hosted in a mailman server (mailman.ywso.com).Administrator at Website Solution would like to have the From field of all outgoing email to represent their company domain, so we choose mailing.1.com.my. The mailing list info and administration page can be accessible from http://mailing.1.com.my/mailman/…
-
Create A record for mailing.1.com.my that points to mailman server IP.
-
Create MX record for mailing.1.com.my, most mail servers do not deliver email to hostname without valid MX record.
-
Add mailing.1.com.my to /etc/mail/local-host-names if emailhost is different from the hostname of the mailman server.
-
You will need to update /etc/aliases to include new aliases for all newly created mailing list. Run newaliases to update sendmail aliases database.
To remove a list, use command bin/rmlist –a <newlist>
You will want to run the bin/fix_url.py to change the domain of any existing lists.
-
-
There is a convenient template for a generic site list in the installation directory, under data/sitelist.cfg. We can apply it to the newlist created.
bin/config_list -i data/sitelist.cfg <newlist>Apply these default setting into template:
msg_footer = “”"
[%(real_name)s site list]
[%(real_name)s@%(host_name)s]
[%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s]“”"digestable = 0
advertised = 0
private_roster = 2
default_member_moderation = 1
archive_private = 1 -
Using the mailman:
Admin Interface
http://<urlhost>/mailman/admin/<newlist>
Subscription windows
http://<urlhost>/mailman/listinfo/<newlist>
Email to owner of list
<newlist>-owner@<emailurl>Email to subscribe
<newlist>-subscribe@<emailurl> -
Backup Mailman
Backup configuration file of a list
bin/config_list -o <filename> <listname>Backup full member list with email and name
bin/list_members –f –o <filename> <listname>To restore a configuration file
bin/config_list -i <filename> <listname>To restore member list, please paste the content of full member list in the web admin interface.
-
remove all unwanted moderator request. Set crontab
rm -rf /usr/local/mailman/data/heldmsg* -
Add relay email address
vi /etc/mail/local-hosts-names
Add the related mailing address to new line
Example: mailing.1.com.myRestart sendmail
/etc/rc.d/init.d/sendmail restart
virtual server is only imaginery where we can only do the practice, run very slow also.
thanks