Mailman

Aus crazylinux.de
Zur Navigation springen Zur Suche springen

Mailman is free software for managing electronic mail discussion and e-newsletter lists. Mailman is integrated with the web, making it easy for users to manage their accounts and for list owners to administer their lists. Mailman supports built-in archiving, automatic bounce processing, content filtering, digest delivery, spam filters, and more. See the features page for details.

Mailman is free software, distributed under the GNU General Public License. Mailman is written in the Python programming language, with a little bit of C code for security.

http://www.gnu.org/software/mailman/

Using mailman with postfix

#/etc/postfix/main.cf
transport_maps = btree:/etc/postfix/maps/transport

#mailman
relay_recipient_maps = btree:/var/lib/mailman/data/aliases
mailman_destination_recipient_limit = 1


#/etc/postfix/master.cf
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}


#/etc/postfix/maps/transport
lists.domain.tld     mailman:

add mailman aliases to Makefile, so postmap will automatically create hashes

#/etc/postfix/Makefile for postfix maps
POSTMAP = /usr/sbin/postmap
BTREE = \
        /etc/postfix/maps/access_recipient-rfc.db \
        /etc/postfix/maps/access_client.db \
        /etc/postfix/maps/access_helo.db \
        /etc/postfix/maps/access_sender.db \
        /etc/postfix/maps/access_recipient.db \
        /etc/postfix/maps/transport.db \
        /var/lib/mailman/data/aliases.db
...

Some words about /var/lib/mailman/data/aliases and aliases.db. Usually you add/edit mailinglists with a web gui which runs under the account of your webserver, e.g. www-data. So www-data needs rights on aliases as well as mailman itself, which runs under an own account e.g. list. Furthermmore postfix needs also access to read the aliases and to write the hash file (via postmap/make).

#ls -l /var/lib/mailman/data/aliases*
-rw-rw----  1 www-data list     2774 Apr 13 18:26 aliases
-rw-rw----+ 1 list     postfix  8192 Apr 13 18:26 aliases.db


# getfacl /var/lib/mailman/data/aliases.db 

# file: var/lib/mailman/data/aliases.db
# owner: list
# group: postfix
user::rw-
user:www-data:rw-
group::rw-
mask::rw-


#sample aliases
# STANZA START: testlist
# CREATED: Tue Oct 23 20:30:25 2012
testlist:             "|/var/lib/mailman/mail/mailman post testlist"
testlist-admin:       "|/var/lib/mailman/mail/mailman admin testlist"
testlist-bounces:     "|/var/lib/mailman/mail/mailman bounces testlist"
testlist-confirm:     "|/var/lib/mailman/mail/mailman confirm testlist"
testlist-join:        "|/var/lib/mailman/mail/mailman join testlist"
testlist-leave:       "|/var/lib/mailman/mail/mailman leave testlist"
testlist-owner:       "|/var/lib/mailman/mail/mailman owner testlist"
testlist-request:     "|/var/lib/mailman/mail/mailman request testlist"
testlist-subscribe:   "|/var/lib/mailman/mail/mailman subscribe testlist"
testlist-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe testlist"
# STANZA END: testlist



Create mail aliases to enable your maillist

In order to use your maillinglist, you have to create aliases. E.g.

testlist@mydomain.tld ->testlist@lists.domain.tld (remember transport file ;-)
testlist-admin@mydomain.tld ->testlist@lists.domain.tld
testlist-subscribe@mydomain.tld ->testlist@lists.domain.tld
testlist-subscribe@mydomain.tld ->testlist@lists.domain.tld
and so on....

VboxAdm can do this automatically for you (Add new aliases, checkbox mailman)

Links