CentOS 7 - Postfix 無法啟動
目前它無法啟動後綴。這是我收到的錯誤:
warning: unreasonable macro call nesting: "mydomain" warning: unreasonable macro call nesting: ", localhost." warning: unreasonable macro call nesting: "mydomain" warning: unreasonable macro call nesting: ", localhost, " warning: unreasonable macro call nesting: "mydomain" fatal: dictionary mail_dict: macro processing error postfix.service: control process exited, code=exited status=1 Failed to start Postfix Mail Transport Agent. Unit postfix.service entered failed state. postfix.service failed.
這是我的 main.cf (僅包括未註釋並添加到文件中的位):
myhostname = mail.domain.net mydomain = domain.net myorigin = $mydomain home_mailbox = mail/ mynetworks = 127.0.0.0/8 inet_interfaces = all inet_protocols = all inet_interfaces = localhost mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination smtp_tls_security_level = may smtpd_tls_security_level = may smtp_tls_note_starttls_offer = yes smtpd_tls_loglevel = 1 smtpd_tls_key_file = /etc/postfix/ssl/server.key smtpd_tls_cert_file = /etc/postfix/ssl/server.crt smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom
在上面的程式碼中,我在本地程式碼中編輯了 mail.domain.net 和 domain.net。
Postconf -n 完整:
postconf: warning: unreasonable macro call nesting: "mail.domain.net mydomain = domain.net myorigin = " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: " home_mailbox = mail/ mynetworks = 127.0.0.0/8 relay_domains = inet_interfaces = all inet_protocols = all mydestination = " postconf: warning: unreasonable macro call nesting: "myhostname" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost." postconf: warning: unreasonable macro call nesting: "mydomain" postconf: warning: unreasonable macro call nesting: ", localhost, " postconf: warning: unreasonable macro call nesting: "mydomain" postconf: fatal: dictionary mail_dict: macro processing error
我在您的 main.cf 上看到一個錯誤:“net_interfaces”應該只有一行
inet_interfaces
並且localhost
不是有效值來自http://www.postfix.org/postconf.5.html#inet_interfaces
inet_interfaces(預設值:全部)
此郵件系統接收郵件的網路介面地址。指定“all”以在所有網路介面上接收郵件(預設),指定“loopback-only”以僅在環回網路介面上接收郵件(Postfix 版本 2.2 及更高版本)。該參數還控制向使用者@ 發送郵件
$$ ip.address $$. 注意1:當這個參數改變時,你需要停止和啟動Postfix。
注2:地址資訊可能包含在裡面
$$ $$,但此處不需要此表格。 當 inet_interfaces 僅指定一個不是環回地址的 IPv4 和/或 IPv6 地址時,Postfix SMTP 客戶端將使用此地址作為出站郵件的 IP 源地址。Postfix 2.2 及更高版本提供對 IPv6 的支持。
在具有單獨 Postfix 實例偵聽“內部”和“外部”介面的多宿主防火牆上,這可以防止每個實例能夠訪問防火牆“另一端”的遠端 SMTP 伺服器。將 smtp_bind_address 設置為 0.0.0.0 可以避免 IPv4 的潛在問題,將 smtp_bind_address6 設置為 :: 可以解決 IPv6 的問題。
多宿主防火牆的更好解決方案是保留
inet_interfaces
預設值,而是在 master.cf SMTP 伺服器定義中使用顯式 IP 地址。這通過確保防火牆的每一端都知道另一個 IP 地址仍然是同一主機來保留 Postfix SMTP 客戶端的循環檢測。$inet_interfaces
當每個 IP 地址服務於不同的域(並且具有不同的 $myhostname 設置)時,設置為單個 IPv4 和/或 IPV6 地址主要用於在輔助 IP 地址上虛擬託管域。另請參閱 proxy_interfaces 參數,了解通過代理或地址轉換器轉發到 Postfix 的網路地址。例子:
inet_interfaces = all (DEFAULT) inet_interfaces = loopback-only (Postfix version 2.2 and later) inet_interfaces = 127.0.0.1 inet_interfaces = 127.0.0.1, [::1] (Postfix version 2.2 and later) inet_interfaces = 192.168.1.2, 127.0.0.1