Use mailman to set up mailing lists

Source: Internet
Author: User
Tags add mail modify access

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!



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.