免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6312 | 回复: 5

[Mail] sendmail发送邮件地址伪装问题 [复制链接]

论坛徽章:
0
发表于 2010-04-28 14:56 |显示全部楼层
我在本机采用sendmail中继功能对外发送高警邮件,由于外部的MTA不允许localhost.localdomain ,
Received-SPF: none (: root@localhost.localdomain does not
        designate permitted sender hosts)
希望发信的时候用mydomain.com替代现在的localhost.localdomain

我在sendmail.mc文件里加了如下4行
MASQUERADE_AS(`mydomain.com')
FEATURE(masquerade_envelope)
FEATURE(masquerade_entire_domain)
MASQUERADE_DOMAIN(mydomain.com)


执行了m4,生成了新的sendmail.cf,重启了sendmail服务

可是发送队列里看到还是localhost.localdomain
[root@localhost ~]# sendmail -bp
                /var/spool/mqueue (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
o3S6N1kU004880*      28 Wed Apr 28 14:23 <root@localhost.localdomain>
                                         <root@localhost.localdomain>


grep MASQUERADE /etc/mail/sendmail.cf查不到结果,请问是什么问题导致地址伪装不成功

论坛徽章:
0
发表于 2010-04-29 10:27 |显示全部楼层
问题仍然没有解决,更正一下,与grep MASQUERADE /etc/mail/sendmail.cf无关,sendmail.cf里相关的masquerade的配置如下,
# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{E}root
C{w}localhost.localdomain
C{M}mydomain.com

# who I masquerade as (null for no masquerading) (see also $=M)
DMmydomain.com

论坛徽章:
0
发表于 2010-08-10 13:46 |显示全部楼层
找到原因了吗?

论坛徽章:
0
发表于 2010-08-13 10:11 |显示全部楼层
回复 2# jiajuzh


    C{E}root,是否使用root用户发送?使用root将不伪装(默认)

论坛徽章:
0
发表于 2010-08-23 15:30 |显示全部楼层

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
发表于 2010-09-07 17:33 |显示全部楼层
更改你 OS 的主機名 (hostname) ,重啟 sendmail

sendmail.cf 中
DjHOSTNAME  (HOSTNAME 為你期望主機名)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP