0

I have raised a query with the below mentioned link, and i have below mentioned configuration in main.cf POSTFIX SASL Configuration

main.cf


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname,<"all other destination list">
mydomain = <"my domain name">
myhostname = <"my hotname name">
mynetworks = <"ALL IPS">
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relay_domains = $mydestination
relayhost = <"MY RELAY HOST SERVER DETAILS">
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
smtpd_sasl_type = cyrus
smtpd_sasl_path = smtpd
cyrus_sasl_config_path = /etc/postfix/sasl
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous

master.cf


#File has the below mentioned
smtp inet n - y - - smtpd #smtp inet n - n - 1 postscreen #smtpd pass - - - - - smtpd
#dnsblog unix - - n - 0 dnsblog
#tlsproxy unix - - n - 0 tlsproxy
#submission inet n - - - - smtpd

/etc/postfix/sasl/smtpd.conf


pwcheck_method: saslauthd mech_list: LOGIN PLAIN
saslauthd_path: private/saslauthd/mux

With the above configuration i get the below error postfix/smtpd[20980]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory postfix/smtpd[20980]: warning: unknown[]: SASL LOGIN authentication failed: generic failure

Naga
  • 11

2 Answers2

3

Simply put: Postfix communicates with SASL (saslauthd) using files. In the configuration of both, you can specify the path to use. In that path, the following files will be created:

~# ls -l /var/spool/postfix/var/run/saslauthd/
total 4
srwxrwxrwx 1 root root 0 Feb 12 11:41 mux
-rw------- 1 root root 0 Feb 12 11:41 mux.accept
-rw------- 1 root root 7 Feb 12 11:41 saslauthd.pid

Chances are, your postfix process is chrooted. Which is a good thing from security point of view. This means though that postfix will write it's sasl stuff into /whatever-your-postfix-chroot-is/var/run/saslauthd/

I believe you should not specify a file in your path. So NOT:

saslauthd_path: private/saslauthd/mux

Because that would lead to postfix looking for private/saslauthd/mux/mux file. That's probably now what you intend.

Either leave that line out completely and use the default path, or specify the sasl path explicitly:

saslauthd_path: private/saslauthd/

So far for the Postfix side of things.

There is also the SASL side of things. In the saslauthd configuration, you have the OPTIONS parameter. Check out the -m parameter which is /var/run/saslauthd/ by default.

Since your postfix is probably chrooted, it does not have access to /var/run/saslauthd/ path. So change your SASL configuration to /whatever-your-postfix-chroot-is/private/saslauthd/ Like this: OPTIONS="-m /whatever-your-postfix-chroot-is/private/saslauthd/ -r"

And restart your saslauthd

systemctl restart saslauthd

If you still experience communication issues between Postfix and saslauthd, suggest you post the output of

ps -ef | grep sasl
Bjorn
  • 41
  • 3
0

The error message says: cannot connect to saslauthd server: No such file or directory. The two most likely explanations is either that saslauthd is not running, or that smtpd and saslauthd disagree on the name.

madcap
  • 55