# [solved] saslauthd not working

## schmeggahead

Used email for the home network how to here: https://forums.gentoo.org/viewtopic.php?t=56633

and worked fine. Then I did that evil emerge thing and saslauthd no longer works the way I had it setup before.

/etc/conf.d/sasldauth:

```

# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/saslauthd2.conf,v $

# Config file for /etc/init.d/saslauthd

SASL_AUTHMECH=shadow

SASL_RIMAP_HOSTNAME=""

SASL_TIME_OF_DAY_LOGIN_RESTRICTIONS=yes

SASLAUTHD_OPTS="${SASL_AUTHMECH} -a shadow"

```

when I had the version from the how to:

```
SASLAUTHD_OPTS="-a ${SASL_AUTHMECH}"
```

it complained about not having a "-a" option.

now it appears to start, but sending isn't working.

here's my postfix:

```
queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/lib/postfix

mail_owner = postfix

# this can be set to files.columbus.rr.com [20040411]

#myorigin = $myhostname

#myorigin = files.columbus.rr.com

# default mydestination = $myhostname, localhost.$myhostname

# use the expanded one for SMTP mail host [20040411]

#mydestination = $myhostname, localhost.$myhostname $mydomain

unknown_local_recipient_reject_code = 450

# default is below for both mynetworks and mynetworks_style [20040411]

#mynetworks_style = subnet

# default is all ifconfig interfaces

#mynetworks = 127.0.0.0/8 192.168.0.0/24

# uncommented the procmail. not sure what is default before [20040411]

mailbox_command = /usr/bin/procmail

# uncommented the debug_peer_level not sure what is default [20040411]

debug_peer_level = 2

debugger_command =

         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

         xxgdb $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail

newaliases_path = /usr/bin/newaliases

mailq_path = /usr/bin/mailq

setgid_group = postdrop

#added 20040915 per new main.cf below

html_directory = no

manpage_directory = /usr/share/man

#sample_directory = /usr/share/doc/postfix-2.0.19/sample [20040915]

sample_directory = /etc/postfix

#readme_directory = /usr/share/doc/postfix-2.0.19/readme [20040915]

readme_directory = /usr/share/doc/postfix-2.1.3/readme

default_destination_concurrency_limit = 2

alias_database = hash:/etc/mail/aliases

local_destination_concurrency_limit = 2

alias_maps = hash:/etc/mail/aliases

home_mailbox = .maildir/

# this is special to my site pre [20040411]

myhostname = files.slaughter.cbs

# added [20040411 begin] added for use of authentication

smtpd_sasl_auth_enable = yes

smtpd_sasl_security_options = noanonymous

smtpd_sasl_local_domain =

broken_sasl_auth_clients = yes

#smtpd_client_restrictions = permit_sasl_authenticated, reject [20040415 add pe$

smtpd_client_restrictions = permit_sasl_authenticated, permit_mynetworks, reject

# added [20040411 end]

# added [20040411 2 begin] for default key process

smtpd_use_tls=yes

smtpd_tls_auth_only = yes

smtpd_tls_key_file = /etc/ssl/postfix/server.key

smtpd_tls_cert_file = /etc/ssl/postfix/server.crt

smtpd_tls_CAfile = /etc/ssl/postfix/server.pem

smtpd_tls_loglevel = 3

smtpd_tls_received_header = yes

smtpd_tls_session_cache_timeout = 3600s

tls_random_source = dev:/dev/urandom

# added [20040411 2 end]

# added [20040411 3 begin] authentiation

smtp_sasl_auth_enable = yes

smtp_sasl_password_maps = hash:/etc/postfix/saslpass

smtp_sasl_security_options = noanonymous

# added [20040411 3 end]

# added [20040411 4 begin] antivirus filter

content_filter = smtp-amavis:[127.0.0.1]:10024

# added [20040411 4 end]

```

I saw something about sasl2 in some of the posts, but with 21 pages and having to search each page individually... that's why I'm posting fresh. It seems others are having similar problems.

The sasl installation appeared to have wiped out my /etc/conf.d/saslauthd file (but that could just be me being impatient with dispatch-conf again   :Embarassed:  )Last edited by schmeggahead on Sat Oct 02, 2004 6:54 pm; edited 1 time in total

----------

## steveb

wich version of cyrus-sasl did you install?

cheers

SteveB

----------

## schmeggahead

dev-libs/cyrus-sasl-2.1.18-r2dev-libs/cyrus-sasl-2.1.18-r2

(at least that's what emerge says it would re-install now)

----------

## steveb

okay.. and do you get any errors in your log file?

and could you try this as your config file:

```

# Config file for /etc/init.d/saslauthd

# Initial (empty) options.

SASLAUTHD_OPTS=""

# Specify the authentications mechanism.

# *NOTE* For list see: saslauthd -v

# From 2.1.19, add "-r" to options for old behavior

# ie. reassemble user and realm to user@realm form.

# SASLAUTHD_OPTS=" -a shadow -r"

SASLAUTHD_OPTS=" -a shadow"

# Specify the hostname for remote IMAP server.

# *NOTE* Only needed if rimap auth mech is used.

#SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -O localhost"

# Specify the number of worker processes to create.

SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -n 5"

# Enable credential cache, cache size, and timeout.

# *NOTE* Size is measured in kilobytes

#        Timeout is measured in seconds

SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -c -s 128 -t 30"
```

cheers

SteveB

----------

## schmeggahead

Here's some interesting lines from /var/log/everything/current:

Oct  1 07:30:11 [postfix/smtpd] warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in

Oct  1 07:30:11 [postfix/smtpd] starting TLS engine

Oct  1 07:30:11 [postfix/smtpd] connect from localhost[127.0.0.1]

Oct  1 07:30:11 [postfix/smtpd] warning: restriction `permit_sasl_authenticated' ignored: no SASL support

Oct  1 07:30:11 [postfix/smtpd] 3866F269962: client=localhost[127.0.0.1]

and with grep sasl:

Sep 29 06:00:00 [postfix/smtpd] warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in

Sep 29 06:00:00 [postfix/smtpd] warning: restriction `permit_sasl_authenticated' ignored: no SASL support

Sep 29 06:37:17 [saslauthd] server_exit     : master exited: 2418

Sep 29 06:39:19 [saslauthd] detach_tty      : master pid is: 2418

Sep 29 06:39:19 [saslauthd] ipc_init        : listening on socket: /var/lib/sasl2/mux

also found this:

Sep 29 06:40:04 [amavis] (01619-01) WARN: all primary virus scanners failed, considering backups

these were after changing saslauthd conf.d with your version. looks like it was happening that way before too.

I must have totally hosed my email system with the last emerge -uDav world.

Guess I should look at /var/log/everything after each boot looking for trouble.   :Embarassed:  How do you handle it?

----------

## schmeggahead

The interesting thing about the solution to my difficulty with saslauth is that all I really needed to do was have the correct use flags set when I upgraded to a newer version of courier-imap, cyrus-sasl, fetchmail, and postfix.

In the installation instructions for the home email system:

https://forums.gentoo.org/viewtopic.php?t=56633

the installation uses temporary use flags which are not considered when emerge -uDav world is done:

```
USE="ssl pam nls maildir sasl gdbm berkdb -mysql -ldap \ 

       -mbox -postgres -kerberos -java -static"
```

when I re-installed all of these with the appropriate use flags, email started working just fine.  :Very Happy: 

Thanks for pointing me to the logs. I keep forgetting them.  :Embarassed: 

----------

