OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: postfix + sasl problem

From: Benjamin Zwittnig (benjamin.zwittnigarnes.si)
Date: Wed Sep 05 2007 - 02:36:06 CDT


>>>> -- mechanisms on localhost --
>>>>
>>>> -- end of saslfinger output --
>>>> # saslauthd -v
>>>> saslauthd 2.1.19
>>>> authentication mechanisms: getpwent kerberos5 pam rimap shadow ldap
>>>>
>>>> saslauthd is running but it doesn't receive any request from postfix.
>>>> When I connect to port 587 on the machine I get:
>>>>
>>>> # telnet localhost 587
>>>> Trying 127.0.0.1...
>>>> Connected to localhost.localdomain (127.0.0.1).
>>>> Escape character is '^]'.
>>>> Connection closed by foreign host.
>>>>
>
> The server closes the connection before you can say EHLO?
>
>

Yes.

I have found something else in the log files:

Sep 5 09:31:25 mail postfix/master[9958]: warning: process
/opt/postfix/sbin/smtpd pid 8126 exit status 1
Sep 5 09:31:25 mail postfix/master[9958]: warning:
/opt/postfix/sbin/smtpd: bad command startup -- throttling

>>>> In the postfix log there are only two lines indicating
>>>> the problem:
>>>>
>>>> Sep 4 13:55:01 mail postfix/smtpd[6149]: warning: SASL per-connection
>>>> security setup; invalid parameter supplied
>>>> Sep 4 13:55:01 mail postfix/smtpd[6149]: fatal: SASL per-connection
>>>> initialization failed
>>>>
>
> I've searched the source code for the error messages and it seems to me - I am
> not a programmer - that the message "invalid parameter supplied" stems from
> the SASL library returning the error in xsasl_cyrus_server.c.
>
> However I don't remember ever having seen this before, so its probably better
> to get somebody to deal with your problem who knows to interpret the code.
>
I can send you strace of the smtpd process. The sasl libraries are
CentOS default
libraries which come with the system.

>>> No idea where this comes from. Simplify the setup. Make it work with smtpd
>>> first, the go for submission.
>>>
>>>
>> I use similar configuration (sasl authentication only for the submission
>> channel) on a machine running FreeBSD. It works there. I suspect
>> something might be 'wrong' with sasl setup on the linux machine.
>> It is strange since testsaslauthd works well:
>>
>> # testsaslauthd -u testuser -p xxxxx
>> 0: OK "Success."
>>
>
> How to you run saslauhtd? Which commandline parameters do you use? Have you
>
 saslauthd -d -m /var/run/saslauthd -a rimap -O xx.xx.xx.xx/543
> tried to riun saslauthd with the same parameters plus an additional "-d" for
> debugging, so you can see on STDOUT that happens?
>
>
I tried with -d flag but as I have mentioned no request came to the
saslauthd.

Best regards,

Benjamin