Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-10-2008, 06:24 AM   #1
Registered: Aug 2005
Distribution: Fedora 13, RHEL 5.3, Ubuntu 10.04, Debian Lenny
Posts: 128

Rep: Reputation: 16
spamassassin - block ip after several rejects


I've got a postfix-mailserver in combination with spamassassin.
It checks, whether a local mailbox exists and if not rejects the smtp-request
is it possible to block a senders ip-address let's say for an hour or a day or so,
if there was a certain amount of rejects?
so for example if a spammer tryies
a@..., b@..., c@..., d@...
the spammer's ip gets blocked for some hours and there will no smpt-session
opened at all from this ip any more during this blocking-period?


Old 04-11-2008, 12:53 PM   #2
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 237
Blog Entries: 1

Rep: Reputation: 34
Hi there,

I am not aware of any in built mechanism in spamassassin through which you can achieve.

For an alternate solution you can right down a script which can do following :
1. Monitor you log files, for each reject, there will be a corresponding entry in log file.
2. Keep a counter of IP address and no. of rejects. Define a threshold for no. of rejects.
3. If no. of rejects exceeds than threshold, run iptables command with respective parameters to block IP address.

Just update, if it solves your problem.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation rejects IP address bluethumb Red Hat 3 04-19-2007 07:39 AM
VNC server rejects connections TommyB Linux - Networking 6 11-23-2005 03:41 PM
Affero rejects user? SlackerLX General 1 01-01-2005 10:15 PM
spamassassin w/ procmail vs. spamassassin w/sendmail bleunuit Linux - Networking 1 08-01-2004 07:12 AM
xinetd rejects connections? ninen Linux - Software 2 06-06-2004 11:40 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration