Sendmail Settings

通常新安装的Linux主机,hostname我们不会将其设置成真实的FQDN形式,这会造成在后面做一些应用服务器时,产生一些影响,比如mail server,做为mail server,如果你的当前hostname是linux.local,而你希望以[email protected]发送邮件出去,那么在没有进行其它配置的情况下,当你将邮件发送后,接收人那里会显示[email protected],并由[email protected]代发。有一些邮件接收服务器就会将你这封邮件做为垃圾邮件,放在垃圾箱里,那么该怎么更改呢,以做到只显示[email protected]呢,下面是sendmail的设置方式:

  1. vim /etc/mail/sendmail.mc
    MASQUERADE_AS(`zhuoyue.me')dnl 
    FEATURE(`masquerade_envelope')dnl 
    FEATURE(`masquerade_entire_domain')dnl 
    MASQUERADE_DOMAIN(`zhuoyue.me')dnl
  2. make  -f /etc/mail/Makefile
  3. service sendmail reload

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.