Home > World Of ICT > Membangun Mailing List manager dengan Mailman dan FreeBSD

Membangun Mailing List manager dengan Mailman dan FreeBSD

Mailman merupakan Software pengelolaan arsip mailing list mail terpopuler yang bersifat open source dan dapat berjalan pada lingkungan Sistem Operasi Unix varian apapun, aplikasi ini dibangun menggunakan Script Python  dan compatibel dijalankan dengan MTA Postfix, Sendmail ataupun Qmail. Mengutip dari Official Site Mailman di alamat http://www.gnu.org/software/mailman/features.html , mailman memiliki segudang fitur sebagai berikut;

  • Through-the-web list creation and removal (with automatic support depending on the MTA)
  • Multi-lingual support: list web pages and email notices can be in any of nearly two dozen supported language, configurable per-site, per-list, and per-user
  • “Real name” support for members
  • Much better password-less operation for simple user tasks.
  • Support for personalized deliveries and VERP-like message delivery for foolproof bounce detection
  • Emergency moderation
  • MIME-based content filtering, with demime/stripmime like options
  • Regular expression based topic filtering
  • Better membership management, including searching
  • Re-organized administrative requests pages
  • Moderated newsgroup support
  • A new architecture for the mail delivery subsystem, removing the dependence on cron, for better responsiveness and scalability
  • New moderation and privacy controls
  • Invitations
  • Autoresponse governors
  • Users can now change some of their delivery options globally, for all lists at a site, including their password, delivery status, real name, etc.
  • Much better MIME and I18n support in the archiver
  • A separate “list moderator” role has been added
  • Urgent: header support (bypasses digests to reach all users immediately).
  • Web based list administration for nearly all tasks, including list configuration, moderation (post approvals), management of user accounts.
  • Web based subscribing and unsubscribing, and user configuration management. Users can temporarily disable their accounts, select digest modes, hide their email addresses from other members, etc.
  • A customizable home page for each mailing list.
  • Per-list privacy features, such as closed-subscriptions, private archives, private membership rosters, and sender-based posting rules.
  • Configurable (per-list and per-user) delivery mode
    • Regular (immediate) delivery
    • MIME digest
    • Plain (RFC 1153) digests
  • Integrated bounce detection within an extensible framework. Automatic disposition of bouncing addresses (disable, unsubscribe).
  • Integrated spam filters
  • Built-in web-based archiving, with hooks for external archivers such as MHonArc.
  • Integrated Usenet gatewaying.
  • Integrated auto-replies.
  • Majordomo-style email based commands.
  • Multiple list owners and moderators are possible.
  • Support for virtual domains.
  • Runs on GNU/Linux and most Un*x-like systems, compatible with most web servers and browsers, and most SMTP servers. Requires Python 2.1.3 or newer.
  • An extensible mail delivery pipeline.
  • High-performance mail delivery, with a scalable architecture.

Fitur-fitur diataslah yang menjadikan Mailman sebagai pilihan mailing list manager terfavorit saat ini. Sekarang saya akan bahas secara detail langkah langkah yang anda musti lakukan apabila ingin membangun mailing list manager sendiri menggunakan mailman.

1.  Pastikan bahwa sistem operasi telah berjalan dengan baik, dan telah terkoneksi dengan baik ke internet (pada kasus ini saya menggunakan Sistem Operasi FreeBSD 9.0 Release).

groups# uname -a
FreeBSD groups.lapan.go.id 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

groups# cat /etc/hosts
::1                            localhost localhost.lapan.go.id               localhost localhost.lapan.go.id          groups.lapan.go.id groups

groups# ping www.google.com
PING www.l.google.com ( 56 data bytes
64 bytes from icmp_seq=0 ttl=56 time=29.081 ms
64 bytes from icmp_seq=1 ttl=56 time=29.823 ms
64 bytes from icmp_seq=2 ttl=56 time=28.934 ms
— www.l.google.com ping statistics —
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 28.934/29.279/29.823/0.389 ms

2. Pastikan bahwa record address (A) dan mail exchanger (MX) telah dikenali dengan baik di internet.

Default Server:  UnKnown


> set type=any
> groups.lapan.go.id
Server:  UnKnown

Non-authoritative answer:
groups.lapan.go.id      MX preference = 10, mail exchanger = groups.lapan.go.id
groups.lapan.go.id      internet address =

3. Install MailmanMailing list manager.

groups# cd /usr/ports/mail/mailman/
groups# make config

groups# make MAIL_GID=mailman install clean
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for mailman-2.1.14_5

You may change the following build options:
MM_USERNAME=mailman     The username of the Mailman user.
MM_USERID=91            The user ID of the Mailman user.
MM_GROUPNAME=mailman    The group to which the Mailman user will belong.
MM_GROUPID=MM_USERID    The group ID for the Mailman user.
MM_DIR=mailman          Mailman will be installed in /usr/local/mailman.
CGI_GID=www             The group name or id under which your web server executes CGI scripts.
IMGDIR=www/icons        Icon images will be installed in /usr/local/www/icons.

===>  Extracting for mailman-2.1.14_5
=> SHA256 Checksum OK for mailman/mailman-2.1.14.tgz.

4.  Install Aplikasi MTA,  Postfix.

groups# cd /usr/ports/mail/postfix
groups# make config

groups# make install clean
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for postfix-2.8.7,1
===>  Extracting for postfix-2.8.7,1
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for postfix-2.8.7,1
=> SHA256 Checksum OK for postfix/postfix-2.8.7.tar.gz.
===>   postfix-2.8.7,1 depends on file: /usr/local/bin/perl5.12.4 – found
===>  Patching for postfix-2.8.7,1
===>   postfix-2.8.7,1 depends on file: /usr/local/bin/perl5.12.4 – found

5.  Install Aplikasi WebServer Apache.

groups# cd /usr/ports/www/apache22
groups# make config

groups# make install clean

To enable a module category: WITH_<CATEGORY>_MODULES
To disable a module category: WITHOUT_<CATEGORY>_MODULES

Per default categories are:
Categories available:

To see all available knobs, type make show-options
To see all modules in different categories, type make show-categories
You can check your modules configuration by using make show-modules

===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for apache-2.2.21
===>  Extracting for apache-2.2.21

6.  Konfigurasi MTA-Postfix.

  • groups# vi /usr/local/etc/postfix/main.cf (Tambahkan line dibawah).

myhostname = groups.lapan.go.id
unknown_local_recipient_reject_code = 550
alias_maps = hash:/usr/local/mailman/data/aliases
relay_domains = groups.lapan.go.id
mynetworks =,,

  • groups#postmap /usr/local/mailman/data/aliases

Pastikan postfix dijalankaan pada start-up

Tambahkan postfix_enable=”YES” pada /etc/rc.conf

7. Konfigurasi Mailman.

  • Tambahkan parameter berikut

groups# vi /usr/local/mailman/mailman/mm_cfg.py

# Put YOUR site-specific settings below this line.

MTA = ‘Postfix’
POSTFIX_STYLE_VIRTUAL_DOMAINS = [‘groups.lapan.go.id’]

  • groups# /usr/local/mailman/bin/genaliases (untuk mengenerate alias).
  • Pastikan Owner mailman telah sesuai.
    • groups#cd /usr/local/mailman/data
    • groups#chown mailman aliases aliases.db
    • groups#chmod g+w aliases aliases.db
  • Membuat mailinglist baru dengan nama mailman
    • groups# /usr/local/mailman/bin/newlist mailman
      Enter the email of the person running the list: fahmialusi@lapan.go.id
      Initial mailmannew password:
      Hit enter to notify mailmannew owner…
    • groups#/usr/local/mailman/bin/config_list -i /usr/local/mailman/data/sitelist.cfg mailman
  • Apabila ingin membuat mailinglist baru langsung mengarahkan ke host tertentu bisa dilakukan dengan cara berikut.
    • groups# /usr/local/mailman/bin/newlist –urlhost=groups.lapan.go.id    –emailhost=groups.lapan.go.id  mailman
  • Buat cronjob untuk mailman:
    •     groups# cd /usr/local/mailman/cron
          groups# crontab -u mailman crontab.in
  • Perintah ini akan bermanfaat untuk merubah url name pada milis

groups# /usr/local/mailman/bin/withlist -l -r fix_url mailman –urlhost=groups.lapan.go.id

8.  Konfigurasi Apache agar bisa memanage mailman via webbase.

groups# vi /usr/local/etc/apache22/httpd.conf
# Virtual hosts
Include etc/apache22/extra/httpd-vhosts.conf

groups# vi /usr/local/etc/apache22/extra/httpd-vhosts.conf
<VirtualHost *:80>
    ServerName www.groups.lapan.go.id
    ServerAlias groups.lapan.go.id
    ServerAdmin webmaster@unila.ac.id
    DocumentRoot /usr/local/www/apache22/data
    CustomLog /var/log/httpd-access.log combinedio
    ErrorLog /var/log/httpd-error.log
    <Directory “/usr/local/www/apache22/data”>
        AllowOverride All
        Options Indexes FollowSymLinks MultiViews
        Order allow,deny
        Allow from all

    ScriptAlias /mailman   “/usr/local/mailman/cgi-bin”
    Alias       /pipermail “/usr/local/mailman/archives/public”
    <Directory “/usr/local/mailman”>
        AllowOverride All
        Options Indexes FollowSymLinks MultiViews
        Order allow,deny
        Allow from all

   ScriptAlias /cgi-bin/ /usr/local/www/cgi-bin/

    <Directory “/usr/local/www/cgi-bin”>
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all

9. Check web mailman.


10. Beres.

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.