Configuration

Postfix 配置問題(發件人地址的域不存在)

  • August 2, 2019

我正在設置一個 linux 伺服器,我想獨立於我們的主郵件伺服器(即直接)發送郵件。問題是,當我將郵件發送到外部地址時,它會以發件人地址的郵件域不存在而退回。(它以 root@domain.local 的身份發送郵件)

更改我的電子郵件發件人域的正確方法是什麼?

在 main.cf 中:

# SENDING MAIL
# 
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites.  If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $mydomain
myorigin = $myhostname

這是預設設置。如果您hostname是 domain.local,這可能就是您將其視為發件人域的原因。

引用自:https://serverfault.com/questions/29932