Use mailman to set up a mail list

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.