Score:0

Postfix - SMTP Send Error

us flag

I get an error saying

SMTP send:  NOT OK(Authentication failure: Invalid response code received from server (Code: 454))

when trying to send SMTP from the "Roundcube Webmail Installer", I can't install Roundcube because of this annoying error. I am trying out different combinations of Username and Password like "[email protected]" and "usrnam" and the username and password is from the system.

/etc/postfix/main.cf :


smtpd_banner = $myhostname ESMTP $mail_name
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 2 on
# fresh installs.
compatibility_level = 2



# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=may

smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache


smtpd_relay_restrictions = permit_sasl_authenticated defer_unauth_destination
myhostname = privatedomain.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, privatedomain.de, anotherdomain.domain.com, localhost.anotherdomain.com, localhost
relayhost = smtp.mailchannels.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/password
smtp_sasl_security_options =
smtp_tls_auth_only = yes
smtp_tls_security_level = encrypt
smtpd_sasl_auth_enable = yes

And the log is just saying

Jun 11 16:50:56 systemname3123 postfix/smtpd[3069076]: connect from localhost[127.0.0.1]
Jun 11 16:50:56 systemname3123 postfix/smtpd[3069076]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Jun 11 16:50:56 systemname3123 postfix/smtpd[3069076]: warning: localhost[127.0.0.1]: SASL LOGIN authentication failed: generic failure
Jun 11 16:50:56 systemname3123 postfix/smtpd[3069076]: disconnect from localhost[127.0.0.1] ehlo=1 auth=0/1 quit=1 commands=2/3
codlord avatar
ru flag
It's not clear - are you creating hashed versions of your postfix files by running for example `sudo postmap hash:/etc/postfix/password`? So where the config says `hash:/etc/postfix/password` it's not trying to read the `/etc/postfix/password` file but the hashed version of the password file. And have you seen https://askubuntu.com/questions/1030785/postfix-authentication-failure-cant-send-email-out
chocolateimage avatar
us flag
@codlord I don't really know what you are asking but i am running `sudo postmap hash:/etc/postfix/password` and then restarting the 2 services "postfix" and "saslauthd" and it is still not working, and i am getting requests from 2 AM: https://i.imgur.com/iLN9MZd.png
chocolateimage avatar
us flag
@codlord And the other part of log file: https://i.imgur.com/RofGLMY.png
FatRabbit avatar
bw flag
hold on: smtp_sasl_password_maps is not for incomming e-mail it is used for outgoing emails (thus the name smtp*), it has nothing to do with incomming e-mails (stmpd*) User authentication is on Roundcube side (usually via IMAP, LDAP, ....) not at postfix level, you must allow your roundcube server IP address to mynetworks and add mynetwors to smtpd_relay_restrictions.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.