SMTP mail shipping doesnt work (SASL authentication failed)


#1

Hello all,
i have a problem with the shipping of mails via postfix. Hint: the Server is brand new installed and all aplcations are up to date.

There is the log report with the error message (scroll to Right Hand side):

Nov 9 08:13:56 mail postfix/smtp[7669]: warning: database /etc/postfix/tls_policy.db is older than source file /etc/postfix/tls_policy

Nov 9 08:14:00 mail postfix/smtp[7669]: 5BD81303595: to=<xxxx@arcor.de>, relay=alfaxxx3.alfahosting-server.de[109.237.138.49]:25, delay=3.7, delays=0.04/0.04/3.7/0, dsn=4.7.8, status=deferred (SASL authentication failed; server alfaxxx3.alfahosting-server.de[109.237.138.49] said: 535 5.7.8 Error: authentication failed: )

Here my setup:

Username and PW is implemented:
smtp_auth eingebunden
relayauth yes
smtps_sasl_auth_enable: yes
smtpd_tls_wrappermode: yes
smtpd_enforce: yes
smtps_sasl_auth_enable:
smtpport: leer
relayhost: [alfaxxx3.alfahosting-server.de](http://alfaxxx3.alfahosting-server.de/)

What I have to change to handle the error message in right way (SASL authentication failed; server alfaxxx3.alfahosting-server.de[109.237.138.49] said: 535 5.7.8 Error: authentication failed: )? Thx!


#2

Hey,

Those don’t make sense:

  1. Postfix’s settings are named smtp_… (those control the SMTP client) and smtpd_… (those control the SMTP server) but not smtps_….
  2. You’ve listed smtps_sasl_auth_enable twice with different values.

Please post the output of the following commands:

ucr search --brief '^mail/.*(auth|sasl)'
postconf -n | grep sasl
stat /etc/postfix/smtp_auth*

Kind regards
mosu


#3

Hello,
thx for the very fast reaction and sorry for the mistake. Here the FB values: I hope this helps further to find the mistake:

/var/log$ ucr search --brief '^mail/.*(auth|sasl)'
mail/postfix/dovecot_sasl: <empty>
mail/postfix/mastercf/options/smtps/smtpd_sasl_auth_enable: yes
mail/postfix/mastercf/options/submission/smtpd_sasl_auth_enable: yes
mail/postfix/policy/listfilter/use_sasl_username: yes
mail/relayauth: yes
mail/saslauthd/cache/timeout: 1800
mail/saslauthd/threads: 5
/var/log$ postconf -n | grep sasl
broken_sasl_auth_clients = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unlisted_recipient
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
/var/log$ stat /etc/postfix/smtp_auth*
  Datei: /etc/postfix/smtp_auth
  Größe: 52        	Blöcke: 8          EA Block: 4096   reguläre Datei
Gerät: fe00h/65024d	Inode: 2097072     Verknüpfungen: 1
Zugriff: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Zugriff    : 2018-11-01 18:45:41.998653200 +0100
Modifiziert: 2018-11-01 18:45:32.000000000 +0100
Geändert   : 2018-11-01 18:45:34.898997700 +0100
 Geburt    : -
  Datei: /etc/postfix/smtp_auth.db
  Größe: 12288     	Blöcke: 16         EA Block: 4096   reguläre Datei
Gerät: fe00h/65024d	Inode: 2097286     Verknüpfungen: 1
Zugriff: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Zugriff    : 2018-11-09 07:36:58.286158500 +0100
Modifiziert: 2018-11-01 18:45:45.322980200 +0100
Geändert   : 2018-11-01 18:45:45.322980200 +0100
 Geburt    : -

#4

Hey,

alright, that looks good so far.

That error usually means that either the user name or the password sent by your server is wrong. Check the content of the file /etc/postfix/smtp_auth. It should look like this:

alfaxxx3.alfahosting-server.de username:password

where username and password must be a valid login & the corresponding password for their mail service.

Another, though unlikely, possibility is that there’s a problem on their end regarding authentication. It is somewhat suspicious that the error message ends with a colon : —I would have expected additional information after that colon.

m.


#5

You are the best ever and I did create the stupidest error ever. Password had a mistake :-(.

Now it works! Thx for the greate support!


#6

You’re quite welcome.