I'd like to relay mail from my laptop through my server. I've successfully configured postfix and SASL, and I can
AUTH successfully using telnet.
dhcp-241:~ jgorset$ telnet mail.example.com 25 Trying 188.8.131.52... Connected to mail.example.com. Escape character is '^]'. 220 mail.example.com ESMTP Postfix EHLO mail.example.com 250-mail.example.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN AUTH PLAIN *********************** 235 2.7.0 Authentication successful MAIL FROM: <email@example.com> 250 2.1.0 Ok RCPT TO: <firstname.lastname@example.org> 554 5.7.1 <email@example.com>: Recipient address rejected: Access denied
As demonstrated above, I'm being denied relay through my postfix server even though I've authenticated and configured postfix to allow authenticated clients to relay mail.
# /etc/postfix/main.cf # SMTP authentication smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_security_options = noanonymous smtpd_recipient_restrictions = reject, permit_sasl_authenticated
Am I being rejected because the
smtpd_recipient_restrictions option is set to
reject, even though is specifically states to
permit_sasl_authenticated? I was under the impression that the latter would override the former, seeing that you are required to enter either
reject_unauth_destination with this option.
Update: Turns out this also happens if I telnet from localhost. If I comment out the
smtpd_recipient_restrictions line, I can send mail to anyone (though only from localhost). I'd like to do so from any computer that authenticates using SASL. How should I go about this?