Postfix 在文件重新配置时导致致命错误,也无法正常工作

Postfix 在文件重新配置时导致致命错误,也无法正常工作

我对这个问题感到很困惑,我从 Vultr 安装了一个新的服务器设置,并在其中安装了 18.04 Ubuntu,我刚刚意识到我无法使用 PHPmail函数发送任何电子邮件。

它显示的错误tail -f /var/log/mail.log是:

Feb 25 22:43:11 site postfix/sendmail[20810]: fatal: /etc/postfix/mai                                                                                       n.cf, line 1: missing '=' after attribute name: "inet_interfaces# See /usr/share                                                                                       /postfix/main.cf.dist for a commented, more complete version"

主要文件是:

main.cf 文件:

inet_interfaces# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks_permit_sasl_authenticated defer_unauth_destination
myhostname = debian
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost.$mydomain, localhost, $myhostname 
relayhost = 
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all

但我没有看到任何错误,就像它所暗示的那样,inet_interfaces有人能看到我看不到的东西吗?

因为这是一个致命错误,我猜这就是我无法发送任何消息的原因。我重新配置了几次 Postfix,但总是显示错误。

相关内容