LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (http://www.linuxquestions.org/questions/gentoo-87/)
-   -   block IP address in Amavis (http://www.linuxquestions.org/questions/gentoo-87/block-ip-address-in-amavis-4175466931/)

cccc 06-21-2013 06:55 PM

block IP address in Amavis
 
Hi

How to block an IP address instead of domain in Amavis?

bathory 06-22-2013 04:25 AM

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


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