Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using Postfix together with Mailman to handle mailing lists on one of my servers. There is a delivery method defined in Postfix to handle incoming mail for mailing lists, "mailman". This delivery method is used for two domains, on which only mailing lists are hosted:

  • charmides.phl.univie.ac.at
  • lists.girlsrock.at

Setup for both domains is, as far as I can tell, identical. Yet, while mailing works for charmides.phl.univie.ac.at work, it doesn’t for lists.girlsrock.at. That is, if and only if emails are injected via SMTP, Postfix replies: “Recipient address rejected: User unknown in relay recipient table”.

The Error in Detail

root@menon:/etc/postfix# telnet localhost smtp
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 menon.phl.univie.ac.at ESMTP Postfix (Debian/GNU)
helo localhost
250 menon.phl.univie.ac.at
mail from:<root>
250 2.1.0 Ok
rcpt to:<postmaster@lists.girlsrock.at>
550 5.1.1 <postmaster@lists.girlsrock.at>: Recipient address rejected: User unknown in relay recipient table

However, the following works; that is, it sends an empty message to postmaster@lists.girlsrock.at:

sendmail postmaster@lists.girlsrock.at

By contrast, there are no such problems with charmides.phl.univie.ac.at:

root@menon:/etc/postfix# telnet localhost smtp
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 menon.phl.univie.ac.at ESMTP Postfix (Debian/GNU)
helo localhost
250 menon.phl.univie.ac.at
mail from:<root>
250 2.1.0 Ok
rcpt to:<postmaster@charmides.phl.univie.ac.at>
250 2.1.5 Ok

To the best of my knowledge, both configurations are identical.

My Setup

/etc/hosts

127.0.0.1   localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0     ip6-localnet
ff00::0     ip6-mcastprefix
ff02::1     ip6-allnodes
ff02::2     ip6-allrouters

131.130.46.92   menon.phl.univie.ac.at
131.130.46.92   charmides.phl.univie.ac.at
131.130.46.92   lists.girlsrock.at

/etc/postfix/main.cf

append_dot_mydomain = no
readme_directory = no
smtpd_helo_required = yes
smtpd_delay_reject = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =
smtp_sasl_auth_enable = no
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unknown_sender_domain, reject_non_fqdn_recipient, reject_invalid_helo_hostname, check_policy_service inet:127.0.0.1:12525

myhostname = menon.phl.univie.ac.at
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = menon.phl.univie.ac.at, localhost.phl.univie.ac.at, localhost
relayhost = 

relay_domains = $mydestination, charmides.phl.univie.ac.at, lists.girlsrock.at
relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

recipient_delimiter = +
inet_interfaces = all

mail_spool_directory = /srv/mail/

mailbox_command = /usr/bin/procmail
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

/etc/postfix/master.cf

smtp      inet  n       -       -       -       -       smtpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
    -o smtp_fallback_relay=
       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix  -   n   n   -   2   pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

amavis unix - - - - 2 smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - - - - smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o strict_rfc821_envelopes=yes
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
        -o smtpd_bind_address=127.0.0.1

/etc/postfix/transport

postmaster@charmides.phl.univie.ac.at   local:$myhostname
postmaster@lists.girlsrock.at       local:$myhostname

charmides.phl.univie.ac.at  mailman:
lists.girlsrock.at      mailman:

Also:

root@menon:/etc/postfix# ls -l transport*
-rw-r--r-- 1 root root   171 11. Apr 11:19 transport
-rw-r--r-- 1 root root 12288 11. Apr 11:30 transport.db

DNS Replies

charmides.phl.univie.ac.at

root@menon:/etc/postfix# dig mx charmides.phl.univie.ac.at

; <<>> DiG 9.7.3 <<>> mx charmides.phl.univie.ac.at
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46201
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;charmides.phl.univie.ac.at.    IN  MX

;; ANSWER SECTION:
charmides.phl.univie.ac.at. 68400 IN    CNAME   menon.phl.univie.ac.at.

;; AUTHORITY SECTION:
phl.univie.ac.at.   68400   IN  SOA ns3.univie.ac.at. domain-admin.univie.ac.at. 2013041001 3600 600 604800 86400

;; Query time: 44 msec
;; SERVER: 131.130.1.11#53(131.130.1.11)
;; WHEN: Thu Apr 11 12:24:06 2013
;; MSG SIZE  rcvd: 117

lists.girlsrock.at

root@menon:/etc/postfix# dig mx lists.girlsrock.at

; <<>> DiG 9.7.3 <<>> mx lists.girlsrock.at
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37529
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;lists.girlsrock.at.        IN  MX

;; AUTHORITY SECTION:
girlsrock.at.       7070    IN  SOA ns1.issp.at. domains.issp.at. 2013033001 10800 3600 604800 38400

;; Query time: 0 msec
;; SERVER: 131.130.1.11#53(131.130.1.11)
;; WHEN: Thu Apr 11 12:24:55 2013
;; MSG SIZE  rcvd: 89

The difference in their DNS replies is, so far, the only difference that I can make out. I’m not sure why it matters, though. I added an MX record for lists.girlsrock.at, but the changes haven’t yet propagated to my server.

Logs

Contain nothing that pertains to the messages sent/denied.

System

I’m using Debian/GNU Linux Wheezy/Sid, with Linux 2.6.32-5-xen-amd64. Postfix version is 2.7.1.

Help!

I’m at my wits end, help is very appreciated! Does anybody have any idea what’s going wrong?

share|improve this question
    
What is in /var/lib/mailman/data/virtual-mailman? Also, where have you defined mailman in your master.cf? –  NickW Apr 11 '13 at 11:32
    
Did you rebuild the transport and virtual-mailman tables (postmap /etc/postfix/transport) after adding the second list? –  Jenny D Apr 11 '13 at 12:10
    
@NickW, thanks a lot. /var/lib/mailman/data/virtual-mailman was lacking a definition for postmaster@lists.girlsrock.at. I completely forgot that this is required; somehow I thought that only the mailing list addresses should go in there. What does still bother me though, is how postfix managed to deliver the message if it was injected via the sendmail API. –  O. Kroeger Apr 11 '13 at 16:55
    
@JennyD, thanks for your reply as well, but I didn’t forget postmap. –  O. Kroeger Apr 11 '13 at 16:55
    
Cool! Glad you got it working.. –  NickW Apr 12 '13 at 8:21

1 Answer 1

up vote 0 down vote accepted

My setup lacked a definition for the postmaster address at lists.girlsrock.at. I implicitly assumed that the definition in /etc/postfix/transport would suffice, which, of course, it doesn’t. And without a postmaster, Postfix refuses to recognise domains. What still puzzles me though, is how Postfix managed to deliver messages to postmaster@lists.girlsrock.at that were injected via the sendmail API.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.