On Ubuntu 18.04 server, I use Webmin and Virtualmin to manage the server and the virtual host.

Looking at the file: /var/log/mail.log

I have this:

Sep  5 12:11:50 ns3147326 postfix/smtpd[17356]: warning: unknown[]: SASL LOGIN authentication failed: authentication failure
Sep  5 12:11:50 ns3147326 postfix/smtpd[17356]: disconnect from unknown[] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4

Giving this command service saslauthd status and I obtain:

● saslauthd.service - LSB: saslauthd startup script
Loaded: loaded (/etc/init.d/saslauthd; generated)
Active: active (running) since Thu 2019-09-05 12:15:18 CEST; 31min ago
 Docs: man:systemd-sysv-generator(8)
Process: 21744 ExecStop=/etc/init.d/saslauthd stop (code=exited, 
Process: 21762 ExecStart=/etc/init.d/saslauthd start (code=exited, 
Tasks: 10 (limit: 4915)
CGroup: /system.slice/saslauthd.service
       ├─19961 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
       ├─19962 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
       ├─19963 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
       ├─19964 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
       ├─19965 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
       ├─21783 /usr/sbin/saslauthd -a pam -c -m 
/var/spool/postfix/var/run/saslauthd -r -n 5
       ├─21784 /usr/sbin/saslauthd -a pam -c -m 
/var/spool/postfix/var/run/saslauthd -r -n 5
       ├─21785 /usr/sbin/saslauthd -a pam -c -m 
/var/spool/postfix/var/run/saslauthd -r -n 5
       ├─21786 /usr/sbin/saslauthd -a pam -c -m 
/var/spool/postfix/var/run/saslauthd -r -n 5
       └─21787 /usr/sbin/saslauthd -a pam -c -m 
/var/spool/postfix/var/run/saslauthd -r -n 5

set 05 12:46:56 ns3147326 saslauthd[21784]: pam_unix(smtp:auth): check pass; 
user unknown
set 05 12:46:56 ns3147326 saslauthd[21784]: pam_unix(smtp:auth): 
authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
set 05 12:46:57 ns3147326 saslauthd[21784]: DEBUG: auth_pam: 
pam_authenticate failed: Authentication failure
set 05 12:46:57 ns3147326 saslauthd[21784]:                 : auth failure: 
[user=peter@ip-51-75-135.eu] [service=smtp] [realm=ip-51-75-135.eu] 
[mech=pam] [reason=PAM auth error]

I googled the problem but I can't find the solution.

This is my /etc/postfix/main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#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 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_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated 
myhostname = ns3147326.ip-51-75-135.eu
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, $mydomain, localhost, 
mynetworks = [::ffff:]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated 
smtp_tls_security_level = may
allow_percent_hack = no
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
mynetworks_style = subnet

This is my /etc/default/saslauthd:

# Settings for saslauthd daemon
# Please read /usr/share/doc/sasl2-bin/README.Debian for details.

# Should saslauthd run automatically on startup? (default: no)

# Description of this saslauthd instance. Recommended.
# (suggestion: SASL Authentication Daemon)
DESC="SASL Authentication Daemon"

# Short name of this saslauthd instance. Strongly recommended.
# (suggestion: saslauthd)

# Which authentication mechanisms should saslauthd use? (default: pam)
# Available options in this Debian package:
# getpwent  -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam       -- use PAM
# rimap     -- use a remote IMAP server
# shadow    -- use the local shadow password file
# sasldb    -- use the local sasldb database file
# ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
# Only one option may be used at a time. See the saslauthd man page
# for more information.
# Example: MECHANISMS="pam"

# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
#OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"

# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.

# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
# The -d option will cause saslauthd to run in the foreground instead of as
# a daemon. This will PREVENT YOUR SYSTEM FROM BOOTING PROPERLY. If you wish
# to run saslauthd in debug mode, please run it by hand to be safe.
# See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific 
# See the saslauthd man page and the output of 'saslauthd -h' for general
# information about these options.
# Example for chroot Postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
# Example for non-chroot Postfix users: "-c -m /var/run/saslauthd"
# To know if your Postfix is running chroot, check /etc/postfix/master.cf.
# If it has the line "smtp inet n - y - - smtpd" or "smtp inet n - - - - smtpd"
# then your Postfix is running in a chroot.
# If it has the line "smtp inet n - n - - smtpd" then your Postfix is NOT
# running in a chroot.
#OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
#PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"
#OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

How can I solve?


Apply netplan with it's default .yaml file(from the FRESH install of 18.04)

Then configure networking thru Webmin. It will create the readable netplan .yaml file it needs.

  • Thanks. I need to set the .yaml file and then I solve the problem. – CuriousMind Sep 27 '19 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.