小编sun*_*ide的帖子

postfix 使用主机名而不是 myhostname

我正在尝试设置用于发送电子邮件的外发邮件服务器,以便中继到我们的 ISP。

在 /etc/postfix/main.cf 中,我将 myhostname 指定为 ourcompany.example.com,将 myorigin 和 mydomain 指定为 $myhostname。ourcompany.example.com 是可解析的。

但是查看 /var/log/maillog 中的日志,似乎 postfix 确实使用 myhostname 作为发送地址,但使用了 getmyhostname() 中的任何内容,它被设置为内部 DNS 名称,因为这是一个内部服务器,我们只发送电子邮件,但不处理收到的电子邮件。

有任何想法吗?

编辑:postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = example.com
myhostname = ourcompany.example.com
myorigin = …
Run Code Online (Sandbox Code Playgroud)

postfix sendmail hostname

6
推荐指数
2
解决办法
2万
查看次数

标签 统计

hostname ×1

postfix ×1

sendmail ×1