LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

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

Rep: Reputation: 45
block IP address in Amavis


Hi

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

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Hi,

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

1 Spamassassin
Write the following rule in local.cf
Code:
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:
Code:
x.x.x.x REJECT
3. Use iptables
Code:
iptables -A INPUT -s x.x.x.x -p tcp --dport 25 -j DROP
iptables -A INPUT -s x.x.x.x -j REJECT
HTH

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


Reply

Tags
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


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 12:22 AM.

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