How to configure Postfix so that I can authenticate via SMTP to localhost

0

I have a Postfix MTA configured to which I can perfectly log in from remote via SMTP (Thunderbird, Python, etc.) but when trying to use the same script with the same credentials while locally on the same system, it refuses the connection. Specifically when using smtplib's login method, I get the following exception:

SMTPException: SMTP AUTH extension not supported by server.

This is in mail.log:

Aug  7 22:37:32 myhostname postfix/smtpd[31174]: connect from mydomain.com[123.123.123.123]
Aug  7 22:37:32 myhostname postfix/smtpd[31174]: Anonymous TLS connection established from mydomain.com[123.123.123]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Aug  7 22:37:32 myhostname postfix/smtpd[31174]: lost connection after EHLO from mydomain.com[123.123.123]
Aug  7 22:37:32 myhostname postfix/smtpd[31174]: disconnect from mydomain.com[123.123.123]

This isn't of much help. My postfix configuration can be found here, of which I would assume mostly this part is interesting:

myhostname = mail.mydomain.com
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_local_domain=$myhostname
smtpd_sasl_security_options = noanonymous

However, I don't spot much of options that prevent this login. Can anyone be of help?

javex

Posted 2013-08-07T20:49:05.877

Reputation: 469

Answers

1

Your config has:

smtpd_sasl_exceptions_networks = $mynetworks

According to postconf(5):

smtpd_sasl_exceptions_networks (default: empty)

What remote SMTP clients the Postfix SMTP server will not offer AUTH support to.

user1686

Posted 2013-08-07T20:49:05.877

Reputation: 283 655