必要に迫られて、特定のアカウントのメールの送信制限をかけることになった。具体的には、特定のユーザに関して、ドメイン外へのメール送信を禁止したいのだ。 postfixのマニュアルやら、サイトやらを参照すると、restricted_sendersとlocal_domainsいうマッピングファイルを作って(ベツに違う名前でもいいのだが。)、smtpd_sender_restrictions(またはsmtpd_recipient_restrictionsでもいいらしい。)とsmtpd_restriction_classesを書き換えることで、制限できると書いてある。 main.cf: smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/restricted_senders smtpd_restriction_class
![postfixでメールの送信制限をしたい - らくがき](https://cdn-ak-scissors.b.st-hatena.com/image/square/22f7ff05adefccf5f45a830ecd618d321fd85a39/height=288;version=1;width=512/https%3A%2F%2Fwww.wildtree.jp%2Fmt-static%2Fsupport%2Ftheme_static%2Frainier%2Fimg%2Fsiteicon-sample.png)