2

I need to connect to Dyn mail relay and I'm using their KB.

I'm trying to connect to my postfix server with telnet to port 25.

This is the postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relayhost = smtp.dynect.net:25
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
unknown_local_recipient_reject_code = 550

/var/log/maillog

Aug  6 05:52:09 jira postfix/postfix-script[14415]: stopping the Postfix mail system
Aug  6 05:52:09 jira postfix/master[13461]: terminating on signal 15
Aug  6 05:52:11 jira postfix/postfix-script[14508]: starting the Postfix    mail system
Aug  6 05:52:11 jira postfix/master[14510]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug  6 05:53:46 jira postfix/smtpd[14514]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 05:58:56 jira postfix/smtpd[14514]: timeout after AUTH from confluence.radwarecloud.com[10.65.60.22]
Aug  6 05:58:56 jira postfix/smtpd[14514]: disconnect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:15:28 jira postfix/smtpd[15079]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:15:46 jira postfix/smtpd[15079]: lost connection after UNKNOWN from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:15:46 jira postfix/smtpd[15079]: disconnect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:15:47 jira postfix/smtpd[15079]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:17:12 jira postfix/postfix-script[15125]: stopping the Postfix mail system
Aug  6 12:17:12 jira postfix/master[14510]: terminating on signal 15
Aug  6 12:17:14 jira postfix/postfix-script[15218]: starting the Postfix mail system
Aug  6 12:17:14 jira postfix/master[15220]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug  6 12:17:24 jira postfix/smtpd[15223]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:18:25 jira postfix/smtpd[15223]: lost connection after AUTH from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:18:25 jira postfix/smtpd[15223]: disconnect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:18:26 jira postfix/smtpd[15223]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:19:09 jira postfix/postfix-script[15309]: stopping the Postfix mail system
Aug  6 12:19:09 jira postfix/master[15220]: terminating on signal 15
Aug  6 12:19:11 jira postfix/postfix-script[15401]: starting the Postfix mail system
Aug  6 12:19:11 jira postfix/master[15403]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug  6 12:19:18 jira postfix/smtpd[15406]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:24:24 jira postfix/smtpd[15406]: timeout after AUTH from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:24:24 jira postfix/smtpd[15406]: disconnect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:28:55 jira postfix/postfix-script[15438]: stopping the Postfix mail system
Aug  6 12:28:55 jira postfix/master[15403]: terminating on signal 15
Aug  6 12:28:57 jira postfix/postfix-script[15529]: starting the Postfix mail system
Aug  6 12:28:57 jira postfix/master[15531]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug  6 12:29:03 jira postfix/smtpd[15534]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:30:33 jira postfix/postfix-script[15559]: stopping the Postfix mail system
Aug  6 12:30:33 jira postfix/master[15531]: terminating on signal 15
Aug  6 12:30:34 jira postfix/postfix-script[15651]: starting the Postfix mail system
Aug  6 12:30:34 jira postfix/master[15653]: fatal: /etc/postfix/master.cf: line 36: no valid IP address found: smtp
Aug  6 12:30:35 jira postfix/master[15652]: fatal: daemon initialization failure
Aug  6 12:30:36 jira postfix/postfix-script[15654]: fatal: mail system startup failed
Aug  6 12:31:46 jira postfix/postfix-script[15757]: starting the Postfix mail system
Aug  6 12:31:46 jira postfix/master[15759]: daemon started -- version 2.10.1, configuration /etc/postfix
Aug  6 12:32:01 jira postfix/smtpd[15762]: connect from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:37:10 jira postfix/smtpd[15762]: timeout after AUTH from confluence.radwarecloud.com[10.65.60.22]
Aug  6 12:37:10 jira postfix/smtpd[15762]: disconnect from confluence.radwarecloud.com[10.65.60.22]

I see that I'm getting the following error in /var/log/messages:

 Blockquote saslauthd[11378]: do_auth         : auth failure: [user=XXX] [service=smtp] [realm=XXX.com] [mech=pam] [reason=PAM auth error]

In /var/log/maillog I get:

  SASL login authentication failed: authentication failure

what am I forgetting?

edotan
  • 1,876
  • 13
  • 39
  • 57
  • Please provide output from `postconf -a` – UsersUser Aug 05 '15 at 12:52
  • 1
    postconf -a cyrus dovecot – edotan Aug 05 '15 at 19:03
  • 1
    I need to connect to Dyn mail relay and I'm using their KB https://help.dyn.com/integrating-postfix-with-dyns-email-delivery/ – edotan Aug 05 '15 at 19:08
  • Your [last comment](http://serverfault.com/questions/711006/postfix-error-535-5-7-8-error-authentication-failed-authentication-failure#comment882319_711006) was the important missing piece of the question. In the original question, you only explain configuration and error message, without the goal. – masegaloeh Aug 05 '15 at 23:44
  • yeah, sorry but it doesn't work. I get: 503 5.5.1 Error: authentication not enabled – edotan Aug 06 '15 at 12:25
  • 1
    fatal: /etc/postfix/master.cf: line 36: no valid IP address found: smtp fix that and you can go further... – Dennis Nolte Aug 06 '15 at 15:40
  • I don't see error `Error: authentication not enabled` in new maillog file. Please fix it first as [suggested by Dennis Nolte](http://serverfault.com/questions/711006/postfix-error-535-5-7-8-error-authentication-failed-authentication-failure#comment882635_711006) above. – masegaloeh Aug 06 '15 at 22:40
  • as you can see in the postconf -a the authentication is already set. the line 36 error. Inet = all is already set as well. you are referring to old error logs. the postconf -a is the latest configuration but I still get Error: authentication not enabled - this is the main problem. – edotan Aug 07 '15 at 05:01

2 Answers2

4

You need to know the differences between smtpd and smtp in Postfix. In short, smtpd is the SMTP server that receive the email and smtp is the SMTP client that send the email.

Based on the article linked above, you need to add the following three parameters into main.cf:

smtp_sasl_auth_enable=yes 
smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd 
smtp_sasl_security_options

Unfortunately, postconf -noutput is different:

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options =

Do you notice the difference between those two snippets? Great. So fix the typo and your problem should be resolved.

Diamond
  • 9,001
  • 3
  • 24
  • 38
masegaloeh
  • 18,236
  • 10
  • 57
  • 106
  • `postconf -a`shows now `alias_database = hash:/etc/aliases readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES relayhost = smtp.dynect.net:25 sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = unknown_local_recipient_reject_code = 550` but when I try to access I get: `auth login 503 5.5.1 Error: authentication not enabled` – edotan Aug 06 '15 at 12:19
  • Please post the updated output of postconf -n output by editing your question. And post the full maillog line too – masegaloeh Aug 06 '15 at 12:42
  • what do you mean Unfortunately, postconf -noutput is different:? – Fernando Torres Sep 12 '19 at 17:30
0

I had this error symptom when migrating from Ubuntu 10.04 to 14.04. Once I changed smtpd_sasl_type from cyrus to dovecot it worked. You have to restart the postfix service after the change.

Thorsten Staerk
  • 387
  • 2
  • 11