반응형
*************************
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
반응형
'IT인터넷 > 리눅스' 카테고리의 다른 글
MySQL 프로시저(procedure), 함수(function) 생성/실행 권한 주기 (0) | 2024.05.24 |
---|---|
Apache 2.2 인증서 없이 443포트 운영 (0) | 2024.04.23 |
iptables 규칙에 주석 달기 (0) | 2024.04.16 |
터미널로 리눅스 네트워크 관리하기 (0) | 2024.04.15 |
PROXMOX Cluster 제거 방법 (0) | 2024.04.09 |