Postfix: SASL Authentication Failed

Dear members,
I configured my server with email user format as “user@domain.com” and enabled ssl etc.
Now, my user is not being authenticated with user@domain.com user but it works if i use virtual host account admin e.g. if i have a domain xyz.com and its admin user is xyz, then i can use xyz and its password in outlook smtp settings.

root@server:~# ps -ax|grep sasl 5154 ? Ss 0:00 /usr/sbin/saslauthd -a pam shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5 5155 ? S 0:00 /usr/sbin/saslauthd -a pam shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5 5156 ? S 0:00 /usr/sbin/saslauthd -a pam shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5 5157 ? S 0:00 /usr/sbin/saslauthd -a pam shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5 5158 ? S 0:00 /usr/sbin/saslauthd -a pam shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5 5741 ? S 0:00 smtpd -n smtp -t inet -u -c -o stress= -s 2 -o smtpd_sasl_auth_enable=yes 5745 pts/0 S+ 0:00 grep --color=auto sasl

my /etc/default/saslauthd file is as follows:

# # Settings for saslauthd daemon START=yes

DESC=“SASL Authentication Daemon”
NAME=“saslauthd”

MECHANISMS=“pam shadow”
THREADS=5
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

saslauthd doesn’t appear to be running with the -r option. Try adding -r to the end of the OPTIONS line. I may need to update our configuration, if things have changed.

Please always include your distro and version. (I need to know this in order to fix it when problems are our fault.)

I confirm that on a fresh install of Centos 7 using virtualmin 6.01, the FLAG="-r" is missing. I only found it by comparing my other entos server that was installed with Virualmin 5 series.

ONLy the -r

And after changing / adding that everything with mail works ok?

For Centos 7 its a simple FLAG="-r"

Edit /etc/sysconfig/sysconfig to show this:

Directory in which to place saslauthd’s listening socket, pid file, and so

on. This directory must already exist.

SOCKETDIR=/run/saslauthd

Mechanism to use when checking passwords. Run “saslauthd -v” to get a list

of which mechanism your installation was compiled with the ablity to use.

MECH=pam

Additional flags to pass to saslauthd on the command line. See saslauthd(8)

for the list of accepted flags.

FLAGS="-r"

Then:
systemctl restart saslauthd