Pustaka Taratsa

Baca teks (EPUB): Postfix: Block Sender (en)

1 bagian

Teks ini diambil langsung dari berkas EPUB; tata letak dan gambar tidak disertakan. Untuk tampilan lengkap, silakan merujuk pada dokumen asli.

Daftar isi
  1. Postfix: Block Sender (en)
  2. References

Postfix: Block Sender (en)

Sumber: https://onnocenter.or.id/wiki/index.php/Postfix:_Block_Sender_(en)

cd /etc/postfix
vi sender_access

Enter the addresses you want to block:

[email protected]        REJECT
[email protected]    OK
[email protected]           REJECT
marketing@              REJECT
theboss@                OK
deals.marketing.com     REJECT
somedomain.com          OK

Save & close file. Run postmap to create the database:

postmap hash:sender_access

Edit main.cf & add:

smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access

Restart postfix:

/etc/init.d/postfix restart

You can also use spamassassin to blacklist email addresses. Just add to your own spamassassin configuration or to the /etc/mail/spamassassin/local.cf file:

vi /etc/mail/spamassassin/local.cf

Append blacklist as follows:

blacklist_from [email protected]

Save and close the file. Restart spamassassin:

/etc/init.d/spamassassin restart

Spamassassin will mark mail as SPAM instead of rejecting it.

References