HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Mailman lists do not work (http://www.howtoforge.com/forums/showthread.php?t=60996)

kainhofer 17th March 2013 22:40

Mailman lists do not work
 
I have the latest ISPconfig 3.0.5 installed on an Ubuntu 12.10 server, with Postfix 2.9.6, dovecot 1:2.1.7 and mailman 1:2.1.15 all installed from the stock ubuntu packages.

My problem (like several others on this forum) now is that none of the mailman lists that I created (through ISPConfig) work. In particular, whenever I try to send a mail to *-request@*, I get a "user unknown" error message back:

Code:

  The mail system
<ausschuss-request@kainhofer.com> (expanded from
    <ausschuss-request@jung-wien.at>): user unknown

The corresponding log entry in /var/log/mail.info is:

Code:

Mar 17 22:18:38 server postfix/submission/smtpd[17366]: connect from 178-191-238-22.adsl.highway.telekom.at[178.191.238.22]
Mar 17 22:18:39 server postfix/cleanup[17373]: warning: database /var/lib/mailman/data/virtual-mailman.db is older than source file /var/lib/mailman/data/virtual-mailman
Mar 17 22:18:39 server postfix/submission/smtpd[17366]: AC0283CC2B1D: client=178-191-238-22.adsl.highway.telekom.at[178.191.238.22], sasl_method=PLAIN, sasl_username=reinhold@kainhofer.com
Mar 17 22:18:39 server postfix/cleanup[17373]: AC0283CC2B1D: message-id=<5146332D.7080009@kainhofer.com>
Mar 17 22:18:39 server postfix/qmgr[17047]: AC0283CC2B1D: from=<reinhold@kainhofer.com>, size=1342, nrcpt=1 (queue active)
Mar 17 22:18:39 server postfix/submission/smtpd[17366]: disconnect from 178-191-238-22.adsl.highway.telekom.at[178.191.238.22]
Mar 17 22:18:40 server postfix/smtpd[17377]: warning: database /var/lib/mailman/data/virtual-mailman.db is older than source file /var/lib/mailman/data/virtual-mailman
Mar 17 22:18:40 server postfix/smtpd[17377]: connect from localhost[127.0.0.1]
Mar 17 22:18:40 server postfix/smtpd[17377]: 2AD163CC2B20: client=localhost[127.0.0.1]
Mar 17 22:18:40 server postfix/cleanup[17373]: 2AD163CC2B20: message-id=<5146332D.7080009@kainhofer.com>
Mar 17 22:18:40 server postfix/smtpd[17377]: disconnect from localhost[127.0.0.1]
Mar 17 22:18:40 server postfix/qmgr[17047]: 2AD163CC2B20: from=<reinhold@kainhofer.com>, size=1821, nrcpt=1 (queue active)
Mar 17 22:18:40 server amavis[13897]: (13897-05) Passed CLEAN {RelayedInbound}, [178.191.238.22]:42047 [178.191.238.22] <reinhold@kainhofer.com> -> <ausschuss-request@jung-wien.at>, Queue-ID: AC0283CC2B1D, Message-ID: <5146332D.7080009@kainhofer.com>, mail_id: b-vUbJYAC3yb, Hits: -0.999, size: 1342, queued_as: 2AD163CC2B20, 356 ms
Mar 17 22:18:40 server postfix/smtp[17374]: AC0283CC2B1D: to=<ausschuss-request@jung-wien.at>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.59, delays=0.22/0.01/0/0.36, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 2AD163CC2B20)
Mar 17 22:18:40 server postfix/qmgr[17047]: AC0283CC2B1D: removed
Mar 17 22:18:40 server dovecot: imap(reinhold@kainhofer.com): Disconnected: Disconnected in IDLE in=2063 out=10081
Mar 17 22:18:40 server postfix/pipe[17378]: 2AD163CC2B20: to=<ausschuss-request@kainhofer.com>, orig_to=<ausschuss-request@jung-wien.at>, relay=dovecot, delay=0.09, delays=0.04/0.01/0/0.04, dsn=5.1.1, status=bounced (user unknown)
Mar 17 22:18:40 server postfix/cleanup[17373]: 419393CC2B22: message-id=<20130317211840.419393CC2B22@server.kainhofer.com>
Mar 17 22:18:40 server postfix/bounce[17380]: 2AD163CC2B20: sender non-delivery notification: 419393CC2B22
Mar 17 22:18:40 server postfix/qmgr[17047]: 419393CC2B22: from=<>, size=3783, nrcpt=1 (queue active)
Mar 17 22:18:40 server postfix/qmgr[17047]: 2AD163CC2B20: removed


The aliases, transport-mailman and virtual-mailman files in /var/lib/mailman/data/ seem to be correct (contain the aliases and mailman commands for all lists and are owned by list, group list). I did exactly what http://www.howtoforge.com/forums/showthread.php?t=60394 suggested.

BTW, apparently the ISPConfig 3.0.5 does not create the correct /etc/mailman/virtual_to_transport.sh. Rather it appears to copy mm_cfg.py to virtual_to_transport.sh!!!.


The jung-wien.at domain is listed in mm_cfg.py in POSTFIX_STYLE_VIRTUAL_DOMAINS:
Code:

MTA='Postfix'
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['jung-wien.at']
POSTFIX_MAP_CMD = '/etc/mailman/virtual_to_transport.sh'

And the maps from /var/lib/mailman/data are added in main.cf:
Code:

myhostname = server.kainhofer.com
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
mydestination = server.kainhofer.com, localhost, localhost.localdomain
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_transport = dovecot

Apparently, postfix first rewrites the XXXXX-request@jung-wien.at mails for mailman to the receiver XXXXX-request (without domain), then appends the default domain from /etc/mailname and then fails to lookup the alias from mailman's alias and rather uses the dovecot transport (which clearly does not have a user for the mailing list).

I have searched the whole forum and other sites via google, but none of the suggestions have worked so far.

Thanks for any help,
Reinhold

till 18th March 2013 11:37

Quote:

BTW, apparently the ISPConfig 3.0.5 does not create the correct /etc/mailman/virtual_to_transport.sh. Rather it appears to copy mm_cfg.py to virtual_to_transport.sh!!!.
Thats a known issue and laready fixed in svn stable branch last week.

scientist 19th March 2013 01:43

Quote:

Originally Posted by till (Post 294150)
Thats a known issue and laready fixed in svn stable branch last week.

How would I go about getting the fixed version? I tried ISPConfig-3-stable.tar.gz and ISPConfig-3.0.5.1.tar.gz today. Both copied the mm_cfg file as the virtual_to_transport.sh file.

Thanks.

till 19th March 2013 09:16

Like I explained above, the fix is in svn and not in a tar.gz. svn versions can be checked ot with the svn command, e.g.:

svn export svn://svn.ispconfig.org/ispconfig3/branches/ispconfig-3.0.5

to get the current 3.0.5 stabe branch.

kainhofer 20th March 2013 02:55

Quote:

Originally Posted by till (Post 294228)
Like I explained above, the fix is in svn and not in a tar.gz.

The problem that virtual_to_transport.sh had the wrong contents was just a minor nuissance to me. I already fixed that as described in the other thread (http://www.howtoforge.com/forums/sho...35&postcount=6 ). My problem, however, is that even with a fixed virtual_to_transport.sh, postfix doesn't seem to be able to correctly translate and deliver the mailman aliases as given in the three files in the mailman data dir.

Thanks,
Reinhold

till 20th March 2013 09:18

Quote:

Originally Posted by kainhofer (Post 294291)
The problem that virtual_to_transport.sh had the wrong contents was just a minor nuissance to me. I already fixed that as described in the other thread (http://www.howtoforge.com/forums/sho...35&postcount=6 ). My problem, however, is that even with a fixed virtual_to_transport.sh, postfix doesn't seem to be able to correctly translate and deliver the mailman aliases as given in the three files in the mailman data dir.

Thanks,
Reinhold

Tested it roday with the current svn stable version and it works fine on Debian and Ubuntu.

kainhofer 28th March 2013 13:00

Quote:

Originally Posted by till (Post 294310)
Tested it roday with the current svn stable version and it works fine on Debian and Ubuntu.

I have now found what caused my problems: On my server I have several domains, one of them being my main domain (kainhofer.com). Thus the /etc/mailname was set to kainhofer.com, which also happens to be one of the domains on the server. So from my understanding, the postfix mail handling that led to the problems worked as follows:

1) Mail to list-name@some-domain.tld comes in, postfix detects it's a virtual mailbox domain.
2) virtual-mailman map maps "list-name@some-domain.tld" to "list-name" (without domain)
3) domain "kainhofer.com" is implied from /etc/mailname
4) domain "kainhofer.com" is not in mydestination list in /etc/postfix/main.cf, but rather in virtual_mailbox_domains
5) postfix tries to deliver it not as a local mail (using aliases), but tries to look up the list-name@kainhofer.com in the MySQL database (where it can't find an entry).

As soon as I changed the /etc/mailname to a name not equal to an ISPConfig-handled domain, local delivery for "list-name" (with the implied domain as given in /etc/mailname) kicked in and the mailinglists started working...

However, I don't like having to use an internal hostname in /etc/mailname, but would prefer having my main domain there...

Reinhold

till 28th March 2013 13:12

The domain in /etc/mailname has to match the server hostname which is normally a subdomain of one of your domains, it may not be a domain used in ispconfig for mailboxes. Thats described in the perfect setup guide btw. were we explicitely use server1.example.com and not example.com for that.

The reason is that postfix will only allow system user mailboxes for this domain name and not virtual mailboxes as used for theemail users.


All times are GMT +2. The time now is 16:20.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.