0

OS version: Ubuntu 24.04 LTS

I need to deploy a simple smtp relay that supports basic auth (client side)

I have problems with SASL, even if the user and password are correct I get this error:

SASL LOGIN authentication failed: authentication failure, sasl_username=relay@ub1 

The user seems to exist

prx@ub1:~$ sudo sasldblistusers2
relay@ub1: userPassword

If I try credentials in this way, I get authentication failed

prx@ub1:~$ sudo testsaslauthd -u relay@ub1 -p pwd
0: NO "authentication failed"

If I try in this way I get Success

prx@ub1:~$ sudo testsaslauthd -u relay -p pwd
0: OK "Success."

main.cf

    See /usr/share/postfix/main.cf.dist for a commented, more complete version

#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no

appending .domain is the MUA's job.

append_dot_mydomain = no

Uncomment the next line to generate "delayed mail" warnings

#delay_warning_time = 4h

readme_directory = no

See http://www.postfix.org/COMPATIBILITY_README.html -- default to 3.6 on

fresh installs.

compatibility_level = 3.6

relay

relayhost = relay.external.internet

smtpd_sasl_type = cyrus smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = $myhostname

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination

smtpd_tls_security_level = may smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

Log debug

debug_peer_list = 127.0.0.1

Where I'm wrong?

0 Answers0