首先,是的,我知道关于这个的另一个post ,但它并没有帮助我。
不久之前,我们的系统pipe理员意外地离开了公司,没有任何更换或移交工作,而现在这个问题暂时还在我身上。 我只是一个没有系统pipe理员经验的开发者。
他离开后,我们改变了所有服务器上的root密码,并且重启了运行我们后缀的服务器。 但是从那以后,没有邮件被发送。
/var/log/mail.log中的日志中充满了如下所示的条目:
postfix/smtp[31834]: fatal: unknown service: smtp/tcp postfix/smtpd[31815]: disconnect from unknown[IP censored] postfix/qmgr[31806]: warning: private/smtp socket: malformed response postfix/qmgr[31806]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description postfix/master[31799]: warning: process /usr/lib/postfix/smtp pid 31834 exit status 1 postfix/master[31799]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
以下是在10:37和10:38之间重新启动的日志:
10:31:36 postfix/qmgr[24341]: 1B4463E9C7E: from=<[email protected]>, size=1191, nrcpt=1 (queue active) 10:31:36 postfix/qmgr[24341]: E5F003F1132: from=<[email protected]>, size=12656, nrcpt=1 (queue active) 10:31:36 postfix/qmgr[24341]: 86E0E42A6A7: from=<>, size=5109, nrcpt=1 (queue active) 10:31:36 postfix/smtp[24765]: connect to b.zj.cn.x.ourdomain.tld[IP]:25: Connection refused 10:31:36 postfix/smtp[24766]: connect to b.zj.cn.x.ourdomain.tld[IP]:25: Connection refused 10:31:36 postfix/smtp[24765]: 1B4463E9C7E: to=<[email protected]>, relay=none, delay=29793, delays=29793/0.01/0/0, dsn=4.4.1, status=deferred (connect to b.zj.cn.x.ourdomain.tld[IP]:25: Connection refused) 10:31:36 postfix/smtp[24766]: E5F003F1132: to=<[email protected]>, relay=none, delay=29792, delays=29792/0.01/0/0, dsn=4.4.1, status=deferred (connect to b.zj.cn.x.ourdomain.tld[IP]:25: Connection refused) 10:31:57 postfix/smtp[24768]: connect to tmg-tmg-chn-shn-1-1.l.ourdomain.tld[IP]:25: Connection timed out 10:31:57 postfix/smtp[24768]: 86E0E42A6A7: to=<[email protected]>, relay=none, delay=29794, delays=29773/0.02/21/0, dsn=4.4.1, status=deferred (connect to tmg-tmg-chn-shn-1-1.l.ourdomain.tld[IP]:25: Connection timed out) 10:32:17 postfix/anvil[24722]: statistics: max connection rate 1/60s for (smtp:IP) at 10:28:55 10:32:17 postfix/anvil[24722]: statistics: max connection count 1 for (smtp:IP) at 10:28:55 10:32:17 postfix/anvil[24722]: statistics: max cache size 1 at 10:28:55 10:37:41 postfix/master[24334]: terminating on signal 15 10:37:45 opendkim[29682]: OpenDKIM Filter: mi_stop=1 10:37:45 opendkim[29682]: OpenDKIM Filter v2.0.1 terminating with status 0, errno = 0 10:38:51 opendkim[1188]: OpenDKIM Filter v2.0.1 starting (args: -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim/opendkim.pid -p inet:[email protected]) 10:39:03 spamd[1179]: logger: removing stderr method 10:39:05 spamd[1415]: spamd: server started on port 783/tcp (running version 3.3.1) 10:39:05 spamd[1415]: spamd: server pid: 1415 10:39:05 spamd[1415]: spamd: server successfully spawned child process, pid 1422 10:39:05 spamd[1415]: spamd: server successfully spawned child process, pid 1423 10:39:05 spamd[1415]: prefork: child states: II 10:39:23 postfix/master[1646]: daemon started -- version 2.7.1, configuration /etc/postfix 10:39:24 postfix/qmgr[1661]: A80B73EA677: from=<[email protected]>, size=1069, nrcpt=1 (queue active) 10:39:24 postfix/smtp[1663]: fatal: unknown service: smtp/tcp 10:39:24 postfix/qmgr[1661]: 981B73EAB53: from=<[email protected]>, size=1034, nrcpt=1 (queue active) 10:39:24 postfix/qmgr[1661]: 91A0F42A8CC: from=<>, size=3722, nrcpt=1 (queue active) 10:39:24 postfix/smtp[1664]: fatal: unknown service: smtp/tcp 10:39:24 postfix/smtp[1665]: fatal: unknown service: smtp/tcp 10:39:24 postfix/qmgr[1661]: 3E73F42A8CB: from=<>, size=24898, nrcpt=1 (queue active) 10:39:24 postfix/smtp[1666]: fatal: unknown service: smtp/tcp 10:39:25 postfix/qmgr[1661]: warning: private/smtp socket: malformed response 10:39:25 postfix/qmgr[1661]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description 10:39:25 postfix/master[1646]: warning: process /usr/lib/postfix/smtp pid 1663 exit status 1 10:39:25 postfix/master[1646]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
类似问题的答案都围绕着是否smtp运行chroot。 我的Debian Squeeze服务器上的默认值似乎是肯定的,所有的build议都已经在我的服务器上发生了:
service postfix restart /etc的相关文件都被复制到/var/spool/postfix/etc /var/spool/postfix/etc/services包含必需的 项:
smtp 25/tcp mail ssmtp 465/tcp smtps # SMTP over SSL
我也试图让smtp不chrooted,但没有任何改变。 有一点让我困惑的是,除了/etc/postfix/master.cf之外,还有另外一个这样的文件在/usr/lib/postfix/master.cf 。
为了完整起见,下面是人们通常所要求的内容/输出。
postconf -n输出(审查)
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no config_directory = /etc/postfix html_directory = /usr/share/doc/postfix/html inet_interfaces = mail.ourdomain.tld (...other IPs from our servers...) 127.0.0.1 lmtp_host_lookup = native mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 milter_default_action = accept milter_protocol = 2 mydestination = mail.ourdomain.tld tmg-aly-chn-hng-1-0.ourdomain.tld localhost myhostname = mail.ourdomain.tld mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 (...other IPs from our servers...) myorigin = mail.ourdomain.tld non_smtpd_milters = inet:127.0.0.1:8891 readme_directory = /usr/share/doc/postfix recipient_delimiter = + smtp_host_lookup = native smtp_sasl_path = smtpd smtp_sasl_security_options = smtpd_banner = $myhostname ESMTP $mail_name smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject smtpd_milters = inet:127.0.0.1:8891 smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject smtpd_sasl_auth_enable = yes smtpd_sasl_path = smtpd smtpd_sasl_security_options = smtpd_tls_cert_file = ...our cert path... smtpd_tls_key_file = ...our key path... smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3 smtpd_use_tls = yes
/etc/postfix/master.cf内容:
# ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - - - - smtpd #submission inet n - - - - smtpd # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_sasl_path=smtpd # -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #smtps inet n - - - - smtpd # -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #628 inet n - - - - qmqpd pickup fifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - - 300 1 oqmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - - - - smtp -o smtp_fallback_relay= # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - nn - - local virtual unix - nn - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache # # ==================================================================== # Interfaces to non-Postfix software. Be sure to examine the manual # pages of the non-Postfix software to find out what options it wants. # # Many of the following services use the Postfix pipe(8) delivery # agent. See the pipe(8) man page for information about ${recipient} # and other message envelope options. # ==================================================================== # # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # maildrop unix - nn - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} # # ==================================================================== # # Recent Cyrus versions can use the existing "lmtp" master.cf entry. # # Specify in cyrus.conf: # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4 # # Specify in main.cf one or more of the following: # mailbox_transport = lmtp:inet:localhost # virtual_transport = lmtp:inet:localhost # # ==================================================================== # # Cyrus 2.1.5 (Amos Gouaux) # Also specify in main.cf: cyrus_destination_recipient_limit=1 # #cyrus unix - nn - - pipe # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} # # ==================================================================== # Old example of delivery via Cyrus. # #old-cyrus unix - nn - - pipe # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} # # ==================================================================== # # See the Postfix UUCP_README file for configuration details. # uucp unix - nn - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) # # Other external delivery methods. # ifmail unix - nn - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - nn - - pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - nn - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - nn - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
任何想法还有什么我可以尝试,我可以看看? 它不断loggingunknown service: smtp/tcp …