On 11/10/15 10:16 PM, Paw wrote:
> Hi Mailman community,
> 
> I am using postfix with dovecot on a Debian server. I followed <
> http://wiki.list.org/x/ZoCj> for setting up mailman, but something is wrong
> with my postfix configuration.


You may not have needed to follow that guide. See below.


> I can create new lists on http://lists.mydomain and when subscribing I get
> the subscription notification from mailman. But for sending to the list, I
> have to use listname@domain instead of [email protected]. Mails sent to
> [email protected] just seems to get lost(don't bounce or end up in
> /var/log/mail.log)
> I am sorry so disturb with such a question, but I am really stuck.
> 
> This is the full log when sending a mail to test@mydomain. The mail is
> being delivered to local user tester's inbox.
> Nov 11 06:41:59 loki postfix/smtpd[4543]: connect from
> mail-lf0-f49.google.com[209.85.215.49]
> Nov 11 06:41:59 loki postfix/smtpd[4543]: 7F4E724C09B: client=
> mail-lf0-f49.google.com[209.85.215.49]
> Nov 11 06:41:59 loki postfix/cleanup[4914]: 7F4E724C09B:
> message-id=<CAP53jTxugaP79R=Uqr_1zipb2z_EVQRno=
> [email protected]>
> Nov 11 06:41:59 loki postfix/qmgr[31085]: 7F4E724C09B: from=<
> [email protected]>, size=1680, nrcpt=1 (queue active)
> Nov 11 06:41:59 loki postfix/smtpd[4543]: disconnect from
> mail-lf0-f49.google.com[209.85.215.49]
> Nov 11 06:41:59 loki postfix/local[4915]: 7F4E724C09B: to=<
> [email protected]>, relay=local, delay=0.63,
> delays=0.49/0.01/0/0.13, dsn=2.0.0, status=sent (delivered to command:
> /var/lib/mailman/mail/mailman post test)


Mail is received from google and delivered via the local transport and
Mailman aliases to the appropriate pipe. It appears that
'studentergaarden.dk' is local so the local transport is used. Dovecot
is not involved because it is a virtual transport and not a local one.
Transport maps is not involved either because it only mentions
'lists.studentergaarden.dk' and not 'studentergaarden.dk' addresses.


> Nov 11 06:41:59 loki postfix/qmgr[31085]: 7F4E724C09B: removed
> Nov 11 06:42:01 loki postfix/smtpd[4543]: connect from localhost[127.0.0.1]
> Nov 11 06:42:01 loki postfix/smtpd[4543]: 44A6324C0A7:
> client=localhost[127.0.0.1]
> Nov 11 06:42:01 loki postfix/cleanup[4914]: 44A6324C0A7:
> message-id=<CAP53jTxugaP79R=Uqr_1zipb2z_EVQRno=
> [email protected]>
> Nov 11 06:42:01 loki postfix/qmgr[31085]: 44A6324C0A7: from=<
> [email protected]>, size=3127, nrcpt=1 (queue active)
> Nov 11 06:42:01 loki postfix/smtpd[4543]: 5D5F124C0E1:
> client=localhost[127.0.0.1]
> Nov 11 06:42:01 loki postfix/cleanup[4914]: 5D5F124C0E1:
> message-id=<CAP53jTxugaP79R=Uqr_1zipb2z_EVQRno=
> [email protected]>
> Nov 11 06:42:01 loki postfix/qmgr[31085]: 5D5F124C0E1: from=<
> [email protected]>, size=3137, nrcpt=1 (queue active)
> Nov 11 06:42:01 loki postfix/smtpd[4543]: disconnect from
> localhost[127.0.0.1]
> Nov 11 06:42:01 loki dovecot: lda(tester):
> msgid=<CAP53jTxugaP79R=Uqr_1zipb2z_EVQRno=lxjj7kujaaobg...@mail.gmail.com>:
> saved mail to INBOX
> Nov 11 06:42:01 loki postfix/local[4915]: 5D5F124C0E1: to=<
> [email protected]>, relay=local, delay=0.19, delays=0.05/0/0/0.13,
> dsn=2.0.0, status=sent (delivered to command: /usr/lib/dovecot/deliver)


Here mail to tester is delivered to dovecot via the 'local' transport,
presumably because of an alias for 'tester' in /etc/aliases.


> Nov 11 06:42:01 loki postfix/qmgr[31085]: 5D5F124C0E1: removed
> Nov 11 06:42:01 loki postfix/smtp[4944]: 44A6324C0A7: to=<[email protected]>,
> relay=gmail-smtp-in.l.google.com[173.194.222.27]:25, delay=0.49,
> delays=0.1/0.01/0.26/0.12, dsn=2.0.0, status=sent (250 2.0.0 OK 1447220691
> 38si4916356lfq.17 - gsmtp)
> Nov 11 06:42:01 loki postfix/qmgr[31085]: 44A6324C0A7: removed
> 
> 
> My config is as follow:
> -----------------------------------------------
> Dumps of postconf, mm_cfg.py virtual-mailman,
> virtual_to_transport and transport-mailman
> -----------------------------------------------
> $ postconf -n
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases hash:/var/lib/mailman/data/aliases
> append_dot_mydomain = no
> biff = no
> body_checks = pcre:/etc/postfix/bodychecks
> config_directory = /etc/postfix
> dovecot_destination_recipient_limit = 1
> header_checks = pcre:/etc/postfix/headerchecks
> inet_interfaces = mail.studentergaarden.dk, localhost
> inet_protocols = ipv4
> mailbox_command = /usr/lib/dovecot/deliver
> mailbox_size_limit = 2048000000
> message_size_limit = 40480000
> mydestination = $mydomain, $myhostname, localhost.$mydomain, localhost
> myhostname = mail.studentergaarden.dk
> mynetworks = 130.226.169.128/26, 172.16.0.0/16, 127.0.0.0/8
> myorigin = /etc/mailname
> recipient_delimiter = +
> relayhost =
> smtpd_banner = $myhostname ESMTP $mail_name
> smtpd_client_restrictions = permit_mynetworks, reject_unknown_client
> smtpd_hard_error_limit = 10
> smtpd_helo_required = yes
> smtpd_helo_restrictions = reject_invalid_hostname
> smtpd_recipient_restrictions = permit_mynetworks, reject_rbl_client
> zen.spamhaus.org, reject_unauth_destination, reject_unauth_pipelining,
> smtpd_relay_restrictions = permit_mynetworks, reject_rbl_client
> zen.spamhaus.org, reject_unauth_destination, reject_unauth_pipelining,
> smtpd_sender_restrictions = reject_non_fqdn_sender,
> reject_unknown_sender_domain
> smtpd_soft_error_limit = 8
> transport_maps = hash:/var/lib/mailman/data/transport-mailman
> virtual_mailbox_domains = mail.studentergaarden.dk
> virtual_transport = dovecot


OK.


> $ cat  /etc/mailman/mm_cfg.py
> ... few irrelevant lines truncated ...
> DEFAULT_EMAIL_HOST = 'lists.studentergaarden.dk'
> DEFAULT_URL_HOST   = 'lists.studentergaarden.dk'
> MTA='Postfix'
> POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.studentergaarden.dk']
> POSTFIX_MAP_CMD = '/var/lib/mailman/data/transport-mailman'


See below.


> ---
> Whether POSTFIX_MAP_CMD is commented out or not, does not seems to make a
> difference


POSTFIX_MAP_CMD should be


POSTFIX_MAP_CMD = '/var/lib/mailman/data/virtual_to_transport'

not what you have.


> $ ll /var/lib/mailman/data
> total 80K
> -rw-r----- 1 root     list   41 Oct 22 05:15 adm.pw
> -rw-rw---- 1 root     list 5,6K Nov 11 06:13 aliases
> -rw-rw---- 1 list     list  12K Nov 11 06:14 aliases.db
> -rw-r----- 1 root     list   41 Nov 11 04:40 creator.pw
> -rw-rw-r-- 1 root     list   10 Oct 22 03:11 last_mailman_version
> -rw-rw-r-- 1 root     list  14K Apr  6  2015 sitelist.cfg
> -rwxrwxr-x 1 root     list    0 Nov 11 03:53 transport-mailman
> -rw-r--r-- 1 root     list  12K Nov 11 04:10 transport-mailman.db
> -rw-rw---- 1 www-data list 5,3K Nov 11 06:13 virtual-mailman
> -rw-rw---- 1 list     list  12K Nov 11 06:14 virtual-mailman.db
> -rwxr-x--- 1 root     list  153 Nov 11 04:00 virtual_to_transport


OK.


> $ cat /var/lib/mailman/data/virtual-mailman
> # STANZA START: test
> # CREATED: Wed Nov 11 05:55:30 2015
> [email protected]              test
> [email protected]        test-admin
> [email protected]      test-bounces
> [email protected]      test-confirm
> [email protected]         test-join
> [email protected]        test-leave
> [email protected]        test-owner
> [email protected]      test-request
> [email protected]    test-subscribe
> [email protected]  test-unsubscribe
> # STANZA END: test
> (the Mailman list is also included in the above file)


OK.


> $ cat /var/lib/mailman/data/virtual_to_transport
> sed -r -e 's/(^[^#]\S+\s+).+$/\1local:/' $1 >
> /var/lib/mailman/data/transport-mailman
> /usr/sbin/postmap /var/lib/mailman/data/transport-mailman
> 
> $ cat /var/lib/mailman/data/transport-mailman
> <<<EOF (empty)


This shouldn't be empty.  It should have entries like

[email protected] local:

corresponding to all the entries in virtual-mailman.

POSTFIX_MAP_CMD = '/var/lib/mailman/data/transport-mailman'

is wrong. See above.


> There are no errors in relevant postfix/mailman logs.
> I do not use postfix-to-mailman.py.
> 
> What have I done wrong with the postfix configuration? And where does the
> [email protected] maills go?


A mail domain must have an MX record pointing to a domain with an A
record or if no MX record must have an A record. See, e.g.,
<http://wiki.list.org/x/4030649>.

lists.studentergaarden.dk has neither. It has only a CNAME to
loki.studentergaarden.dk. This should net be a CNAME. It should be
either an A pointing to 130.226.169.164 or an MX pointing to
loki.studentergaarden.dk or maybe mail.studentergaarden.dk.

-- 
Mark Sapiro <[email protected]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list [email protected]
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to