Postfix 不断插入错​​误位置的分隔符!

Postfix 不断插入错​​误位置的分隔符!
Setting up postfix (3.3.0-1ubuntu0.1) ...
setting myhostname=akhilesh-Predator-G3-571..name in /etc/postfix

Postfix (main.cf) is now set up with the changes above.  If you need to make 
changes, edit /etc/postfix/main.cf (and others) as needed.  To view Postfix 
configuration values, see postconf(1).

After modifying main.cf, be sure to run 'service postfix reload'.

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: akhilesh-Predator-G3-571..name
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: akhilesh-Predator-G3-571..name
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 75
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

我不断将 myhostname 更改为有效名称,例如“akhilesh”并运行:

sudo service postfix restart

再次,后缀会将其更改为上述名称,或添加“..name”。这有什么问题?

答案1

尝试设置myhostname=akhilesh.name(主机名与域名“.name”(或“.localdomain”))。接下来,运行sudo service postfix reload。它改变了 myhostname 值并为我解决了错误。

答案2

Static hostname: xps.lin.com
Chassis: laptop
Operating System: Ubuntu 21.04
Kernel: Linux 5.11.0-25-generic
Architecture: x86-64

我遇到了与您同样的问题,但在我将主机名从 更改为 后,xps问题xps.lin.com就解决了。

因此我认为主机名应该具有的格式*.*.*,这就是为什么系统不断添加..主机名以符合该格式的原因。

相关内容