[Techtalk] block spam
Pierre Fortin
pfortin at pfortin.com
Thu May 16 17:57:55 EST 2002
On Fri, 17 May 2002 kansas_kennedy at phreaker.net wrote:
> I'm using k-mail and getting spam from a particular domain for about two
> months now. I tried to filter _any header_ equals email address with filter
> action >> bounce and apply filter on incoming messages. But kmail could not
> be able to do anything....& after setting this filter I received two more
> mails from that domain.
>
> Now, I want to block anything and everything from that particular domain
> coming to my machine through K-mail and instead, if possible, bouce that mail
> back to the root at thatdomain with the full header.
>
> Anyone knows how can I do this?
If you're running postfix, I started documenting this at
http://pfortin.com/Linux/PostFix/ If not, you are at the mercy of your
ISP or whoever runs your mailhost.
If you run any mailer (postfix, sendmail,...) and the sender is one or
a few IP addresses, you can just go "dark" on the net by adding an
iptables filter... here's a simple script I use for this:
/root/bin/drop:
#!/bin/sh
IP=$1
PORT=$2
iptables -A INPUT -s $IP -p tcp --dport $PORT -j DROP
& call it with: bin/drop IP_addr 25
I *HATE* spam and my setup pretty blocks all but the odd message every
week or two...
HTH,
Pierre
More information about the Techtalk
mailing list