A plain unauthenticated SMTP connection to localhost:25
is an attempt to use the MTA as an open relay, which obviously won't work on properly configured MTAs.
Demonstration:
andrew@andrewyu:~$ nc localhost 25
220 mail.andrewyu.org ESMTP andrewyu.org (Debian/GNU)
HELO mail.andrewyu.org
250 mail.andrewyu.org
MAIL FROM: me@runxiyu.org
250 2.1.0 Ok
RCPT TO: andrew@noisytoot.org
554 5.7.1 <andrew@noisytoot.org>: Relay access denied
Make sure that
smtpd_relay_restrictions
inmain.cf
includespermit_mynetworks
and things should work.However, I wonder how GNU Mailman and other MLMs do it, since I don't recall needing to permit local relaying when using Mailman 2's SMTPDirect. Relying on relay access seems to be incorrect.
Please note that
permit_mynetworks
must come BEFORE any relevantreject...
clauses such asreject_unauth_destination
. Otherwise the email will be rejected.