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
Posted by gromet

블로그 이미지
나는 운이 좋은 사람이다 나는 나날이 점점 더 좋아진다 내가 하는 선택과 행동은 반드시 성공으로 이어진다 내게는 인내력과 지속력이 있다 네게는 좋은것들만 모여든다
gromet

공지사항

Yesterday
Today
Total
반응형

달력

 « |  » 2024.11
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

160x600