Outgoing mail does not work: local data error while talking to smtp.mailexample.com

Created:

2017-08-04 00:06:39 UTC

Modified:

2017-08-08 13:08:15 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Outgoing mail does not work: local data error while talking to smtp.mailexample.com

Symptoms

Emails are not sent from a server.

No error is shown in mail client interface.

Ports 25 and 587 are opened.

Trying to send an email the following messages are logged into /var/log/maillog:

Aug  3 19:28:53 example postfix/smtp[18437]: warning: hash:/etc/postfix/password is unavailable. open database /etc/postfix/password.db: No such file or directory
Aug  3 19:28:53 example postfix/smtp[18437]: warning: hash:/etc/postfix/password lookup error for "smtp.mailexample.com"
Aug  3 19:28:53 example postfix/smtp[18437]: warning: 61856222BB: smtp_sasl_passwd lookup error
Aug  3 19:28:53 example postfix/smtp[18437]: 61856222BB: to=<john.doe@example.com>, relay=smtp.mailexample.com[203.0.113.2]:25, delay=524, delays=522/0.01/1.9/0, dsn=4.3.0, status=deferred (local data error while talking to smtp.mailexample.com[203.0.113.2])

There is an additional section in main.cf file:

# cat /etc/postfix/main.cf
..
#MAILCHANNELS
relayhost = smtp.mailexample.com
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/password
smtp_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
smtp_tls_security_level = may
#ENDMAILCHANNELS

Cause

Postfix misconfiguration.

Resolution

  1. Login to the server via SSH.
  2. Comment MAILCHANNELS section:

    # vi /etc/postfix/main.cf
    [..]
    #MAILCHANNELS
    #relayhost = smtp.mailexample.com
    #smtp_sasl_auth_enable = yes
    #smtp_sasl_password_maps = hash:/etc/postfix/password
    #smtp_sasl_security_options = noanonymous
    #smtpd_sasl_authenticated_header = yes
    #smtp_tls_security_level = may
    #ENDMAILCHANNELS
  3. Restart postfix service to apply changes:

    # systemctl restart postfix
Have more questions? Submit a request
Please sign in to leave a comment.