Difference between revisions of "Postfix: Block sender"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (New page: Sumber: http://www.cyberciti.biz/faq/howto-blacklist-reject-sender-email-address/ Q. I’ve Postfix based CentOS Linux server. I need to blacklist email ID: user@abadboy.com . How d...) |
Onnowpurbo (talk | contribs) |
||
| Line 1: | Line 1: | ||
Sumber: http://www.cyberciti.biz/faq/howto-blacklist-reject-sender-email-address/ | Sumber: http://www.cyberciti.biz/faq/howto-blacklist-reject-sender-email-address/ | ||
| + | cd /etc/postfix | ||
| + | vi sender_access | ||
| − | + | Masukan address yang ingin di block | |
| − | + | user@abadboy.com REJECT | |
| + | myfriend@example.com OK | ||
| + | junk@spam.com REJECT | ||
| + | marketing@ REJECT | ||
| + | theboss@ OK | ||
| + | deals.marketing.com REJECT | ||
| + | somedomain.com OK | ||
| − | + | Save & close file. Lakukan postmap untuk membuat database | |
| − | + | ||
| − | + | postmap hash:sender_access | |
| − | + | ||
| − | + | Edit main.cf & tambagkan | |
| − | Save | + | |
| − | + | smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access | |
| − | + | ||
| − | 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 address. Just add to your own spamassassin configuration or to /etc/mail/spamassassin/local.cf file: | You can also use spamassassin to blacklist email address. Just add to your own spamassassin configuration or to /etc/mail/spamassassin/local.cf file: | ||
| − | + | ||
| + | vi /etc/mail/spamassassin/local.cf | ||
| + | |||
Append blacklist as follows: | Append blacklist as follows: | ||
| − | blacklist_from user@abadboy.com | + | |
| + | blacklist_from user@abadboy.com | ||
| + | |||
Save and close the file. Restart spamassassin: | Save and close the file. Restart spamassassin: | ||
| − | + | ||
| + | /etc/init.d/spamassassin restart | ||
spamassassin will marke mail as SPAM instead of rejecting the same. | spamassassin will marke mail as SPAM instead of rejecting the same. | ||
Latest revision as of 05:01, 28 November 2016
Sumber: http://www.cyberciti.biz/faq/howto-blacklist-reject-sender-email-address/
cd /etc/postfix vi sender_access
Masukan address yang ingin di block
user@abadboy.com REJECT myfriend@example.com OK junk@spam.com REJECT marketing@ REJECT theboss@ OK deals.marketing.com REJECT somedomain.com OK
Save & close file. Lakukan postmap untuk membuat database
postmap hash:sender_access
Edit main.cf & tambagkan
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 address. Just add to your own spamassassin configuration or to /etc/mail/spamassassin/local.cf file:
vi /etc/mail/spamassassin/local.cf
Append blacklist as follows:
blacklist_from user@abadboy.com
Save and close the file. Restart spamassassin:
/etc/init.d/spamassassin restart
spamassassin will marke mail as SPAM instead of rejecting the same.