debian buster exim4 主机名 --fqdn 未返回完全限定名称

debian buster exim4 主机名 --fqdn 未返回完全限定名称

我正在运行 debian buster,并让 exim4 从 apt-listchanges 传送本地主机邮件。这有效,但我收到错误

alex@Taomon:~$ LANG=C
alex@Taomon:~$ systemctl status exim4
* exim4.service - LSB: exim Mail Transport Agent
   Loaded: loaded (/etc/init.d/exim4; generated)
   Active: active (running) since Mon 2021-11-29 10:51:40 CET; 5h 36min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1299 ExecStart=/etc/init.d/exim4 start (code=exited, status=0/SUCCESS)
    Tasks: 1 (limit: 4340)
   Memory: 5.7M
   CGroup: /system.slice/exim4.service
           `-1571 /usr/sbin/exim4 -bd -q30m

Nov 29 10:51:40 Taomon systemd[1]: Starting LSB: exim Mail Transport Agent...
Nov 29 10:51:40 Taomon exim4[1299]: Starting MTA:hostname --fqdn did not return a fully qualified name, dc_minimaldns will not
Nov 29 10:51:40 Taomon exim4[1299]: work. Please fix your /etc/hosts setup.
Nov 29 10:51:40 Taomon exim4[1299]:  exim4.
Nov 29 10:51:40 Taomon systemd[1]: Started LSB: exim Mail Transport Agent.
alex@Taomon:~$ 

多年来我读过一些方面,但从未理解如何解决它。我尝试过不止一次

dpkg-reconfigure exim4-config 

一些我希望相关信息

alex@Taomon:~$ cat /etc/hostname 
Taomon
alex@Taomon:~$ 

    root@Taomon:~# hostnamectl status
       Static hostname: Taomon
             Icon name: computer-laptop
               Chassis: laptop
            Machine ID: 84876d350fa0dd8b520fd47e0000000b
               Boot ID: 0144c780c7d747de92e1fbb41b1b506e
      Operating System: Debian GNU/Linux 10 (buster)
                Kernel: Linux 4.19.0-18-amd64
          Architecture: x86-64
    root@Taomon:~# 

接下来很向往这里 Exim 处于地址测试模式

请注意,exim 正确递送了我的邮件。但这个错误让我紧张。差点忘了

root@Taomon:~# cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   Taomon

#PS4 einbinden

#172.16.0.2      PS4

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters
root@Taomon:~# 

答案1

你必须更换线路

127.0.1.1   Taomon

/etc/hosts

127.0.1.1  taomon.example.com taomon

来自联机帮助页

设置 FQDN 的建议方法是使用 /etc/hosts、DNS 或 NIS 将主机名设为完全限定名称的别名。例如,如果主机名是“ursula”,则 /etc/hosts 中可能有一行内容:

          127.0.1.1    ursula.example.com ursula

相关内容