Meidokon Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Useful(?) links

  • furinkan's stuff

  • Postfix snippets


  • SystemInfo

  • This sidebar

Navigation

  • FrontPage
  • RecentChanges
  • FindPage
  • HelpContents
Revision 1 as of 2010-02-04 08:06:01
MeidokonWiki:
  • Postfix
  • Fail2ban_against_spammers

Postfix/Fail2ban_against_spammers

From http://archives.neohapsis.com/archives/postfix/2009-03/0063.html

Spammers might get rejected during the SMTP transaction, but it'd be nice if we could cut them off even earlier. Fail2ban gives us a way to do just that.


I use fail2ban with this:

failregex = reject: RCPT from (.*)\[<HOST>\]: (550|554).*(Recipient address rejected: User unknown|Relay access denied)

Watch for wrapping, as this is all on one line in the /etc/fail2ban/filter.d/postfix.conf

I have it set in /etc/fail2ban/jail.conf to block the source IP address for 1 hour after 5 associated maillog entries, and it's been working fine here for quite some time.

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01
MoinMoin Release 1.9.11 [Revision release], Copyright by Juergen Hermann et al.