gpt4 book ai didi

mysql - postfix mail.warn 日志中的奇怪错误

转载 作者:行者123 更新时间:2023-11-30 21:46:14 26 4
gpt4 key购买 nike

如何避免在mail.warn文件中得到奇怪的记录?在 Debian 从 jessie 升级到 stretch 和 postfix 从 2.11.3 升级到 3.1.8 后,我开始收到它。它只在系统重启后生成一次。

尽管 mail.warn 文件中记录了奇怪的错误,但似乎 postfix 工作正常。

我现在的环境是这样的:Debian 9 扩展后缀 3.1.8鸽舍 2.2.27 (c0f36b0)10.1.23-MariaDB-9+deb9u1

Mar 18 12:57:52 jessie postfix/proxymap[862]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
Mar 18 12:57:52 jessie postfix/cleanup[861]: warning: proxy:mysql:/etc/postfix/virtual_alias_maps.cf lookup error for "email@example.com"
Mar 18 12:57:52 jessie postfix/cleanup[861]: warning: 3B61C40601: virtual_alias_maps map lookup problem for email@example.com -- message not accepted, try again later
Mar 18 12:57:54 jessie postfix/cleanup[861]: warning: proxy:mysql:/etc/postfix/virtual_alias_maps.cf lookup error for "email@example.com"
Mar 18 12:57:54 jessie postfix/cleanup[861]: warning: 7FA7542CC4: virtual_alias_maps map lookup problem for email@example.com -- message not accepted, try again later
Mar 18 12:57:54 jessie postfix/cleanup[861]: warning: proxy:mysql:/etc/postfix/virtual_alias_maps.cf lookup error for "email@example.com"
Mar 18 12:57:54 jessie postfix/cleanup[861]: warning: 8017A42CC4: virtual_alias_maps map lookup problem for email@example.com -- message not accepted, try again later
Mar 18 12:58:51 jessie postfix/cleanup[861]: warning: proxy:mysql:/etc/postfix/virtual_alias_maps.cf lookup error for "email@example.com"
Mar 18 12:58:51 jessie postfix/cleanup[861]: warning: 889C33FAA1: virtual_alias_maps map lookup problem for email@example.com -- message not accepted, try again later
Mar 18 12:58:51 jessie postfix/cleanup[861]: warning: proxy:mysql:/etc/postfix/virtual_alias_maps.cf lookup error for "email@example.com"
Mar 18 12:58:51 jessie postfix/cleanup[861]: warning: 894A13FAA1: virtual_alias_maps map lookup problem for email@example.com -- message not accepted, try again later

后缀main.cf:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
anvil_rate_time_unit = 60s
append_dot_mydomain = no
biff = no
compatibility_level = 1
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps = $virtual_mailbox_maps
local_transport = virtual
mailbox_command =
mailbox_size_limit = 0
mime_header_checks = regexp:/etc/postfix/block_attachments
mydestination = localhost
myhostname = waw.homeip.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = $mydestination
relayhost =
smtp_tls_loglevel = 1
smtp_tls_mandatory_protocols = !SSLv2,!SSLv3
smtp_tls_protocols = !SSLv2,!SSLv3
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_connection_count_limit = 10
smtpd_client_connection_rate_limit = 5
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_pipelining, reject_rbl_client zen.spamhaus.org
smtpd_error_sleep_time = 5s
smtpd_hard_error_limit = 10
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access hash:/etc/postfix/helo_access
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, check_client_access hash:/etc/postfix/rbl_override, reject_rbl_client zen.spamhaus.org, reject_rbl_client cbl.abuseat.org, permit
smtpd_relay_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, check_client_access hash:/etc/postfix/rbl_override, reject_rbl_client zen.spamhaus.org, reject_rbl_client cbl.abuseat.org, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_soft_error_limit = 5
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/waw.homeip.net/fullchain.pem
smtpd_tls_dh1024_param_file = /etc/ssl_test/dhparam/dhparams.pem
smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
smtpd_tls_key_file = /etc/letsencrypt/live/waw.homeip.net/privkey.pem
smtpd_tls_loglevel = 1
smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/etc/postfix/transport
virtual_alias_maps = proxy:mysql:/etc/postfix/virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/virtual_mailbox_domains.cf
virtual_mailbox_limit = 512000000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000

virtual_alias_maps.cf

user = postfix_user
password = password
hosts = localhost
dbname = postfix_db
table = alias
select_field = goto
where_field = address

最佳答案

  1. 尝试使用文件中的凭据连接到 MariaDB:

# mysql -upostfix_user -p

或使用本地主机 IP 地址:

# mysql -h 127.0.0.1 -upostfix_user -p

如果只有在指定IP地址时才能连接,您可以简单地将virtual_alias_maps.cf中的hosts = localhost更改为hosts = 127.0.0.1

如果两种方式都失败,则密码可能不正确。使用以下查询在 MariaDB 中重置它:

mysql> UPDATE mysql.user SET authentication_string=PASSWORD('password') where User='postfix_user' and Host='localhost'

如果用户根本不存在(极不可能),create it .

  1. 检查数据库名称 postfix_db 是否正确并存在于 MariaDB 中。

关于mysql - postfix mail.warn 日志中的奇怪错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49347978/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com