Plesk

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

Symptoms

Cause

Postfix misconfiguration. Manually configured relayhost is not accessible from the server.

Resolution

  1. Login to the server via SSH.

  2. Open /etc/postfix/main.cf with any text editor, e.g.:

    # vi /etc/postfix/main.cf

  3. Comment MAILCHANNELS section:

    #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

  4. Restart postfix service to apply changes:

    # systemctl restart postfix