WorkHolic
Postfix 국가도메인(TLD) 차단 방법
gromet
2024. 4. 19. 19:02
728x90
반응형
*************************
Postfix 국가도메인(TLD) 차단 방법
xxx.ne.jp에서 피싱 / 스팸 메일이 많이 들어와서 국가도메인을 차단하는 방법을 찾아봤다.
아래 2가지 중에 하나만 적용하면 된다.
1. header_checks
/etc/postfix/main.cf
header_checks = regexp:/etc/postfix/header_checks
/etc/postfix/header_checks
# Some TLD rejections. Kill entire countries.
/^Received: ..gt .$/ REJECT Sorry, too much spam from Guatemala
/^Received: ..tw .$/ REJECT Sorry, too much spam from Taiwan
/^Received: ..kr .$/ REJECT Sorry, too much spam from Korea
/^Received: ..cr .$/ REJECT Sorry, too much spam from Costa Rica
/^Received: ..cn .$/ REJECT Sorry, too much spam from China
/^Received: ..ru .$/ REJECT Sorry, too much spam from RU
/^Received: ..br .$/ REJECT Sorry, too much spam from Brazil
/^Received: ..th .$/ REJECT Sorry, too much spam from Thailand
/^Received: ..tr .$/ REJECT Sorry, too much spam from Turkey
# Kill known spamming ISPs
/^Received: ..dynamic.hinet.net .$/ REJECT Sorry, too much spam from HINET
2. check_sender_access
/etc/postfix/main.cf
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_pipelining,
reject_non_fqdn_recipient,
reject_unauth_destination,
check_sender_access hash:/etc/postfix/sender_access,
reject_rbl_client zen.spamhaus.org
/etc/postfix/sender_access
/.*\.icu$/ REJECT
/.*\.cn$/ REJECT
728x90
SMALL