Postfix 间歇性查找失败

Postfix 间歇性查找失败

当我在 postfix/mysql/dovecot/debian 上查找虚拟别名时,会出现间歇性查找错误……这种情况发生在 10% 的外发电子邮件中

失败请求的相关日志:

Aug 28 12:17:43 ns212713 postfix/smtpd[17354]: connect from localhost.localdomain[127.0.0.1]
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: connection established fd 128
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: master_notify: status 0
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: proxymap socket: wanted attribute: request
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute name: request
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute value: lookup
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: proxymap socket: wanted attribute: table
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute name: table
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute value: mysql:/etc/postfix/mysql_virtual_alias_maps.cf
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: proxymap socket: wanted attribute: flags
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute name: flags
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute value: 16448
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: proxymap socket: wanted attribute: key
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute name: key
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute value: [email protected]
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: proxymap socket: wanted attribute: (list terminator)
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: input attribute name: (end)
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: proxy_map_find: mysql:/etc/postfix/mysql_virtual_alias_maps.cf:
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: dict_mysql_get_active: found active connection to host 127.0.0.1
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: warning: mysql query failed: Lost connection to MySQL server during query
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: send attr status = 2
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: send attr value =
Aug 28 12:17:43 ns212713 postfix/proxymap[17349]: master_notify: status 1
Aug 28 12:17:43 ns212713 postfix/smtpd[17354]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
Aug 28 12:17:43 ns212713 postfix/smtpd[17354]: NOQUEUE: reject: RCPT from localhost.localdomain[127.0.0.1]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<trois-six.com>
Aug 28 12:17:43 ns212713 postfix/smtpd[17354]: lost connection after RCPT from localhost.localdomain[127.0.0.1]
Aug 28 12:17:43 ns212713 postfix/smtpd[17354]: disconnect from localhost.localdomain[127.0.0.1]
Aug 28 12:17:48 ns212713 postfix/proxymap[17349]: connection closed fd 128

后配置:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
dovecot_destination_recipient_limit = 1
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
message_size_limit = 52428800
mydestination = $myhostname, localhost.com, localhost
myhostname = mailserverroot.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = proxy:mysql:/etc/postfix/mysql_relay_domains.cf
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:3000
virtual_mailbox_base = /home/facteur
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:3000

MySQL 运行良好,同时没有大的负载,手动查询工作正常,并且 90% 的外发电子邮件都可以正常工作...

我已经尝试了一些解决方案,但没有成功(127.0.0.1/localhost、mysql 连接、chroot......)

请帮忙 !

答案1

我已经在 CentOS 上配置了 postfix+Dovecot+MySQL+postfixAdmin+roundcub+ClamAV+amavis..。

当我尝试使用 postfixAdmin 创建虚拟域和用户时,速度非常慢,然后出现以下错误

“无效查询:MySQL 服务器已消失”。

尝试的步骤:

  1. /etc/my.cnf将参数更改为wait_timeout=28800(默认)
  2. 禁用名称解析skip-name-resolve
  3. 尝试编辑并重$CONF['emailcheck_resolve_domain']试。NOconfig.inc.php

相关内容