Postfixは新しいユーザーの検索を拒否します

Postfixは新しいユーザーの検索を拒否します

最近、LDAPディレクトリに新しいユーザーアカウントを追加しました。しかし、どういうわけかPostfixは電子メールを送信するときにユーザーを見つけることを拒否します。
アカウントログインはどこでも機能します。私たちのメールサーバーは独自のLDAPを持つ専用サーバーですが、これはプライマリLDAPのミラーです。 LDAPエラーのようには見えません。電子メールディレクトリが作成され、エントリがLDAPディレクトリに正しく表示されます。ただし、ログインすると、ユーザーは「選択したメールボックスなし」というメッセージのみを受け取ります(WebmailerはSOGoです)。しかし、それだけでは十分ではありません。 SOGoでも他のクライアントでも、そのユーザーに電子メールを送信しようとすると機能しません。
ログによると

Apr 30 12:03:14 mail postfix/smtpd[1355]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[email protected](opens in new tab)>: Recipient address rejected: User unknown in local recipient table; from=<[email protected](opens in new tab)> to=<[email protected](opens in new tab)> proto=ESMTP helo=<localhost>

main.cfgサフィックスに"local_recipient_maps ="行を追加してローカル受信者テーブルを無効にすると、エラーは次のように変更されます。

Mai 02 12:59:04 mail postfix/local[8909]: 1EA11100379: to=<[email protected](opens in new tab)>, relay=local, delay=0.22, delays=0.13/0.01/0/0.08, dsn=5.1.1, status=bounced (unknown user: "user")

この問題に対する解決策は思い出されません。ここでは、設定が正しくないため、このトピックに関する唯一の議論を見つけることができます。しかし、要点は、長い間構成が変更されていないことです。変更される唯一のことは、更新されたパッケージを受け取ることです。私が知る限り、この新しいユーザーは現在問題がある唯一のユーザーです。

設定情報:
SOGo 4、postfix 3.4、slapd 2.4.47、dovecot 2.3.4.1、およびpigeonhole 0.5.4のnightlyバージョンを実行するDebian 10.4。

サフィックス構成:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# 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/ssl/certs/mail.domain.de.cert.pem
smtpd_tls_key_file=/etc/ssl/private/mail.domain.de.private.pem
smtp_tls_CAfile = /etc/ssl/certs/CA.crt
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_exclude_ciphers = aNull, MD5
tls_high_cipherlist=!EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:!CAMELLIA256:+AES256:!CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:!CAMELLIA256-SHA:AES256-SHA:!CAMELLIA128-SHA:AES128-SHA
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_dh1024_param_file = /etc/ssl/private/dhparams.pem
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = mail.domain.de
alias_maps = hash:/etc/aliases
virtual_alias_maps = mysql:/etc/postfix/mysql-forwards.cf
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = domain.de, mail.domain.de
relayhost = smarthost.maindomain.de
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
message_size_limit = 67108864
mailbox_command = /usr/lib/dovecot/deliver -d $USER
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
# Mailman config
relay_domains = lists.domain.de
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1
relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman
# disable VRFY and EXPN command as per ITC recommendation
disable_vrfy_command = yes
# Older configurations combine relay control and spam control. To
# use this with Postfix ≥ 2.10 specify "smtpd_relay_restrictions=".
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_relay_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
# Configuration for rspamd
smtpd_milters=inet:localhost:11332
non_smtpd_milters = inet:localhost:11332
milter_protocol = 6
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
milter_default_action = accept

PS:postfix設定が奇妙に見える場合は、メールサーバーがインターネットに直接接続されていません。私たちは組織のネットワークを通じて組織の中央サーバーから電子メールを受け取ります。

ベストアンサー1

さて、今(非常に奇妙な)エラーが見つかりました。ユーザー認証は LDAP 経由で pam で行われます。何らかの理由で、nslcdはローカルLDAPからの最新のユーザーインポートを拒否します。 LDAP を直接検索すると、id username「ユーザーが見つかりません」のみを返す最新のユーザーを除いて、予想されるすべての項目が表示されます。構成を数回確認し、それをデスクトップLinuxシステムの構成と比較しました。唯一の違いは、デスクトップコンピュータがDebian 10 stableの代わりにDebian 11 betaを実行しており、デフォルトのLDAPを使用していることです。
メールサーバーのnslcdをデフォルトのLDAPに設定してから、ローカルLDAPディレクトリに戻してエラーを修正しました。今、それを使用しても新しいユーザーを見つけてid usernameそれらに電子メールを送信することに問題はありません。非常に奇妙なバグですが、最終的には簡単に修正することができます。

おすすめ記事