Chinaunix

标题: Postfix发件人地址只能通过Generic修改问题! [打印本页]

作者: loesprite    时间: 2011-03-28 08:39
标题: Postfix发件人地址只能通过Generic修改问题!
很久没摸postfix,昨天在家里部署了DNS,就试了安装2台postfix服务器互发邮件,但是却发现发件人的地址总是有些问题。

根据官方的文档,对于发出的邮件的发件人地址的定义是在:

  1. /etc/postfix/main.cf:
  2.     myorigin = $myhostname (default: send mail as "user@$myhostname")
  3.     myorigin = $mydomain   (probably desirable: "user@$mydomain")
复制代码
改完这两个参数,并且确认了主机名,但是发出去的邮件始终是 @localhost.localdomain.

最后,没有办法,只有在 /etc/postfix/generic 文件里,添加了

  1. @localhost.localdomain          @sunnysoung.org
复制代码
我觉得启用generic是没有必要的,但是没有找到问题所在,附上我的配置,请教各位了。

  1. [root@Server2 ~]# postconf -n
  2. alias_database = hash:/etc/aliases
  3. alias_maps = hash:/etc/aliases
  4. command_directory = /usr/sbin
  5. config_directory = /etc/postfix
  6. daemon_directory = /usr/libexec/postfix
  7. debug_peer_level = 2
  8. html_directory = no
  9. inet_interfaces = all
  10. mail_owner = postfix
  11. mailq_path = /usr/bin/mailq.postfix
  12. manpage_directory = /usr/share/man
  13. mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
  14. mydomain = sunnysoung.org
  15. myhostname = mail.sunnysoung.org
  16. mynetworks = 172.27.0.0/16, 127.0.0.0/8
  17. mynetworks_style = host
  18. myorigin = $mydomain
  19. newaliases_path = /usr/bin/newaliases.postfix
  20. queue_directory = /var/spool/postfix
  21. readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
  22. sample_directory = /usr/share/doc/postfix-2.3.3/samples
  23. sendmail_path = /usr/sbin/sendmail.postfix
  24. setgid_group = postdrop
复制代码





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2