CyberTek - the future at the present!
Google

Saslauthd authentication Sendmail

Posted by: admin (Sep 24)

For all those who have a Linux server with Sendmail service is now necessary to grant the possibility of sending through authentication. Indeed it is quite easy to enable the option, though you should be aware that some distributions like CentOS does not make it available by default, here's how to fix it:

Install the sendmail-cf and cyrus-sasl if not present in the system, for redhat / centos:

[] Yum install sendmail-cf cyrus-sasl

Then edit the sedmail.mc (/ etc / mail / sendmail.mc) and uncomment these lines:

define ( `confAUTH_OPTIONS ',` A') dnl
TRUST_AUTH_MECH ( `LOGIN PLAIN ') dnl
define ( `confAUTH_MECHANISMS ',` LOGIN PLAIN') dnl

For security control anchequesta setting:

DAEMON_OPTIONS ( `Port = smtp, Addr = 0.0.0.0, Name = MTA ') dnl

Now you need to recompile the sendmail.cf file with the program m4:

[] M4 / etc / mail / sendmail.mc> / etc / mail / sendmail.cf

Check and if necessary edit the file / usr/lib/sasl2/Sendmail.conf as follows:

pwcheckjnethod: saslauthd

Now restart sendmail and saslauthd

[] / Etc / init.d / saslauthd start

[] / Etc / init.d / sendmail restart

Finally we check that our work has been corrected:

[] Telnet localhost 25  

Trying 127.0.0.1 ...
Connected to localhost.
Escape character is'^]'.
220 xxxxx.xxxxx.xx ESMTP Sendmail 8.12.11/8.12.11; Mon, 23 Aug 2004 12:36:30 +0200

Since we appear sendmail responds by typing:

ehlo localhost

which will be answered if all goes well (the red line that tells us that sendmail accepts the authentication, in addition to plain login may have some other methods, this is correct):

250-xxxxx.xxxxx.xx Hello xxxxx.xxxxx.xx [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP

Published in: linux, redhat, tips

Add A Comment

Spam protection by WP Captcha-Free

Powered by Cybertek - Remote Assistance