我尝试使用本地邮件配置安装后缀,但我的主机名配置有问题
我需要完整的安装过程
运行新别名 新别名:警告:valid_hostname:错误的分隔符:yasser..name 新别名:致命:文件/etc/postfix/main.cf:参数myhostname:错误的参数值:yasser..name
我希望安装成功
sudo nano /etc/postfix/main.cf
hostname =
来自:
myhostname = yasser..name
myhostname = yasser.name
(即删除多余的点)
最后,运行
sudo apt install --fix-broken
更新
/etc/postfix/main.cf
修复了此问题。此处的声明适用于 Ubuntu 20.04。
下面的语句使用不同的编辑器,还包括之前/之后的语句来确认和验证您是否正确编辑了
main.cf
:
# run cat|grep statement below to see what we currently have for the value we need to edit:
myusername@myusername:~$ cat /etc/postfix/main.cf | grep 'myhostname = '
myhostname = myusername..
# edit the /etc/postfix/main.cf file to specify the name attribute for myhostname by running the command below which uses the vi editor:
myusername@myusername:~$ sudo vi /etc/postfix/main.cf
# run cat|grep statement below to confirm the name attribute is now specified in the /etc/postfix/main.cf:
myusername@myusername:~$ cat /etc/postfix/main.cf | grep 'myhostname = '
myhostname = myusername.name