我收到此错误消息已有一段时间了,但无法找到我在 Postfix 邮件配置中到底遗漏了什么。请参阅下面的 master.cf 和 main.cf。

大师

Postfix 主进程配置文件。有关格式的详细信息

有关该文件的详细信息,请参阅 Postfix master(5) 手册页。

***** 已删除未使用的物品 *****

==========================================================================

服务类型 private unpriv chroot wakeup maxproc 命令 + 参数

(是) (是) (是) (从不) (100)

==========================================================================

smtp inet n - n - - smtpd -o content_filter=smtp-amavis:127.0.0.1:10024 -o accept_override_options=no_address_mappings -o content_filter=spamassassin

spamassassin unix - nn - - 管道用户 = 无人 argv = /usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

仅为经过身份验证/TLS 客户端在端口 587 上启用 SMTP

提交 inet n - n - - smtpd -o smtpd_tls_security_level=encrypt -o smtpd_enforce_tls=yes -o smtpd_tls_auth_only=yes -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING

仅为经过身份验证/SSL 的客户端启用端口 465 上的 SMTP

smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes -o broken_sasl_auth_clients=yes -o content_filter= -o smtpd_client_restrictions=permit_sasl_authenticated,reject -0 milter_macro_daemon_name=ORIGINATING

pickup fifo n - n 60 1 pickup -o content_filter= -o accept_override_options=no_header_body_checks 清理 unix n - n - 0 清理 qmgr fifo n - n 300 1 qmgr #qmgr fifo n - n 300 1 oqmgr tlsmgr unix - - n 1000? 1 tlsmgr 重写 unix - - n - - trivial-rewrite 弹跳 unix - - n - 0 弹跳 defer unix - - n - 0 弹跳 trace unix - - n - 0 弹跳 verify unix - - n - 1 验证 flush unix n - n 1000? 0 刷新 proxymap unix - - n - - proxymap smtp unix - - n - - smtp

将邮件作为备份 MX 中继时,禁用 fallback_relay 以避免 MX 循环

中继 unix - - n - - smtp -o fallback_relay=

-o smtp_helo_timeout=5 -o smtp_connect_timeout=5

showq unix n - n - - showq 错误 unix - - n - - 错误 丢弃 unix - - n - - 丢弃 本地 unix - nn - - 本地 虚拟 unix - nn - - 虚拟 lmtp unix - - n - - lmtp anvil unix - - n - 1 anvil scache unix - - n - 1 scache

====================================================================

与非 Postfix 软件的接口。请务必查看手册

非 Postfix 软件的页面来了解它需要什么选项。

====================================================================

maildrop unix - nn - - 管道标志=DRhu 用户=vmail argv=/usr/local/bin/maildrop -d ${recipient} uucp unix - nn - - 管道标志=Fqhu 用户=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - nn - - 管道标志=F 用户=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - nn - - 管道标志=Fq. 用户=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

垃圾邮件/病毒部分

smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o disable_dns_lookups=yes -o smtp_send_xforward_command=yes 127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o accept_override_options=no_header_body_checks -o smtpd_helo_required=否 -o smtpd_client_restrictions= -o smtpd_restriction_classes= -o disable_vrfy_command=否 -o strict_rfc821_envelopes=yes

Dovecot LDA

dovecot unix - nn - - 管道标志=DRhu 用户=vmail:mail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

假期邮件

假期 unix - nn - - 管道标志=Rq 用户=度假 argv=/usr/local/cwp/php71/bin/php -q /var/spool/vacation/vacation.php ${sender} ${recipient}

SPF 检查

policyd-spf unix - nn - - spawn 用户 = policyd-spf argv = /usr/local/bin/policyd-spf /etc/python-policyd-spf/policyd-spf.conf

主目录

postfix 配置文件

如果需要调试,请取消注释

#soft_bounce=yes

后缀主

mail_owner = postfix setgid_group = postdrop delay_warning_time = 4

后缀路径

html_directory = no command_directory = /usr/sbin daemon_directory = /usr/libexec/postfixqueue_directory = /var/spool/postfix sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man

网络设置

inet_interfaces = all mydomain = microunitedbd.com myhostname = cwp.microunitedbd.com mynetworks = $config_directory/mynetworks mydestination = $myhostname, localhost.$mydomain, localhost reply_domains = proxy:mysql:/etc/postfix/mysql-relay_domains_maps.cf

邮件派送

收件人分隔符 = +

映射

alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases transport_maps = hash:/etc/postfix/transport #local_recipient_maps =

虚拟设置

virtual_alias_maps = 代理:mysql:/etc/postfix/mysql-virtual_alias_default_maps.cf,代理:mysql:/etc/postfix/mysql-virtual_alias_maps.cf,正则表达式:/etc/postfix/virtual_regexp virtual_mailbox_base = /var/vmail virtual_mailbox_domains = 代理:mysql:/etc/postfix/mysql-virtual_domains_maps.cf virtual_mailbox_maps = 代理:mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf,代理:mysql:/etc/postfix/mysql-virtual_alias_pipe_maps.cf virtual_minimum_uid = 101 virtual_uid_maps = 静态:101 virtual_gid_maps = 静态:12 virtual_transport = dovecot dovecot_destination_recipient_limit = 1

调试

debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5

验证

smtpd_sasl_auth_enable = 是 smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = $myhostname broken_sasl_auth_clients = 是 smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth

tls 配置

smtp_use_tls = 是 smtpd_use_tls = 是 smtpd_tls_security_level = 可能 smtpd_tls_loglevel = 1 smtpd_tls_received_header = 是 smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom smtp_tls_session_cache_database = btree:$data_directory/smtp_tls_session_cache

将 mail.example.com.* 更改为您的主机名

smtpd_tls_key_file = /etc/pki/tls/private/hostname.key smtpd_tls_cert_file = /etc/pki/tls/certs/hostname.crt #smtp_tls_CApath = /etc/ssl/certs #smtpd_tls_CApath = /etc/ssl/certs smtp_tls_CApath = /etc/pki/tls/certs smtpd_tls_CApath = /etc/pki/tls/certs smtpd_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt tls_preempt_cipherlist = yes smtpd_tls_mandatory_ciphers = high smtpd_tls_ciphers = high smtp_tls_mandatory_ciphers = $smtpd_tls_mandatory_ciphers smtp_tls_ciphers = $smtpd_tls_ciphers smtpd_tls_auth_only = 是 smtp_tls_security_level = 可能 smtp_tls_loglevel = 1 smtpd_tls_loglevel = 1 smtpd_tls_ask_ccert = 是

规则限制

smtpd_client_restrictions = restrict_unknown_client rejection_rbl_client dnsbl.sorbs.net #smtpd_helo_restrictions = rejection_invalid_helo_hostname, rejection_non_fqdn_helo_hostname, rejection_unknown_helo_hostname smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, rejection_unknown_sender_domain, rejection_unknown_reverse_client_hostname, rejection_unknown_client_hostname policyd-spf_time_limit = 3600 smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_client_access hash:/etc/postfix/sender_whitelist, check_client_access hash:/etc/postfix/sender_blacklist, rejection_unauth_destination, rejection_non_fqdn_sender, rejection_non_fqdn_recipient, rejection_unknown_recipient_domain, rejection_rhsbl_helo dbl.spamhaus.org, rejection_rhsbl_reverse_client dbl.spamhaus.org, rejection_rhsbl_sender dbl.spamhaus.org, permit_dnswl_client list.dnswl.org=127.0.[0..255].[1..3], rejection_rbl_client zen.spamhaus.org, rejection_rbl_client bl.spamcop.net, check_policy_service unix:/var/spool/postfix/postgrey/socket, check_policy_service unix:private/policyd-spf, check_client_access hash:/etc/postfix/rbl_override check_sender_access hash:/etc/postfix/sender_blacklist

smtpd_helo_required = 是 smtpd_helo_restrictions = permit_mynetworks permit_sasl_authenticated rejection_invalid_helo_hostname rejection_non_fqdn_helo_hostname rejection_unknown_helo_hostname unknown_local_recipient_reject_code = 550 disable_vrfy_command = 是 smtpd_data_restrictions = rejection_unauth_pipelining smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination strict_rfc821_envelopes = 是 disable_vrfy_command = 是 unknown_address_reject_code = 554 unknown_hostname_reject_code = 554 unknown_client_reject_code = 554

其他选择

电子邮件大小限制〜20Meg

邮件大小限制 = 204800000 邮箱大小限制 = 2048000000

Milter 配置

milter_default_action = 接受 milter_protocol = 6 smtpd_milters = inet:127.0.0.1:8891,inet:127.0.0.1:8893,unix:/run/spamass-milter/spamass-milter.sock non_smtpd_milters = $smtpd_milters milter_connect_macros = j {daemon_name} v {if_name} _

每个电子邮件地址每小时限制发送 50 封电子邮件

anvil_rate_time_unit = 3600s smtpd_client_message_rate_limit = 50

假期脚本

vacation_destination_recipient_limit = 1 reception_bcc_maps = 代理:mysql:/etc/postfix/mysql-virtual_vacation.cf #smtpd_milters = inet:127.0.0.1:8891 #non_smtpd_milters = $smtpd_milters #milter_default_action = 接受 #milter_protocol = 2 tls_server_sni_maps = hash:/etc/postfix/vmail_ssl.map #clamsmtp content_filter = smtp-amavis:127.0.0.1:10024 accept_override_options = no_address_mappings

请帮助我解决该问题。提前致谢。

相关内容