Mailman

Mailman adalah program open source untuk mengelola diskusi surat elektronik dan daftar e-newsletter. Kebanyakan milis open source (termasuk seluruh milis Ubuntu) menggunakan Mailman sebagai perangkat lunak untuk milis mereka. Mailman sangat handal dan mudah untuk diinstal dan dikelola.

Instalasi

Mailman provides a web interface for the administrators and users. So, it requires apache with mod_perl support. Mailman uses an external mail server to send and receive emails. It works perfectly with the following mail servers:

  • Postfix

  • Exim

  • Sendmail

  • Qmail

We will see how to install mailman, the apache web server and the Exim mail server. If you wish to install mailman with a different mail server, please refer to the references section.

Apache2

Untuk menginstal apache2 silakan lihat bagian Instalasi HTTPD untuk keterangan lebih detail.

Exim4

Untuk menginstal Exim4 jalankan perintah berikut pada terminal prompt:

sudo apt-get install exim4
sudo apt-get install exim4-base
sudo apt-get install exim4-config

Setelah exim4 terinstal, berkas konfiguration akan disimpan dalam direktori /etc/exim4. Di Ubuntu, default-nya, berkas konfigurasi exim4 terbagi ke dalam beberapa berkas yang berbeda. Anda dapat mengubah kebiasaan ini dengan mengubah variabel berikut dalam berkas /etc/exim4/update-exim4.conf:

  • dc_use_split_config='true'

Mailman

Untuk menginstal Mailman, jalankan perintah berikut pada terminal prompt:

sudo apt-get install mailman 

Instalasi akan menyalin berkas instalasi dalam direktori /var/lib/mailman. Menginstal skrip CGI dalam direktori /usr/lib/cgi-bin/mailman. Akan membuat pengguna list. Akan membuat grup list. Proses mailmain akan dimiliki oleh pengguna tersebut.

Konfigurasi

Bagian ini mengasumsikan bahwa Anda telah berhasil menginstal mailman, apache2, dan exim4. Sekarang Anda harus mengkonfigurasinya.

Apache2

Once apache2 is installed, you can add the following lines in the /etc/apache2/apache2.conf file:

Alias /images/mailman/ "/usr/share/images/mailman/"
Alias /pipermail/ "/var/lib/mailman/archives/public/"

Mailman uses apache2 to render its CGI scripts. The mailman CGI scripts are installed in the /usr/lib/cgi-bin/mailman directory. So, the mailman url will be http://hostname/cgi-bin/mailman/. You can make changes to the /etc/apache2/apache2.conf file if you wish to change this behavior.

Exim4

Once Exim4 is installed, you can start the Exim server using the following command from a terminal prompt:

sudo apt-get /etc/init.d/exim4 start

In order to make mailman work with exim4, you need to configure exim4. As mentioned earlier, by default, exim4 uses multiple configuration files of different types. For details, please refer to the Exim website. To run mailman, we should add new a configuration file to the following configuration types:

  • Main

  • Transport

  • Router

Exim creates a master configuration file by sorting all these mini configuration files. So, the order of these configuration files is very important.

Main

All the configuration files belonging to the main type are stored in the /etc/exim4/conf.d/main/ directory. You can add the following content to a new file, named 04_exim4-config_mailman:

# start
# Home dir for your Mailman installation -- aka Mailman's prefix
# directory.
# On Ubuntu this should be "/var/lib/mailman"
# This is normally the same as ~mailman
MM_HOME=/var/lib/mailman
#
# User and group for Mailman, should match your --with-mail-gid
# switch to Mailman's configure script.  Value is normally "mailman"
MM_UID=list
MM_GID=list
#
# Domains that your lists are in - colon separated list
# you may wish to add these into local_domains as well
domainlist mm_domains=hostname.com
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
# These values are derived from the ones above and should not need
# editing unless you have munged your mailman installation
#
# The path of the Mailman mail wrapper script
MM_WRAP=MM_HOME/mail/mailman
#
# The path of the list config file (used as a required file when
# verifying list addresses)
MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck
# end

Transport

All the configuration files belonging to transport type are stored in the /etc/exim4/conf.d/transport/ directory. You can add the following content to a new file named 40_exim4-config_mailman:

  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

Router

All the configuration files belonging to router type are stored in the /etc/exim4/conf.d/router/ directory. You can add the following content in to a new file named 101_exim4-config_mailman:

  mailman_router:
   driver = accept
   require_files = MM_HOME/lists/$local_part/config.pck
   local_part_suffix_optional
   local_part_suffix = -bounces : -bounces+* : \
                       -confirm+* : -join : -leave : \
                       -owner : -request : -admin
   transport = mailman_transport

[Awas]

The order of main and transport configuration files can be in any order. But, the order of router configuration files must be the same. This particular file must appear before the 200_exim4-config_primary file. These two configuration files contain same type of information. The first file takes the precedence. For more details, please refer to the references section.

Mailman

Once mailman is installed, you can run it using the following command:

sudo /etc/init.d/mailman start

Once mailman is installed, you should create the default mailing list. Run the following command to create the mailing list:

sudo /usr/sbin/newlist mailman

  Enter the email address of the person running the list: bhuvan at ubuntu.com
  Initial mailman password:
  To finish creating your mailing list, you must edit your /etc/aliases (or
  equivalent) file by adding the following lines, and possibly running the
  `newaliases' program:

  ## mailman mailing list
  mailman:              "|/var/lib/mailman/mail/mailman post mailman"
  mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
  mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
  mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
  mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
  mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
  mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
  mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
  mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
  mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

  Hit enter to notify mailman owner...

  # 

We have configured exim to recognize all emails from mailman. So, it is not mandatory to make any new entries in /etc/aliases. If you have made any changes to the configuration files, please ensure that you restart those services before continuing to next section.

Administrasi

We assume you have a default installation. The mailman cgi scripts are still in the /usr/lib/cgi-bin/mailman/ directory. Mailman provides a web based administration facility. To access this page, point your browser to the following url:

http://hostname/cgi-bin/mailman/admin

The default mailing list, mailman, will appear in this screen. If you click the mailing list name, it will ask for your authentication password. If you enter the correct password, you will be able to change administrative settings of this mailing list. You can create a new mailing list using the command line utility (/usr/sbin/newlist). Alternatively, you can create a new mailing list using the web interface.

Pengguna

Mailman menyediakan antarmuka untuk pengguna yang berbasis web. Untuk mengakses halaman ini, arahkan browser Anda ke url berikut:

http://hostname/cgi-bin/mailman/listinfo

The default mailing list, mailman, will appear in this screen. If you click the mailing list name, it will display the subscription form. You can enter your email address, name (optional), and password to subscribe. An email invitation will be sent to you. You can follow the instructions in the email to subscribe.

Referensi

GNU Mailman - Manual Instalasi

HOWTO - Menggunakan Exim 4 dan Mailman 2.1 secara bersamaan