为了为我的CentOS 7服务器配置后缀服务,我编辑了/etc/posfix/main.cf,并给出了所有必需的参数。重新启动后,它将显示以下错误:
[root@centos-s-1vcpu-3gb-ams3-01 ~]# sudo systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-04-18 02:51:26 UTC; 32min ago
Process: 11874 ExecStop=/usr/sbin/postfix stop (code=exited, status=1/FAILURE)
Process: 4912 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
Process: 4910 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
Process: 4907 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=75)
Main PID: 973 (code=killed, signal=TERM)
Apr 18 02:51:25 centos-s-1vcpu-3gb-ams3-01 postfix/sendmail[4909]: warning: valid_hostname: invalid character 32(decimal): centos-s-1vcpu-3gb-ams3-01 mydoma...es = all
Apr 18 02:51:25 centos-s-1vcpu-3gb-ams3-01 aliasesdb[4907]: newaliases: warning: valid_hostname: invalid character 32(decimal): centos-s-1vcpu-3gb-ams3-01 m...es = all
Apr 18 02:51:25 centos-s-1vcpu-3gb-ams3-01 aliasesdb[4907]: newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: centos-s...es = all
Apr 18 02:51:25 centos-s-1vcpu-3gb-ams3-01 postfix/sendmail[4909]: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: centos-s-1vcp...es = all
Apr 18 02:51:25 centos-s-1vcpu-3gb-ams3-01 postfix[4912]: warning: valid_hostname: invalid character 32(decimal): centos-s-1vcpu-3gb-ams3-01 mydomain = livs...es = all
Apr 18 02:51:25 centos-s-1vcpu-3gb-ams3-01 postfix[4912]: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: centos-s-1vcpu-3gb-ams...es = all
Apr 18 02:51:26 centos-s-1vcpu-3gb-ams3-01 systemd[1]: postfix.service: control process exited, code=exited status=1
Apr 18 02:51:26 centos-s-1vcpu-3gb-ams3-01 systemd[1]: Failed to start Postfix Mail Transport Agent.
Apr 18 02:51:26 centos-s-1vcpu-3gb-ams3-01 systemd[1]: Unit postfix.service entered failed state.
Apr 18 02:51:26 centos-s-1vcpu-3gb-ams3-01 systemd[1]: postfix.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@centos-s-1vcpu-3gb-ams3-01 ~]#我已经将系统的主机名更改为smtp.livsite.com,但它也显示了错误,因此我返回到初始阶段。如何解决这个错误?
发布于 2018-04-18 03:47:13
在后缀警告中:
warning: valid_hostname: invalid character 32(decimal)
抱怨主机名包含空格字符(小数点0x20= 32 )。检查您的主机名配置是否使用空格字符。
另一种抱怨是:
fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: centos-s-1vcpu-3gb-ams...es = all
还在/etc/后缀/main.cf中抱怨myhostname。
检查并尝试:myhostname = centos-s-1vcpu-3gb-ams3-01.$mydomain
或将$mydomain替换为固定字符串如下:
myhostname = centos-s-1vcpu-3gb-ams3-01.your.domain
https://serverfault.com/questions/908161
复制相似问题