当电子邮件发送到不存在的域或收件人时,我希望发件人立即收到来自 mailer-daemon 的电子邮件,通知收件人不存在。
实际上,在我的系统上发生的事情是电子邮件进入延迟队列并在配置中指定的时间停留在那里。正如我 delay_warning_time = 30m
在队列中 30 分钟后设置的那样,发件人会收到通知,但这不是我想要的不存在的地址。我想要的是立即拒绝电子邮件并通知发件人。
有谁知道我做错了什么?多谢
目前,不存在的收件人电子邮件站在后缀队列中:
# 邮件 -Queue ID---Size-- ----到达时间---- -Sender/Recipient----- AA6CA48DCC 1496 2 月 12 日星期三 12:56:36 [email protected] (连接到 mx.email-srv.com[199.231.85.98]:25:连接超时) [email protected] 6FF9948DFF 1498 2 月 12 日星期三 13:07:04 [email protected] (连接到 mx.email-srv.com[199.231.85.98]:25:连接超时) [email protected]
这是我的后缀配置:
2bounce_notice_recipient = $delay_notice_recipient alias_database = hash:/etc/postfix/aliases alias_maps = hash:/etc/postfix/aliases broken_sasl_auth_clients = 否 command_directory = /usr/sbin config_directory = /etc/postfix content_filter = amavis:[127.0.0.1]:10024 daemon_directory = /usr/lib/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 delay_notice_recipient = 管理员 delay_warning_time = 30m disable_vrfy_command = 是 header_checks = 正则表达式:/etc/postfix/header_checks html_directory = 否 inet_interfaces = 所有 inet_protocols = 所有 local_recipient_maps = mail_owner = 后缀 mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man masquerade_domains = mail.domain.es mail.domain.com hostname.domain.es hostname.domain.com 最大退避时间 = 8000 秒 maximal_queue_lifetime = 5d milter_default_action = 接受 milter_protocol = 2 minimum_backoff_time = 1000s 我的目的地 = mydomain = domain.es 我的主机名 = mail.domain.es mynetworks_style = 主机 myorigin = domain.es newaliases_path = /usr/bin/newaliases.postfix non_smtpd_milters = $smtpd_milters queue_directory = /var/spool/postfix 自述目录 = /usr/share/doc/postfix-2.6.6/README_FILES 中继主机 = relocated_maps = mysql:/etc/postfix/mysql_relocated.cf sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_helo_timeout = 60s smtp_tls_CAfile = /etc/ssl/certs/sf_bundle.crt smtp_tls_note_starttls_offer = 是 smtp_tls_security_level = 可能 smtp_use_tls = 是 smtpd_banner = $myhostname ESMTP $mail_name smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org,reject_rbl_client blackholes.easynet.nl,reject_rbl_client dnsbl.njabl.org smtpd_data_restrictions = reject_unauth_pipelining smtpd_delay_reject = 是 smtpd_hard_error_limit = 12 smtpd_helo_required = 是 smtpd_helo_restrictions = permit_mynetworks、permit_sasl_authenticated、warn_if_reject reject_non_fqdn_hostname、reject_invalid_hostname、permit smtpd_milters = inet:localhost:8891 smtpd_recipient_limit = 16 smtpd_recipient_restrictions = reject_unauth_pipelining、permit_mynetworks、reject_non_fqdn_recipient、reject_unknown_recipient_domain、reject_unauth_destination、reject_unknown_helo_hostname、permit_sasl_authenticated、permit smtpd_sasl_auth_enable = 是 smtpd_sasl_local_domain = smtpd_sasl_security_options = 匿名 smtpd_sender_restrictions = permit_sasl_authenticated、permit_mynetworks、warn_if_reject reject_non_fqdn_sender、reject_unknown_sender_domain、reject_unauth_pipelining、permit smtpd_soft_error_limit = 3 smtpd_tls_cert_file = /etc/ssl/certs/domain.es.crt smtpd_tls_key_file = /etc/ssl/private/domain.key smtpd_tls_loglevel = 1 smtpd_tls_received_header = 是 smtpd_tls_security_level = 可能 smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom transport_maps = mysql:/etc/postfix/mysql_transport.cf transport_retry_time = 30s unknown_local_recipient_reject_code = 450 virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf virtual_gid_maps = 静态:5000 virtual_mailbox_base = /var/spool/mail/virtual virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf virtual_uid_maps = 静态:5000
postfix 应该如何知道电子邮件是否不存在,或者远程服务器是否不可用(您的队列卡住的邮件似乎就是这种情况)。通常,postfix 会尝试发送邮件,但除非它从远程服务器得到明确的答复,通常是 550 个答复(450 个范围表示暂时不可用),否则 postfix 无法确定电子邮件是否存在,或者是否存在是其他一些问题,可能允许稍后成功发送电子邮件。