
ユーザーが同じpostfixインスタンスでホストされている特定のドメインのアドレスにのみメールを送信できるpostfixに、複数のメールボックスを持つ仮想ホスト/ドメインを追加したいと思います。
ここのシナリオは、「appname.local.domain.tld」で実行されている内部サーバーとアプリケーションがたくさんあることです。このアプリケーションが次のアドレスからのみメールを送信できるようにしたいと思います。[Eメール保護]メールで[Eメール保護]。 *@local.domain.tld からのメッセージは *@domain.tld 以外の宛先を使用できません。これは、誤って設定されたアプリケーション(または破損したアプリケーション)によるデータの漏洩を防ぎ、これらのシステムからのすべてのメッセージが組織内に残るようにするためです。
*@domain.tld および *.local.domain.tld へのメールはすべて同じ postfix インスタンスによって処理されます。 * @ domain.tldで発生するメッセージは、上記で定義された制限の影響を受けないでください。
上記のシナリオを実装するためにpostfixをどのように設定しますか?
答え1
誰が何を送信できるかを制限することについては、これがあなたが探しているものだと思います。
In the general case you need two lookup tables:
one table that lists destinations that need to be protected,
and one table that lists domains that are allowed to send to the protected destinations.
/etc/postfix/main.cf:
smtpd_recipient_restrictions =
...
check_recipient_access hash:/etc/postfix/protected_destinations
...the usual stuff...
smtpd_restriction_classes = insiders_only
insiders_only = check_sender_access hash:/etc/postfix/insiders, reject
/etc/postfix/protected_destinations:
[email protected] insiders_only
[email protected] insiders_only
/etc/postfix/insiders:
my.domain OK matches my.domain and subdomains
another.domain OK matches another.domain and subdomains