Skip to content

Configuring Virtual Server As Mailman Server

Configure Virtual Server as Mailman Server

  1. Check if python is installed
    rpm -qa | grep –I python

  2. tar –zxvf mailman-version.tgz

  3. Add Mailman group and user
    groupadd mailman
    useradd -c “GNU Mailman” -s /sbin/nologin -M -g mailman mailman

  4. Create mailman folder in default prefix /usr/local/mailman
    mkdir /usr/local/mailman
    cd /usr/local/mailman/
    chgrp mailman .
    chmod a+rx,g+ws .

  5. Install Mailman from /usr/src/mailman-version
    ./configure –with-mail-gid=mail –with-cgi-gid=apache
    make
    make install

  6. Check and fix any permission error
    Check file permission, /usr/local/mailman/bin/check_perms
    Fix file permission error, /usr/local/mailman/bin/check_perms –f

  7. Add the following line in httpd.conf and restart httpd

    <IfModule mod_alias.c>
    ScriptAlias /mailman/ “/usr/local/mailman/cgi-bin/”
    Alias /pipermail/ /usr/local/mailman/archives/public/
    </IfModule>

    NameVirtualHost *:80

    <VirtualHost *:80>

    ServerName mailman.ywso.com

    ServerAdmin support@1.com.my
    DocumentRoot “/home/admin/web”
    ErrorLog /etc/httpd/logs/admin_error_log
    CustomLog /etc/httpd/logs/admin_access_log combined

  8. vi /usr/local/mailman/Mailman/mm_cfg.py

    IMAGE_LOGOS = 0
    SMTP_MAX_RCPTS = 0

  9. Create a symbolic link to Mailman’s wrapper program
    cd /etc/smrsh
    ln -s /usr/local/mailman/mail/mailman mailman

  10. Start the Mailman qrunner
    cp scripts/mailman /etc/init.d/mailman
    chkconfig –add mailman
    bin/mailmanctl start

  11. Create a site password
    /usr/local/mailman/bin/mmsitepass <your-site-password>

  12. Create a list creator password
    /usr/local/mailman/bin/mmsitepass -c <list-creator-password>

  13. Setup the following cron tasks from cron/crontab.in

    # At 8AM every day, mail reminders to admins as to pending requests.
    # They are less likely to ignore these reminders if they’re mailed
    # early in the morning, but of course, this is local time… ;)
    0 8 * * * /usr/bin/python -S /usr/local/mailman/cron/checkdbs
    #
    # At 9AM, send notifications to disabled members that are due to be
    # reminded to re-enable their accounts.
    0 9 * * * /usr/bin/python -S /usr/local/mailman/cron/disabled
    #
    # Noon, mail digests for lists that do periodic as well as threshhold delivery.
    0 12 * * * /usr/bin/python -S /usr/local/mailman/cron/senddigests
    #
    # 5 AM on the first of each month, mail out password reminders.
    0 5 1 * * /usr/bin/python -S /usr/local/mailman/cron/mailpasswds
    #
    # Every 5 mins, try to gate news to mail. You can comment this one out
    # if you don’t want to allow gating, or don’t have any going on right now,
    # or want to exclusively use a callback strategy instead of polling.
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/python -S /usr/local/mailman/cron/gate_news
    #
    # At 3:27am every night, regenerate the gzip’d archive file. Only
    # turn this on if the internal archiver is used and
    # GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py
    27 3 * * * /usr/bin/python -S /usr/local/mailman/cron/nightly_gzip

  14. Create the first mailing list mailman as side-wide mailing list.

    If you want the email hostname to be different from the one looked up by the DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST, you can specify them with newlist command in /usr/local/mailman/bin,

    bin/newlist –urlhost=www.mydom.ain –emailhost=mydom.ain mailman

    Eg,
    Website Solution (http://www.1.com.my) would like to setup a mailing list to send out offers to all clients. The mailing list is hosted in a mailman server (mailman.ywso.com).

    Administrator at Website Solution would like to have the From field of all outgoing email to represent their company domain, so we choose mailing.1.com.my. The mailing list info and administration page can be accessible from http://mailing.1.com.my/mailman/…

    1. Create A record for mailing.1.com.my that points to mailman server IP.

    2. Create MX record for mailing.1.com.my, most mail servers do not deliver email to hostname without valid MX record.

    3. Add mailing.1.com.my to /etc/mail/local-host-names if emailhost is different from the hostname of the mailman server.

    4. You will need to update /etc/aliases to include new aliases for all newly created mailing list. Run newaliases to update sendmail aliases database.

    To remove a list, use command bin/rmlist –a <newlist>

    You will want to run the bin/fix_url.py to change the domain of any existing lists.

  15. There is a convenient template for a generic site list in the installation directory, under data/sitelist.cfg. We can apply it to the newlist created.
    bin/config_list -i data/sitelist.cfg <newlist>

    Apply these default setting into template:

    msg_footer = “”"
    [%(real_name)s site list]
    [%(real_name)s@%(host_name)s]
    [%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s]“”"

    digestable = 0
    advertised = 0
    private_roster = 2
    default_member_moderation = 1
    archive_private = 1

  16. Using the mailman:

    Admin Interface

    http://<urlhost>/mailman/admin/<newlist>

    Subscription windows

    http://<urlhost>/mailman/listinfo/<newlist>

    Email to owner of list
    <newlist>-owner@<emailurl>

    Email to subscribe
    <newlist>-subscribe@<emailurl>

  17. Backup Mailman

    Backup configuration file of a list
    bin/config_list -o <filename> <listname>

    Backup full member list with email and name
    bin/list_members –f –o <filename> <listname>

    To restore a configuration file
    bin/config_list -i <filename> <listname>

    To restore member list, please paste the content of full member list in the web admin interface.

  18. remove all unwanted moderator request. Set crontab
    rm -rf /usr/local/mailman/data/heldmsg*

  19. Add relay email address

    vi /etc/mail/local-hosts-names

    Add the related mailing address to new line
    Example: mailing.1.com.my

    Restart sendmail
    /etc/rc.d/init.d/sendmail restart

Categories: Lesson, Linux, Server, Solution, Web Hosting.

Comment Feed

One Response

  1. virtual server is only imaginery where we can only do the practice, run very slow also.
    thanks



Some HTML is OK

or, reply to this post via trackback.