• /etc/postfix/main.cf
		myhostname = FDQN
		mydomain = FDQN
		 #inet_protocols = all
		inet_protocols = ipv4
		#home_mailbox = Maildir/
		home_mailbox = Maildir/
		smtpd_sasl_auth_enable = yes
		broken_sasl_auth_clients = yes
                smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
                inet_interfaces = all

 #### by lapidem
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination

Postfixが送信者ドメインを解決できない場合に配送をリレーしないようにするには、main.cfファイルで smtpd_sender_restrictions および smtpd_recipient_restrictions ディレクティブを使用し、reject_unknown_sender_domain を設定します。これにより、ドメイン解決に失敗した送信者からのメールの転送が拒否され、意図しないメールのリレーを防ぐことができます。

  1. main.cf ファイルの編集:
    • Postfixのメイン設定ファイル main.cf を開きます。
    • smtpd_sender_restrictions および smtpd_recipient_restrictions ディレクティブに reject_unknown_sender_domain を追加します。
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_recipient_restrictions = reject_unknown_sender_domain

apt -y install mailutils