Exim4 + Mailman as Mailing List Manager on Debian

Wpis zamieszczony o 11:02:55, 13 maja 2007 Trackback


So, let's say you are a Debian server administrator and you want to set up a mailing list for your users. You have already configured Exim4 as MTA and installed Mailman from offical repositories. With smile on face you are sending a message on {list}@{server} and...

 pipe to |/var/lib/mailman/mail/mailman post ...
    generated by .......
    local delivery failed

The following text was generated during the delivery attempt:

------ pipe to |/var/lib/mailman/mail/mailman post ...
       generated by ....------

Group mismatch error.  Mailman expected the mail
wrapper script to be executed as group "daemon", but
the system's mail server executed the mail script as
group "Debian-exim".  Try tweaking the mail server to run the
script as group "daemon", or re-run configure, 
providing the command line option `--with-mail-gid=Debian-exim'.

This is a well known problem with group permissions. Forums all over the world explain the problem but none of those have right clues to deal with it.

In short words - it is a bug in Debian package. Maintainer of mailman-2.1.9 somehow forgot to change default group of mailman from "deamon" to "Debian-exim" (which is required by Exim4 to recognize Mailman and deal with pipe of messages encoded in /etc/aliases). Also - I really do not know why packager set default path to /var/lib! The way to solve it is recompiling Mailman with option:
--with-mail-gid=Debian-exim
..but, wait a minute. The default path of Debian's mailman is not compatible with default path of source package. Changing the path with configure options is really bad idea.

Few minutes ago I finally got over it. Path of mailman source local installation is /usr/local/mailman, so we must manually override some starting scripts of mailman. Here's a solution. Right when we configure, make and make install our new Mailing List Manager we must create a init.d script for running it with correct permissions.

#!/bin/bash

echo "Starting mailman..."
su mailman -c 'python mailmanctl -s -q start' &
sleep 1
su mailman -c 'python /usr/local/mailman/bin/qrunner --runner=ArchRunner:0:1 -s' &
su mailman -c 'python /usr/local/mailman/bin/qrunner --runner=BounceRunner:0:1 -s' &
su mailman -c 'python /usr/local/mailman/bin/qrunner --runner=CommandRunner:0:1 -s' &
su mailman -c 'python /usr/local/mailman/bin/qrunner --runner=IncomingRunner:0:1 -s' &
su mailman -c 'python /usr/local/mailman/bin/qrunner --runner=NewsRunner:0:1 -s' &
su mailman -c 'python /usr/local/mailman/bin/qrunner --runner=OutgoingRunner:0:1 -s' &
su mailman -c 'python /usr/local/mailman/bin/qrunner --runner=VirginRunner:0:1 -s' &
su mailman -c 'python /usr/local/mailman/bin/qrunner --runner=RetryRunner:0:1 -s' &


Remember! Run "newlist" directly from /usr/local/mailman/bin to create lists (not command "newlist" from default path /usr/bin!) and don't forget to run "newaliases" after modifying /etc/aliases. Also, you have to configure your httpd.conf for cgi-bin scripts which is provider with mailman source package.

ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
<Directory /usr/local/mailman/cgi-bin/>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>
Alias /pipermail/ /usr/local/mailman/archives/public/
<Directory /usr/local/mailman/archives/public>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
Alias /mmimages/ /usr/share/doc/mailman/images/
<Directory /usr/share/doc/mailman/images>
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

After that, restart apache and mailman (with your changed script!). Now your Web Control Panel is fully configured and set up. Add subscribers and enjoy it! :)

Other way to solve the problem is contact maintainer of package mailman or build our own package mailman-exim4-2.1.9. I will try to do both.

At last - please contact me if you encountered the same problem. I realize that this mini-solution is not a full HowTo. A bunch of links that helped me or point me at good way to look:
http://www.exim.org/howto/mailman.html"
http://tectonic.co.za/view.php?id=538
http://mail.python.org/pipermail/mailman-users/2004-January/033817.html
http://archives.free.net.ph/message/20070306.165258.c83599e1.en.html

Komentarze do “Exim4 + Mailman as Mailing List Manager on Debian”


  1. Ciekawy artykuł tylko że.... czemu po angielsku :D?


  2. Jak napisałem, ten błąd jest obecny wszędzie, na całym świecie ludzie borykają się z nim i mają naprawdę duże problemy (na listach dyskusyjnych często nie ma odpowiedzi na niego!). Chciałem pomóc większej ilości ludzi, nie tylko rodakom.

    Jeśli ktoś ma poważne problemy ze zrozumieniem treści (gdyż jak napisałem - nie jest to poradnik "za rączkę") a napotkał taki problem - napisałem na samym końcu poradnika aby nie bać się do mnie napisać :-) Pomogę, sam straciłem za dużo czasu nad tym...

    ps. w końcu wróciłem do żywych :D


  3. Miło Cię... czytać ^^


  4. Nareszcie nowy wpis! Wierzę, że wielu osobom pomoże. Już się zaczynałem martwić, że coś się stało i dlatego nie piszesz.


  5. alternatywne i chyba prostrze rozwiazanie tego problemu to zdefiniowanie osobnego pliku aliasow dla mailmana wraz z osobnym wpisem routers w exim.conf i ustawienie w tym wpisie: "group = daemon"

    pre.
    mailman_aliases_route:
    driver = redirect
    domains = +local_domains
    allow_fail
    allow_defer
    data = ${lookup{$local_part}lsearch{/etc/mail/mailman}}
    group = daemon
    file_transport = address_file
    pipe_transport = address_pipe
    reply_transport = address_reply

Dodaj komentarz

Textile jest włączony. Zobacz składnię (wiki.jogger.pl)

code