Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2014 11:46:00 +0200
From:      "Reko Turja" <reko.turja@liukuma.net>
To:        "Drew Tomlinson" <drew@mykitchentable.net>, <freebsd-questions@FreeBSD.org>
Subject:   Re: Help with SMTP AUTH
Message-ID:  <579E8EE06D0D49DB88726917BFCDFF8E@Rivendell>
In-Reply-To: <BLU0-SMTP40877E7CD3C03FC72E1A57EB3720@phx.gbl>
References:  <BLU0-SMTP4079D728856FBE24B0A93C9B3730@phx.gbl> <CE8684D1E0E64379B17CD55A149AA466@Rivendell> <BLU0-SMTP40877E7CD3C03FC72E1A57EB3720@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
From: Drew Tomlinson
Sent: Sunday, March 16, 2014 2:48 AM
To: Reko Turja ; freebsd-questions@FreeBSD.org
Subject: Re: Help with SMTP AUTH

> Now authentication is attempted but fails with these lines in my maillog:
> Mar 15 17:40:39 blacklamb postfix/smtpd[91702]: warning: SASL 
> authentication failure: no user in db

Sasl tried to access authdb and the authenticating username was not found. 
It seems that sasl is trying to authenticate using the wrong mech. Are you 
trying to get authentication working against /etc/passwd or database 
backend? if using Cyrus sasl you need to tell sasl what mechanisms it uses 
for each service

> I would have expected to see something during the sasl_auth attempt. 
> Should I have?

You should have seen something like the following:

postfix log snippet
Mar 16 11:11:29 cerebro postfix/smtpd[16044]: connect from 
my.homeip.fi[my.home.ip.fi]
Mar 16 11:11:29 cerebro postfix/smtpd[16044]: B43B08A0122: 
client=my.homeip.fi[my.home.ip.fi], sasl_method=LOGIN, 
sasl_username=username@cerebro.mydomain.com

saslauth log snippet
saslauthd[16234] :do_auth         : auth success: [user=username] 
[service=smtp] [realm=cerebro.mydomain.com] [mech=pam]
saslauthd[16234] :do_request      : response: OK
saslauthd[16235] :rel_accept_lock : released accept lock
saslauthd[16236] :get_accept_lock : acquired accept lock
saslauthd[16235] :do_auth         : auth success: [user=username] 
[service=imap] [realm=] [mech=pam]
saslauthd[16235] :do_request      : response: OK

In another mail your conf had:

smtpd_sasl_path = /usr/local/lib/sasl2/smtpd
smtp_sasl_password_maps = hash:/usr/local/etc/postfix/sasl_passwd

Is your sasl config file for smtpd named /usr/local/lib/sasl2/smtpd or 
/usr/local/lib/sasl2/smtpd.conf - in latter case postfix and sasl should not 
need the option at all. THe same goes with the smtpd_sasl_password_maps 
(unless you are authing against remote machine with sasl). Postfix should 
not really need details of saslauth internals like where are the passwords 
or which mech to use, it just asks the saslauthd if user has proper 
credentials. Sasl checks the credentials against given login mechs for the 
service in question and returns whether or not the login is ok.

-Reko 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?579E8EE06D0D49DB88726917BFCDFF8E>