使用 mailman 架设邮件列表
发表于:2007-06-21来源:作者:点击数:
标签:
1 安装邮件列表程序 apt-get install mailman 2 修改配置 /etc/mailman/mm_cfg.py 此 服务器 采用exim4作为邮件服务 DEFAULT_EMAIL_HOST = 'lists.mydomain.com' DEFAULT_URL_HOST = 'www.mydomain.com' MTA = None 3 添加默认的邮件列表 newlist mailman 4
1 安装邮件列表程序 apt-get install mailman
2 修改配置 /etc/mailman/mm_cfg.py 此服务器采用exim4作为邮件服务 DEFAULT_EMAIL_HOST = 'lists.mydomain.com' DEFAULT_URL_HOST = 'www.mydomain.com' MTA = None
3 添加默认的邮件列表 newlist mailman
4 设置邮件列表管理员帐号 mmsitepass
5 设置网页访问在apache的配置文件中增加:
代码: |
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> | 使用 http://www.mydomain.com/ 来访问
6 修改exim4配置 增加: 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
增加router:
代码: |
mailman_router: driver = aclearcase/" target="_blank" >ccept 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 |
增加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 |
执行 /etc/init.d/exim4 reload
校验:
代码: |
# exim4 -bt test@lists.mydomain.com test@lists.mydomain.com router = mailman_router, transport = mailman_transport |
7 修改管理转发帐号 修改 /etc/aliases 增加: mailman: root mailman-owner: mailman
执行newaliases增加完毕。
8 启动mailman /etc/init.d/mailman start
9 启动计划任务 cd /usr/lib/mailman/cron crontab crontab.in
好了完成!
|
原文转自:http://www.ltesting.net