这是后缀状态:
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/lib/systemd/system/postfix.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2023-12-15 19:37:25 -03; 16min ago
Process: 1099 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1099 (code=exited, status=0/SUCCESS)
Dec 15 19:37:25 zeus.example.com systemd[1]: Starting Postfix Mail Transport Agent...
Dec 15 19:37:25 zeus.example.com systemd[1]: Finished Postfix Mail Transport Agent.
这是当前配置:
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory =
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mailq_path =
manpage_directory =
mydestination = $myhostname, zeus.example.com, localhost.example.com, , localhost
myorigin = /etc/mailname
newaliases_path =
readme_directory =
recipient_delimiter = +
relayhost =
sample_directory =
sendmail_path =
setgid_group =
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
unknown_local_recipient_reject_code = 550
如果我 telnet 到端口 25(在同一台服务器中),结果如下:
telnet:无法连接到远程主机:连接被拒绝
其他端口也是如此,例如 587
最后,这是输出netstat -tuplen
:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:2091 0.0.0.0:* LISTEN 0 23964 861/cpdavd - accept
tcp 0 0 127.0.0.1:9100 0.0.0.0:* LISTEN 975 18192 1151/node_exporter
tcp 0 0 127.0.0.1:9229 0.0.0.0:* LISTEN 979 24844 1210/gitlab-workhor
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 0 18484 626/dovecot
tcp 0 0 0.0.0.0:2095 0.0.0.0:* LISTEN 0 25720 620/cpsrvd (SSL) -
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 0 18500 626/dovecot
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 7215 1/init
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 979 24544 1149/puma 6.4.0 (un
tcp 0 0 127.0.1.1:9168 0.0.0.0:* LISTEN 979 18239 1141/ruby
tcp 0 0 127.0.0.1:9168 0.0.0.0:* LISTEN 979 18238 1141/ruby
tcp 0 0 0.0.0.0:2096 0.0.0.0:* LISTEN 0 25721 620/cpsrvd (SSL) -
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 21871 722/nginx: master p
tcp 0 0 127.0.0.1:8082 0.0.0.0:* LISTEN 979 18254 1354/sidekiq_export
tcp 0 0 127.0.0.1:9236 0.0.0.0:* LISTEN 979 22047 1230/gitaly
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 988 16524 648/pdns_server
tcp 0 0 127.0.0.1:8150 0.0.0.0:* LISTEN 979 16666 1206/gitlab-kas
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 21744 683/sshd: /usr/sbin
tcp 0 0 127.0.0.1:8151 0.0.0.0:* LISTEN 979 18217 1206/gitlab-kas
tcp 0 0 127.0.0.1:8153 0.0.0.0:* LISTEN 979 16664 1206/gitlab-kas
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 988 16533 648/pdns_server
tcp 0 0 127.0.0.1:8154 0.0.0.0:* LISTEN 979 22032 1206/gitlab-kas
tcp 0 0 0.0.0.0:5050 0.0.0.0:* LISTEN 0 24802 1170/nginx: master
tcp 0 0 127.0.0.1:8155 0.0.0.0:* LISTEN 979 22030 1206/gitlab-kas
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 0 24801 1170/nginx: master
tcp 0 0 127.0.0.1:8092 0.0.0.0:* LISTEN 979 25528 1352/sidekiq 6.5.12
tcp 0 0 0.0.0.0:8060 0.0.0.0:* LISTEN 0 24803 1170/nginx: master
tcp 0 0 0.0.0.0:2077 0.0.0.0:* LISTEN 0 23962 861/cpdavd - accept
tcp 0 0 0.0.0.0:2078 0.0.0.0:* LISTEN 0 23963 861/cpdavd - accept
tcp 0 0 127.0.0.1:9121 0.0.0.0:* LISTEN 978 16643 1157/redis_exporter
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 0 18502 626/dovecot
tcp 0 0 127.0.0.1:9090 0.0.0.0:* LISTEN 975 16673 1208/prometheus
tcp 0 0 0.0.0.0:2082 0.0.0.0:* LISTEN 0 25712 620/cpsrvd (SSL) -
tcp 0 0 127.0.0.1:9187 0.0.0.0:* LISTEN 977 18167 1152/postgres_expor
tcp 0 0 127.0.0.1:579 0.0.0.0:* LISTEN 0 24650 863/cPhulkd - proce
tcp 0 0 0.0.0.0:2083 0.0.0.0:* LISTEN 0 25714 620/cpsrvd (SSL) -
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 0 18486 626/dovecot
tcp 0 0 0.0.0.0:2086 0.0.0.0:* LISTEN 0 25713 620/cpsrvd (SSL) -
tcp 0 0 0.0.0.0:2087 0.0.0.0:* LISTEN 0 25715 620/cpsrvd (SSL) -
tcp 0 0 127.0.0.1:5000 0.0.0.0:* LISTEN 976 18209 1144/registry
tcp6 0 0 :::3306 :::* LISTEN 114 22846 807/mysqld
tcp6 0 0 :::110 :::* LISTEN 0 18485 626/dovecot
tcp6 0 0 :::143 :::* LISTEN 0 18501 626/dovecot
tcp6 0 0 :::111 :::* LISTEN 0 7219 1/init
tcp6 0 0 ::1:9168 :::* LISTEN 979 18237 1141/ruby
tcp6 0 0 :::80 :::* LISTEN 0 21872 722/nginx: master p
tcp6 0 0 :::53 :::* LISTEN 988 16525 648/pdns_server
tcp6 0 0 :::22 :::* LISTEN 0 21755 683/sshd: /usr/sbin
tcp6 0 0 :::993 :::* LISTEN 0 18503 626/dovecot
tcp6 0 0 :::995 :::* LISTEN 0 18487 626/dovecot
udp 0 0 0.0.0.0:53 0.0.0.0:* 988 16520 648/pdns_server
udp 0 0 0.0.0.0:111 0.0.0.0:* 0 7216 1/init
udp6 0 0 :::53 :::* 988 16521 648/pdns_server
udp6 0 0 :::111 :::* 0 7222 1/init
我该如何解决这个问题?
编辑:
> Ubuntu version: 20.04
> Codename: focal
> Architecture: x86_64
编辑2:
这是其他结果。这似乎显示了错误,但我不确定解决方案:
root@zeus:~# systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/lib/systemd/system/postfix.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2023-12-15 19:37:25 -03; 1h 44min ago
Process: 1099 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1099 (code=exited, status=0/SUCCESS)
Dec 15 19:37:25 zeus.example.com systemd[1]: Starting Postfix Mail Transport Agent...
Dec 15 19:37:25 zeus.example.com systemd[1]: Finished Postfix Mail Transport Agent.
root@zeus:~# systemctl status [email protected]
● [email protected] - Postfix Mail Transport Agent (instance -)
Loaded: loaded (/lib/systemd/system/[email protected]; enabled-runtime; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-12-15 19:37:25 -03; 1h 44min ago
Docs: man:postfix(1)
Process: 649 ExecStartPre=/usr/lib/postfix/configure-instance.sh - (code=exited, status=0/SUCCESS)
Process: 890 ExecStart=/usr/sbin/postmulti -i - -p start (code=exited, status=1/FAILURE)
Dec 15 19:37:24 zeus.example.com systemd[1]: Starting Postfix Mail Transport Agent (instance -)...
Dec 15 19:37:24 zeus.example.com postmulti[890]: fatal: bad string length 0 < 1: setgid_group =
Dec 15 19:37:25 zeus.example.com systemd[1]: [email protected]: Control process exited, code=exited, status=1/FAILURE
Dec 15 19:37:25 zeus.example.com systemd[1]: [email protected]: Failed with result 'exit-code'.
Dec 15 19:37:25 zeus.example.com systemd[1]: Failed to start Postfix Mail Transport Agent (instance -).