Postfix と Webmin を使用して送信メールに異なる IP を割り当てることはできません

Postfix と Webmin を使用して送信メールに異なる IP を割り当てることはできません

Mac Mini M1 を SMTP メール サーバーとして実行しようとしています。5 つの静的 IP があり、それぞれが独自のネットワーク インターフェイス上にあり、5 つの異なるドメイン (対応する PTR レコードを含む) があります。

Webmin を正常にインストールし、Postfix を使用してメール サーバーを設定しようとしています。

main.cfのデフォルト以外のパラメータは次のとおりです。

biff    no
compatibility_level 2
debugger_command    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory  /usr/share/doc/postfix/html
mail_owner  _postfix
mailbox_size_limit  0
manpage_directory   /usr/share/man
message_size_limit  10485760
mydestination   domain1.org, domain2.com, domain3.net, domain4.net, domain5.org
mynetworks  127.0.0.0/8, [::1]/128
mynetworks_style    subnet
queue_directory /private/var/spool/postfix
readme_directory    /usr/share/doc/postfix
recipient_delimiter +
sample_directory    /usr/share/doc/postfix/examples
sender_dependent_default_transport_maps hash:/etc/postfix/sender_transport
setgid_group    _postdrop
smtpd_client_restrictions   permit_mynetworks permit_sasl_authenticated permit

mydestination の下に 5 つのドメインを追加しました。それらのドメインのメールを正常に受信できました。送信メールには各ドメイン名の独自の IP を使用するようにしたいので、/etc/postfix/sender_transport に sender_dependent_default_transport_maps を追加しました。これは次のようになります。

@domain1.org    uniqueid1:
@domain2.org    uniqueid2:
@domain3.net    uniqueid3:
@domain4.com    uniqueid4:
@domain5.net    uniqueid5:

次に、master.cf の最後に、ドメインを IP に接続するために次のコードを追加しました。

uniqueid1  unix -       -       n       -       -       smtp
   -o smtp_bind_address=123.123.123.120
   -o smtp_helo_name=domain1.org
   -o syslog_name=postfix-customer-uniqueid1

uniqueid2  unix -       -       n       -       -       smtp
   -o smtp_bind_address=123.123.123.121
   -o smtp_helo_name=domain2.org
   -o syslog_name=postfix-customer-uniqueid2

uniqueid3  unix -       -       n       -       -       smtp
   -o smtp_bind_address=123.123.123.122
   -o smtp_helo_name=domain3.net
   -o syslog_name=postfix-customer-uniqueid3

uniqueid4  unix -       -       n       -       -       smtp
   -o smtp_bind_address=123.123.123.123
   -o smtp_helo_name=domain4.com
   -o syslog_name=postfix-customer-uniqueid4

uniqueid5  unix -       -       n       -       -       smtp
   -o smtp_bind_address=123.123.123.124
   -o smtp_helo_name=domain5.net
   -o syslog_name=postfix-customer-uniqueid5

postmap hash:/etc/postfix/sender_transport を実行し、postfix を何度も再起動しました。

メールを送信しようとするたびに、メールは常に domain1.org から送信され、それに対応する最初の IP は 123.123.123.120 になります。

関連情報