LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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,623

Rep: Reputation: 51
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
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration