1 Installing the Mailing list program
Apt-get Install Mailman
2 Modify configuration/etc/mailman/mm_cfg.py This server uses exim4 as mail Service
Default_email_host = ' lists.mydomain.com '
Default_url_host = ' www.mydomain.com '
MTA = None
3 Add a default mailing list
NewList Mailman
4 Set up mailing list Administrator account
Mmsitepass
5 Setting up Web Access increases in the Apache configuration file:
代码:
ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
Alias /pipermail/ /var/lib/mailman/archives/public/
RedirectMatch ^/*$ http://www.mydomain.com/mailman/listinfo
<Directory "/var/lib/mailman/archives/public/">
AddDefaultCharset Off
</Directory>
<Directory "/usr/lib/cgi-bin/mailman/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
Using http://www.mydomain.com/to access
6 Modifying EXIM4 configuration
Increase:
Mm_home=/var/lib/mailman
Mm_uid=list
Mm_gid=list
DomainList mm_domains=lists.mydomain.com
Mm_wrap=mm_home/mail/mailman
MM_LISTCHK=MM_HOME/LISTS/${LC:: $local _PART}/CONFIG.PCK
Increase Router:
代码:
mailman_router:
driver = accept
domains = +mm_domains
require_files = MM_LISTCHK
local_part_suffix_optional
local_part_suffix = -admin :
-bounces : -bounces+* :
-confirm : -confirm+* :
-join : -leave :
-owner : -request :
-subscribe : -unsubscribe
transport = mailman_transport
Increase Transport:
代码:
mailman_transport:
driver = pipe
command = MM_WRAP
'${if def:local_part_suffix
{${sg{$local_part_suffix}{-(\w+)(\+.*)?}{$1}}}
{post}}'
$local_part
current_directory = MM_HOME
home_directory = MM_HOME
user = MM_UID
group = MM_GID
Perform/etc/init.d/exim4 reload
Check:
代码:
# exim4 -bt test@lists.mydomain.com
test@lists.mydomain.com
router = mailman_router, transport = mailman_transport
7 Modify Admin Forwarding account number
Modify/etc/aliases Add:
Mailman:root
Mailman-owner:mailman
The execution newaliases has been added to completion.
8 Start Mailman
/etc/init.d/mailman start
9 Start a scheduled task
Cd/usr/lib/mailman/cron
Crontab crontab.in
All right, finish it!