我收到如下错误
Feb 11 05:45:07 htz postfix/sendmail[6465]: fatal: User web6(5006) is not allowed to submit mail
Feb 11 05:45:56 htz postfix/sendmail[6466]: fatal: User web21(5012) is not allowed to submit mail
Feb 11 05:54:24 htz postfix/sendmail[6605]: fatal: User web21(5012) is not allowed to submit mail
Feb 11 05:54:39 htz postfix/sendmail[6607]: fatal: User web21(5012) is not allowed to submit mail
Feb 11 05:54:54 htz postfix/sendmail[6608]: fatal: User web21(5012) is not allowed to submit mail
Feb 11 05:55:09 htz postfix/sendmail[6666]: fatal: User web21(5012) is not allowed to submit mail
Feb 11 21:50:34 htz postfix/sendmail[28194]: fatal: User web21(5012) is not allowed to submit mail
Feb 12 08:18:32 htz postfix/sendmail[4643]: fatal: User web6(5006) is not allowed to submit mail
我的 main.cf 是
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
#queue_directory = /var/spool/postfix
authorized_submit_users = root, !static:all
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = /usr/share/doc/postfix
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = htz.halqe.com
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.localdomain
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
inet_protocols = all
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destin$
#smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
#smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
owner_request_special = no
#dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
#content_filter = amavis:[127.0.0.1]:10024
#receive_override_options = no_address_mappings
message_size_limit = 0
debug_peer_level = 10
minimal_backoff_time = 1000s
我想知道是否有办法摆脱这种困境
答案1
您是否在 Google 中输入了错误消息?我敢打赌答案是否定的。
如果我在 Google 中搜索postfix fatal user is not allowed to submit mail
短语第一个结果是此页面来自 postfix.org 文档,它会告诉你:
authorized_submit_users(默认:静态:任何人)
被授权使用 sendmail(1) 命令(以及具有特权的 postdrop(1) 帮助命令)提交邮件的用户列表。默认情况下,所有用户都允许提交邮件。否则,将在系统密码文件中查找进程的真实 UID,并且只有当相应的登录名在访问列表中时才授予访问权限。用户名“unknown”用于在密码文件中找不到其真实 UID 的进程。要拒绝所有用户的邮件提交权限,请指定一个空列表。
指定用户名列表、“/file/name”或“type:table”模式,以逗号和/或空格分隔。列表从左到右匹配,搜索在第一次匹配时停止。“/file/name”模式由其内容替换;当名称与查找键匹配时,将匹配“type:table”查找表(查找结果将被忽略)。通过在下一行开头使用空格来继续长行。指定“!pattern”以从列表中排除用户名。只有 Postfix 版本 2.4 及更高版本支持“!/file/name”格式。
例子:
authorized_submit_users = !www, static:all
正确设置您的authorized_submit_users
选项,您的错误就会消失。
下次再见阅读文档在运行 Server Fault 之前。
此网站应该是您的最后的寻求帮助——文档应该是您的第一要务。