Install:
wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm rpm -Uv rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm yum install sendmail sendmail-cf cyrus-sasl-plain cd /etc/mail vi sendmail.mc change from: DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl change to: DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl add: define(`confAUTH_MECHANISMS’, `LOGIN PLAIN’)dnl add: TRUST_AUTH_MECH(`LOGIN PLAIN')dnl make sendmail.cf -C /etc/mail chkconfig sendmail on chkconfig saslauthd on /etc/init.d/sendmail start /etc/init.d/saslauthd start adduser someusername (the username to allow relay) passwd someusername (the username to allow relay) vi /etc/passwd change from: someusername:x:500:500::/home/relay170:/sbin/nologin change to: someusername:x:500:500::/home/relay170:/home/relay
Telent SMTP AUTH test:
carl@carld630:~$ telnet smtp.hostname.com 25
Trying 123.123.123.123…
Connected to 123.123.123.123.
Escape character is ‘^]’.
220 smtp.hostname.com ESMTP Sendmail 8.13.8/8.13.8; Sat, 15 May 2010 21:01:58 GMT
AUTH LOGIN
334 VXNlcm5hbWU6
base64 encoded username
334 UGFzc3dvcmQ6
base64 encoded password
235 2.0.0 OK Authenticated
mail from: something@adomain.com
250 2.1.0 something@adomain.com… Sender ok
rcpt to: something@adomain.com
250 2.1.5 something@adomain.com… Recipient ok
data
354 Enter mail, end with “.” on a line by itself
Subject: Testing Relay with Auth Some body .
250 2.0.0 o4FL1wad003835 Message accepted for delivery
quit
Telnet Relay Denied Test:
telnet 89.248.50.170 25
Trying 123.123.123.123…
Connected to 123.123.123.123.
Escape character is ‘^]’.
220 smtp.hostname.com ESMTP Sendmail 8.13.8/8.13.8; Sat, 15 May 2010 21:03:25 GMT
mail from: something@adomain.com
250 2.1.0 something@adomain.com… Sender ok
rcpt to: something@adomain.com
550 5.7.1 something@adomain.com… Relaying denied. Proper authentication required.
quit
