我安装了Jenkins,并将其configuration为从“[email protected]”发送电子邮件,但是在发送电子邮件时,地址总是被更改,而我收到的邮件是从“[email protected] .COM”。
我已经安装了Sendmail,Jenkins被configuration为使用127.0.0.1作为邮件服务器。
任何想法为什么Sendmail在发送电子邮件时会replaceFROM域?
服务器的主机名正确设置(当我运行hostname我得到“jenkins.example.com”)。
同样的方式,如果我从命令行发送电子邮件echo "This is the body" | mail -s "Subject" [email protected] echo "This is the body" | mail -s "Subject" [email protected]
从哪里采取这个default.vps.example.com域? 这个默认域在哪里可configuration?
LE:在我的sendmail.mc中,我define( confDOMAIN_NAME', jenkins.domain.com')dnl并生成了sendmail.cf文件m4 sendmail.mc > sendmail.cf并重新启动了sendmail。 依然不起作用。
LE2:
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > canonify input: jenkins @ jenkins . example . com Canonify2 input: jenkins < @ jenkins . example . com > dns_getcanonname(jenkins.example.com, trymx=1) dns_getcanonname: trying jenkins.example.com. (AAAA) YES dns_getcanonname: trying default.vps.example.com. (AAAA) NO: errno=0, h_errno=4 dns_getcanonname: trying default.vps.example.com. (A) YES dns_getcanonname: default.vps.example.com Canonify2 returns: jenkins < @ default . vps . example . com . > canonify returns: jenkins < @ default . vps . example . com . > >
很可能您的sendmail用“真实姓名”replaceDNS CNAMElogging(DNS别名)的名称。
作为root执行echo '3 [email protected]' | sendmail -d8.20 -bt echo '3 [email protected]' | sendmail -d8.20 -bt
它应该显示您在电子邮件地址预处理期间的DNS查询(通过规则集3 )。
DJ伯恩斯坦
邮件中的CNAMElogging
RFC 821禁止在SMTP请求的域名中使用“昵称或别名”。 RFC 1123明确禁止MAIL和RCPT请求中的DNS别名(具有CNAMElogging的域)。
sendmail接受一个带有CNAMElogging的域。 在RCPT中使用它之前,它将使用CNAME值replace域名,除非它充当哑客户端。 类似的评论适用于qmail和其他邮件。