Article title: use mailman to set up the mail list. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. install the mail list program
Apt-get install mailman
2. modify/etc/mailman/mm_cfg.py. This server uses exim4 as the mail service.
DEFAULT_EMAIL_HOST = 'lists .mydomain.com'
DEFAULT_URL_HOST = 'www .mydomain.com'
MTA = None
3. add the default email list
Newlist mailman
4. set the email list administrator account
Mmsitepass
5. add the following content to the apache configuration file:
| Code: |
ScriptAlias/mailman // usr/lib/cgi-bin/mailman/
Alias/pipermail // var/lib/mailman/archives/public/
RedirectMatch ^/* $ http://www.mydomain.com/mailman/listinfo
Adddefacharcharset Off
AllowOverride None
Options ExecCGI-MultiViews + SymLinksIfOwnerMatch
Order allow, deny
Allow from all
|
Use http://www.mydomain.com/to access
6. modify the exim4 configuration
Added:
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
Add a router:
| Code: |
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 |
Added transport:
| Code: |
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 |
Run/etc/init. d/exim4 reload
Verification:
| Code: |
# Exim4-bt test@lists.mydomain.com.
Test@lists.mydomain.com
Router = mailman_router, transport = mailman_transport |
7. modify the management forwarding account
Add/etc/aliases:
Mailman: root
Mailman-owner: mailman
The execution of newaliases has been added.
8. start mailman.
/Etc/init. d/mailman start
9 start a scheduled task
Cd/usr/lib/mailman/cron
Crontab. in
All done!