Increase Logging Verbosity Of Saslauthd?

Home » CentOS » Increase Logging Verbosity Of Saslauthd?
CentOS 5 Comments

Hi

CentOS 7.X, sendmail.x86_64 8.14.7-5.el7, cyrus-sasl.x86_64 2.1.26-23.el7

There are conflicting message on how to increase the logging of saslauthd.

I know I can do this:
/usr/sbin/saslauthd -d -n0 -m /var/run/saslauthd -a pam

but that requires a terminal as saslauthd logs the output to STDOUT, this is not what I want.

I would like to have it started as a daemon and verbosity of logging increased into a log file.

How can I increase the verbosity of logging for saslauthd?

thanks

5 thoughts on - Increase Logging Verbosity Of Saslauthd?

  • If you look at the systemd unit for saslauthd, you can see this:

    [Unit]
    Description=SASL authentication daemon. After=syslog.target

    [Service]
    Type=forking PIDFile=/run/saslauthd/saslauthd.pid EnvironmentFile=/etc/sysconfig/saslauthd ExecStart=/usr/sbin/saslauthd -m $SOCKETDIR -a $MECH $FLAGS
    RuntimeDirectory=saslauthd

    [Install]
    WantedBy=multi-user.target

    So all you have to do is edit /etc/sysconfig/saslauthd and put the additional flags in the $FLAGS definition (which is empty by default).

    Then the output of the saslauthd will be sent to stdout, which is captured by the journal. You can watch the journal for the saslauthd service unit by running:

    journalctl -xfl -u saslauthd.service

  • I have tried that as well before I asked for help, however systemd refuses to accept this as the “-d” keeps saslauthd in foreground. Systemd kills the process after a minute as systemd cannot see that required PID’s.

    I can also see that saslauth logs when started normally, the logging is just NOT enough. I want to increase the verbosity so I can see what is going on.

    For example it does not seem to log the failed username.

    thanks anyway.

  • You’ll need to also create an /etc/systemd/systemd/saslauthd.service.d/override.conf that has:

    [Service]
    Type=simple

    (`systemctl edit saslauthd.service` should do this for you)

    This shouldmake systemd leave saslauthd alone rather than waiting for it to fork.


    Jonathan Billings

  • Good idea and it does, thanks!

    Logging still isn’t enough, though. Like it seems debugging some incorrect usernames still is a search in the bloody dark.

    Just found a mailing list of cyrau sasl, just subscribed to it. Sending an email to the list aafter this.