免费注册 查看新帖 |

Chinaunix

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

[Mail] sendmail 怎样设置第三方中继? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-19 16:08 |只看该作者 |倒序浏览
30可用积分
公司内部在总部有一台SMTP Server可以发邮件出互联网,而在分公司也有一台用sendmail 做SMTP服务器,只能分邮件给公司内部的人,发外部邮件即显示时间超出。
Feb 19 15:22:40 CNPRX02 sendmail[22426]: m1J7Kb0a022424: to=<office@msn.cn>, delay=00:02:01, xdelay=00:02:01, mailer=esmtp, pri=121110, relay=70731977.pamx1.hotmail.com. [65.54.247.8], dsn=4.0.0, stat=Deferred: Connection timed out with 70731977.pamx1.hotmail.com.
现在在总部SMTP Server 上已允许分公司这台sendmail SMTP服务器用它做中继服务器,那在分公司这台SMTP上我要做什么设置才行呢?

论坛徽章:
0
2 [报告]
发表于 2008-02-19 16:31 |只看该作者
在Exchange & Domino 中有 Mail Gateway,但这种功能怎么在Sendmail 中实现呢

论坛徽章:
0
3 [报告]
发表于 2008-02-19 23:47 |只看该作者
  1. 在Solaris 10中做的。

  2. 1.       Disable Sendmail server

  3. # svcadm disable sendmail

  4. # cd /etc/mail

  5. # mv submit.cf submit.cf.bak

  6. 2.       Edit /etc/hosts

  7. Add line:

  8. 192.168.1.9              mailhost.abcde.com

  9. 3.       Create file: /etc/mail/cf/cf/new.mc

  10. divert(0)dnl

  11. VERSIONID(`@(#)sendmail.mc      1.11 (Sun) 06/21/04')

  12. OSTYPE(`solaris8')dnl

  13. DOMAIN(`solaris-generic')dnl

  14. define(`SMART_HOST', `mailhost.abcde.com')dnl

  15. MAILER(`local')dnl

  16. MAILER(`smtp')dnl



  17. LOCAL_NET_CONFIG

  18. R$* < @ $* .$m. > $*    $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

  19. 4.       Make a new cf file

  20. # cd /etc/mail/cf/cf

  21. # /usr/ccs/bin/make new.cf

  22. # cd /etc/mail

  23. # cp sendmail.cf sendmail.cf.`date +%m%d`

  24. # cp /etc/mail/cf/cf/new.cf ./sendmail.cf

  25. 5.       Change permission:

  26. # chmod 777 /var/spool/mqueue

  27. 6.       Testing:

  28. echo "Subject: this is a test message from `hostname` by Felix" | /usr/lib/sendmail -v [email]felix@abcde.com[/email]
复制代码

  1. http://blog.chinaunix.net/u/6098/showart_206863.html
复制代码

论坛徽章:
0
4 [报告]
发表于 2008-02-20 00:29 |只看该作者
之前写错了点,今天自己实验,  结果还没出.
在SENDMAIL.CF中设置
# "Smart" relay host (may be null)
DSmail.myrelay.com    => mail.myrelay.com为我加入的 中继服务器

或者  编辑sendmail.mc
define(`SMART_HOST',`mail.myrelay.com')
然后生成cf文件

需要测试,我是看了文档后网上找出的.   公司网络有限制.

[ 本帖最后由 very_99 于 2008-2-20 09:57 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP