Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Gentoo This forum is for the discussion of Gentoo Linux.


LinkBack Search this Thread
Old 06-21-2013, 05:55 PM   #1
Senior Member
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,603

Rep: Reputation: 45
block IP address in Amavis


How to block an IP address instead of domain in Amavis?
Old 06-22-2013, 03:25 AM   #2
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,775

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

You don't block IPs direclty in amavisd. You can use any of the following methods:

1 Spamassassin
Write the following rule in
header BAD_IP Received =~ /x\.x\.x\.x/
describe BAD_IP Blacklisted IP 
score BAD_IP 6
2. Use the MTA.
For example you can use the access table in sendmail:
x.x.x.x REJECT
3. Use iptables
iptables -A INPUT -s x.x.x.x -p tcp --dport 25 -j DROP
iptables -A INPUT -s x.x.x.x -j REJECT

Last edited by bathory; 06-22-2013 at 04:00 AM. Reason: typos


amavis, block

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Block IP and Email address hiep.pham Linux - Server 5 11-06-2012 08:58 AM
Logical block address hdspvnr Linux - Newbie 1 09-16-2011 09:35 AM
Amavis Block Postfix (Help Please) k_oudom Linux - Networking 1 04-28-2010 01:43 AM
block mac address Ammad Linux - General 1 09-11-2005 01:00 PM
block ip address/hosts sohmc Linux - Security 3 09-19-2004 11:13 AM

All times are GMT -5. The time now is 05:33 AM.

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 @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration