유용한 procmail 용 rule!!

procmail 관련 해서 검색을 하던 중 아래와 같은 글을 발견했다. 내 스팸 함에 들어있는 메일들과 정상적인 메일들을 대강 훑어보았더니 저 룰만 가지고도 꽤 많은 스팸을 차단 할 수 있겠다는 생각이 들었다.
http://www.itinside.net/tips/045.html
multipart/alternative 방식은 text/plain 과 text/html 이 두 가지를 모두 가지고 있는 방식인데, 스팸 메일러에서 multipart/alternative 라고 선언을 해놓고 text/plain 혹은 text/html 둘 중 한 가지 만을 가지는 요상한 메일들을 보내는 경우가 많다는 점을 이용하는 것! 정상적인 mta 를 사용해서 보낼 경우 저런 잘못된 형식의 메일은 존재하지 않을 것이기 때문에 그냥 스팸이라고 간주해도 문제가 없을 것 같다.
(둘 중 하나만 집어 넣을거면 처음부터 text/plain, text/html 로 해서 보내면 된다. 첨부파일이 있다면 multipart/alternative 가 아닌 multipart/mixed 를 사용해야 하고…)
바로 적용시켜놔봤는데 결과가 어떨지는 자고 일어나 보면 알 수 있지 않을지 😉
p.s) 원본 사이트가 없어져서 rule 을 quote 해놓습니다. 링크도 webarchive 쪽으로…

# This anti-fake method is to detect the format is incorrect.
:0 HB
* ^Content-Type: *multipart/alternative
* !^Content-Type: *text/plain
{
LOG = “[Fake] ”
:0
/dev/null
}
:0 EHB
* ^Content-Type: *multipart/alternative
* !^Content-Type: *text/html
{
LOG = “[Fake] ”
:0
/dev/null
}

Similar Posts:

Facebooktwitterlinkedinmail

One thought on “유용한 procmail 용 rule!!”

Leave a Reply to Anonymous Cancel reply