后缀 – 邮件系统closures

我的Postfix邮件日志不断给我这个错误;

Oct 4 10:32:50 postfix/master[9760]: daemon started -- version 2.9.6, configuration /etc/postfix Oct 4 10:32:54 postfix/postqueue[9885]: warning: Mail system is down -- accessing queue directly 

由于此错误,我也无法在后缀中刷新队列。 postconf -n输出:

 alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix inet_interfaces = all inet_protocols = ipv4 mailbox_size_limit = 0 mydestination = localhost myhostname = host.example.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem smtpd_tls_key_file = /etc/ssl/private/dovecot.pem smtpd_use_tls = yes virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = lmtp:unix:private/dovecot-lmtp 

我的master.cf:

 # # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master"). # # Do not forget to execute "postfix reload" after editing this file. # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - - - - smtpd #smtp inet n - - - 1 postscreen #smtpd pass - - - - - smtpd #dnsblog unix - - - - 0 dnsblog #tlsproxy unix - - - - 0 tlsproxy submission inet n - - - - smtpd # -o syslog_name=postfix/submission # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING smtps inet n - - - - smtpd # -o syslog_name=postfix/smtps # -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATINGrelay unix - - n - - smtp flush unix n - n 1000? 0 flush trace unix - - n - 0 bounce verify unix - - n - 1 verify proxymap unix - - n - - proxymap anvil unix - - n - 1 anvil scache unix - - n - 1 scache discard unix - - n - - discard tlsmgr unix - - n 1000? 1 tlsmgr retry unix - - n - - error proxywrite unix - - n - 1 proxymap 

它与本地用户之前工作得很好,但是当我设置虚拟用户mysql停止工作。

输出ps wwaux | grep后缀:

 root 11298 0.0 0.0 25112 1644 ? Ss 10:39 0:00 /usr/lib/postfix/master postfix 11347 0.0 0.0 37820 2340 ? S 10:41 0:00 tlsmgr -l -t unix -u postfix 12194 0.0 0.0 59352 4476 ? S 12:04 0:00 smtpd -n smtp -t inet -u -c -o stress= postfix 12195 0.0 0.0 27176 1536 ? S 12:04 0:00 proxymap -t unix -u postfix 12196 0.0 0.0 27176 1528 ? S 12:04 0:00 anvil -l -t unix -u gage 12487 0.0 0.0 9388 928 pts/7 S+ 12:05 0:00 grep --color=auto postfix 

netstat的输出:

 tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 11298/master tcp 0 0 127.0.0.1:25465 0.0.0.0:* LISTEN 2917/multicraft tcp6 0 0 192.168.1.108:25569 :::* LISTEN 3791/java 

后缀实际上是下降? 如果你继续看到关于postfix master启动的消息,那么推测它也停留在两者之间? (是否logging任何东西)。

你正在运行mailq吗? 这将产生有关“邮件系统已closures”的警告。

如果您的虚拟用户设置存在问题,那么您希望获得有关mysql查询中发生的事情的一些信息。 也许用tcpdump捕获一些数据库stream量,并通过Percona的pt-query-digest和相关工具运行它。 或者,也许只是将所有查询logging到慢查询日志(即阈值执行时间= 0)。