postfix-2.10.1-6.el7 守护进程启动失败

postfix-2.10.1-6.el7 守护进程启动失败

所以我有几台 RHEL 7.3 服务器,无法启动未改动过的 postfix 守护进程。我没有更改任何配置文件,因此服务应该可以正常启动,虽然可能无法正常工作,但至少应该可以启动。

以下是启动失败时 journalctl -xe 的输出

-- Unit postfix.service has begun starting up.
Apr 11 23:36:08 postfix/postfix-script[31187]: starting the Postfix mail system

Apr 11 23:36:08 postfix/master[31189]: fatal: 127.0.0.1:smtp: Servname not supported for ai_socktype

Apr 11 23:36:09 postfix/master[31188]: fatal: daemon initialization failure

Apr 11 23:36:10 postfix/postfix-script[31190]: fatal: mail system startup failed

Apr 11 23:36:10 systemd[1]: postfix.service: control process exited, code=exited status=1

Apr 11 23:36:10 systemd[1]: Failed to start Postfix Mail Transport Agent.
-- Subject: Unit postfix.service has failed

以下是 postconf 信息

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

debug_peer_level = 2

debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin 
ddd $daemon_directory/$process_name $process_id & sleep 5

html_directory = no

inet_interfaces = localhost

inet_protocols = all

mail_owner = postfix

mailq_path = /usr/bin/mailq.postfix

manpage_directory = /usr/share/man

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

newaliases_path = /usr/bin/newaliases.postfix

queue_directory = /var/spool/postfix

readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES

sample_directory = /usr/share/doc/postfix-2.10.1/samples

sendmail_path = /usr/sbin/sendmail.postfix

setgid_group = postdrop

unknown_local_recipient_reject_code = 550

答案1

检查端口名称是否smtp定义在/etc/services

grep smtp /etc/services

Postfix 主进程读取/etc/postfix/master.cf配置文件以了解应启动和控制哪些 Postfix 服务。其中之一是smtpd用于接收邮件的服务。配置文件使用符号名称简体中文:指定此服务将监听哪个端口。通常,您的系统应在文件中定义此端口和其他端口名称/etc/services。但您的错误消息127.0.0.1:smtp: Servname not supported for ai_socktype表明 Postfix 无法将名称转换为数字。也许该/etc/services文件不存在,或者 Postfix 无法读取它,或者它不包含 的条目smtp。在这些情况下,Postfix 可能不应该受到指责,您系统上的其他网络应用程序也可能存在问题。

相关内容