LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   SMTP AUTH with sendmail in centos.. 504 5.3.3 AUTH mechanism LOGIN not available (https://www.linuxquestions.org/questions/linux-server-73/smtp-auth-with-sendmail-in-centos-504-5-3-3-auth-mechanism-login-not-available-4175468290/)

satyadev75 07-03-2013 02:09 AM

SMTP AUTH with sendmail in centos.. 504 5.3.3 AUTH mechanism LOGIN not available
 
Hello ,
I tried to install sendmail with smtp auth. I followed this steps

#yum install sendmail-cf

Then edited /etc/mail/sendmail.mc

TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl


define(`confCACERT_PATH’, `/etc/pki/tls/certs’)dnl
define(`confCACERT’, `/etc/pki/tls/certs/ca-bundle.crt’)dnl
define(`confSERVER_CERT’, `/etc/pki/tls/certs/sendmail.pem’)dnl
define(`confSERVER_KEY’, `/etc/pki/tls/certs/sendmail.pem’)dnl

#make sendmail.pem

# cd /etc/mail
# m4 sendmail.mc > sendmail.cf
# service sendmail restart
# service saslauthd restart


# vi /etc/sysconfig/saslauthd
SOCKETDIR=/var/run/saslauthd
MECH=pam
FLAGS=
# vi /usr/lib/sasl2/Sendmail.conf
#pwcheck_method:saslauthd
pwcheck_method:auxprop

# saslauthd -v

saslauthd 2.1.23
authentication mechanisms: getpwent kerberos5 pam rimap shadow ldap

#saslpasswd2 -c -u sys1.example.com -a smtpauth test

#sasldblistusers2
test@sys1.example.com: userPassword
#telnet localhost 25
ehlo localhost
250-sys1.example.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
AUTH LOGIN
504 5.3.3 AUTH mechanism LOGIN not available.


Please help me to clear this..
I am very new to this. So , anything i missed in the process or any wrong thing.. please tell me..

satyadev75 07-03-2013 05:11 AM

Got it..
but still i have one issue.

installed cyrus..
#yum install cyrus-sasl cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-md5 cyrus-sasl-plain

#vi /etc/mail/sendmail.mc
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl

#service sendmail restart

#telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 sys1.example.com ESMTP Sendmail 8.14.4/8.14.4; Wed, 3 Jul 2013 15:16:10 +0530
ehlo sys1.example.com
250-sys1.example.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
AUTH LOGIN
334 VXNlcm5hbWU6
root
334 UGFzc3dvcmQ6
pass
501 5.5.4 cannot decode AUTH parameter pass


(try test password)
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
AUTH LOGIN
334 VXNlcm5hbWU6
dGVzdA== <username:test>
334 UGFzc3dvcmQ6
dGVzdA== <password:test>
535 5.7.0 authentication failed

i used the following command to encode
#perl -MMIME::Base64 -e 'print encode_base64("test");'
dGVzdA==

Please can you show me a way to login..

bathory 07-04-2013 11:47 AM

Hi,

Make sure you've started the saslauthd daemon.

Regards

joel2600 01-23-2014 02:30 AM

Quote:

Originally Posted by satyadev75 (Post 4983290)
Got it..
but still i have one issue.


can you please explain your answer when you figure something out. it really helps the rest of us. :cry:


All times are GMT -5. The time now is 09:54 AM.