피드로 돌아가기
Built a tool to auto-reply to emails. Now I reply to spam faster than real people.
Dev.toDev.to
Backend

Python으로 Gmail 스팸 메일 자동 답변 시스템을 구축해 3주간 180건 처리, false positive 1건 발생한 경험담

Built a tool to auto-reply to emails. Now I reply to spam faster than real people.

Nico Reyes2026년 3월 31일2intermediate

Context

Gmail 기본 스팸 필터는 마케팅 이메일의 자동 답장 기능을 제공하지 않았다. 개발자는 매일 30개 이상의 리쿠루터 및 세일즈 이메일을 수동으로 처리하며 20분을 소비했다.

Technical Solution

  • Gmail IMAP/SMTP 연동 → Python imaplib, smtplib으로 이메일 조회 및 발송
  • Subject 키워드 필터링 Version 1 → "opportunity", "partnership" 포함 시 "Thanks but not interested" 자동 발송
  • 화이트리스트 기반 예외 처리 → contacts, 사전 대화 도메인, "interview/position" 포함 이메일 제외
  • 본문 패턴 매칭 Version 3 → 5개 패턴("came across your profile", "quick call", "calendly.com", "reaching out", "opportunity that might interest") 중 3개 이상 일치 시 자동 답장 발송

Impact

3주간 180건의 cold email 자동 처리. 1건 false positive(컨퍼런스 운영자 분류) 발생

Key Takeaway

단순 Subject 키워드 필터링은 의도한 이메일도 거절할 수 있으므로, 화이트리스트와 본문 다중 패턴 매칭을 함께 적용해야 한다.


이메일 자동화 시스템에서 패턴 기반 분류 시 화이트리스트 사전 구축과 본문 다중 패턴 매칭으로 false positive를 줄일 수 있다

원문 읽기