免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2926 | 回复: 0
打印 上一主题 下一主题

[Mail] [原创] 使用RedHat 8.0 RPM包快速设置Sendmail邮件认证 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-08-18 10:00 |只看该作者 |倒序浏览
RedHat 8.0里的Sendmail基本上都已经与SASL配好了,所以想找一个快的方法设置邮件认证,用RedHat是不错的。本文档在篇末有几个参考文献,建议大家有空看看。

RPM Packages from Redhat 8.0 CDs:

* sendmail-8.12.5-7
* sendmail-cf-8.12.5-7
* cyrus-sasl-2.1.7-2
* cyrus-sasl-md5-2.1.7-2
* cyrus-sasl-plain-2.1.7-2
* cyrus-sasl-devel-2.1.7-2

****************************
Installation:

* Install all RPM Packages

   ldconfig -p | grep sasl # make sure SASL is in shared-library path

* Check to be sure that sendmail includes SASL support: sendmail -d0.1 -bv root | grep SASL

   NETUNIX NEWDB NIS PIPELINING SASL SCANF STARTTLS TCPWRAPPERS

* Add the following line to /usr/lib/sasl/Sendmail.conf     
   pwcheck_method:shadow #authenticated against passwd

* cd /usr/share/sendmail-cf/cf and modify sendmail.mc. Add the following 2 lines:
  define(`confAUTH_MECHANISMS', `LOGIN PLAIN GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5')dnl
  TRUST_AUTH_MECH(`LOGIN PLAIN GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5')dnl

* ./Build sendmail.cf
* cp sendmail.cf /etc/mail
* /etc/init.d/sendmail restart

****************************
Verification:

hermes@cf $ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 hermes ESMTP Sendmail 8.12.5/8.12.5; Sun, 17 Aug 2003 17:58:22 -0400
EHLO localhost
250-hermes Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5 # Make sure AUTH & LOGIN PLAIN are in place.
250-DELIVERBY
250 HELP

AUTH LOGIN

334 VXNlcm5hbWU6

bmVpbHM= # Your Base64 encoded username. Refer to http://makcoder.sourceforge.net/demo/base64.php for a quick conversion.

334 UGFzc3dvcmQ6

cFuZz0ACA0 # Your Base64 encoded password

235 2.0.0 OK Authenticated
MAIL FROM: someone@anything.com
250 2.1.0 someone@anything.com... Sender ok
RCPT TO: neilsu@domain.com
250 2.1.5 neilsu@domain.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
just a test
.
250 2.0.0 h7HNRZ1K003211 Message accepted for delivery
quit
221 2.0.0 hermes closing connection
Connection closed by foreign host.

NOTES: Only emails from domains which are NOT in relay lists will be required for SMTP AUTH (such as roaming users). It is generally a BAD IDEA to turn SMTP AUTH for all users.

****************************
Reference:

* SMTP AUTH in sendmail 8.10-8.12 (http://www.sendmail.org/~ca/email/auth.html)

* How to set up SMTP AUTH (http://www.jonfullmer.com/smtpauth/)

* Pavel's Sendmail Help (http://www.asp.ogi.edu/people/paja/linux/sendmail/)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP