Mailman mail list is not working with external mail service: Relay access denied

Refers to:

  • Plesk for Linux

Created:

2016-11-16 13:19:14 UTC

Modified:

2017-01-10 18:59:40 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Mailman mail list is not working with external mail service: Relay access denied

Symptoms

  • mailbox@example.com is hosted on an external mail server.
  • Mail list is working correctly with mailboxes hosted on Plesk server.
  • An attempt to send a messages through the Mail list (mailman) to a mailboxes on example.com fails with the following error in /var/log/maillog:
    postfix/smtpd[391540]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 
    <test@example.com>: Relay access denied; from=<example-bounces@example2.com> to=<example.com> proto=ESMTP helo=<localhost.localdomain>
  • Errors in /var/log/mailman/bounce:

        (21084) ras: mailbox@example.com current bounce score: 2.0
  • Errors in /var/log/mailman/smtp-failure:

    delivery to user@example.com failed with code -1: Server not connected
    delivery to user2@example3.com failed with code -1: [Errno 104] Connection reset by peer

    OR

    delivery to mailbox@example.com failed with code 553: sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Cause

  • localhost IPv4 and IPv6 addresses are not added in server white list.
  • /etc/postfix/main.cf misconfiguration.

Resolution

  1. Ensure that localhost IPv4 and IPv6 addresses are both white listed in Plesk:
    Plesk > Tools & Settings > Mail Server Settings > White List tab > Add Network.
  2. Add permit_mynetworks parameter into the smtpd_recipient_restrictions in /etc/postfix/main.cf. By default it should be:
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
  3. Reload postfix:
    # service postfix reload

Note: Adding of localhost IPv4 and IPv6 addresses into the white list will fix issue with mail lists. But mails sent from localhost will not be checked: neither webmail and php scripts nor mail lists.
Outgoing mail messages sent from IP addresses that are not in white list are still processed by mail handlers.

For instructions about configuring mailing lists please check Mailing Lists section in Administrator's Guide.

Have more questions? Submit a request
Please sign in to leave a comment.