BSD

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • an easy way to black list IP's

    6 answers - 741 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all,
    I'm using spamd and it does a great job.
    What I'm trying to figure out is how to easily add the IP's of the
    sending mail server for the few
    spam that still get through.
    By easy, I mean for clients of mine who use Exchange/, where I
    put a obsd box running spamd
    in front of Exchange.
    I am trying to find a way where I could tell my clients that when some
    spam does get through, just forward
    that spam to a particular email address. Some process will extract the
    IP of the MTA that sent the spam
    and blacklist it.
    I installed and played around with relaydb from ports, but that doesn't
    work with emails that have been forwarded.
    Any ideas?
  • No.1 | | 1180 bytes | |

    5/20/06, Craig Hammond <Craig (AT) sbisolutions (DOT) com.auwrote:
    Hi all,
    I'm using spamd and it does a great job.

    What I'm trying to figure out is how to easily add the IP's of the
    sending mail server for the few
    spam that still get through.

    By easy, I mean for clients of mine who use Exchange/, where I
    put a obsd box running spamd
    in front of Exchange.

    I am trying to find a way where I could tell my clients that when some
    spam does get through, just forward
    that spam to a particular email address. Some process will extract the
    IP of the MTA that sent the spam
    and blacklist it.

    I installed and played around with relaydb from ports, but that doesn't
    work with emails that have been forwarded.

    Any ideas?
    --

    You do know that headers can be forged right? So an automagic forward
    -|/script -blacklist from a pissed off user can end up
    blacklisting a legitimate MTA.

    You may want to just look into greylisting and using some aggressive
    milters (milter_regex is my savior).

    than that, just read aliases(5), forward(5) or look into procmail
  • No.2 | | 375 bytes | |

    Sat, May 20, 2006 at 09:49:31AM -0400, Jim Razmus wrote:
    Take a look at mail/relaydb in the ports tree. Also check the archives
    as this has been discussed at depth and included several solutions.

    Why ports instead of packages? Notably since he's already tried relaydb
    (and it doesn't do forwarded messages). Are there other flavours of
    interest?
  • No.3 | | 976 bytes | |

    * Craig Hammond <Craig (AT) sbisolutions (DOT) com.au[060520 07:19]:
    Hi all,
    I'm using spamd and it does a great job.

    What I'm trying to figure out is how to easily add the IP's of the
    sending mail server for the few
    spam that still get through.

    By easy, I mean for clients of mine who use Exchange/, where I
    put a obsd box running spamd
    in front of Exchange.

    I am trying to find a way where I could tell my clients that when some
    spam does get through, just forward
    that spam to a particular email address. Some process will extract the
    IP of the MTA that sent the spam
    and blacklist it.

    I installed and played around with relaydb from ports, but that doesn't
    work with emails that have been forwarded.

    Any ideas?

    Take a look at mail/relaydb in the ports tree. Also check the archives
    as this has been discussed at depth and included several solutions.

    Jim
  • No.4 | | 450 bytes | |

    * Darrin Chandler <dwchandler (AT) stilyagin (DOT) com[060520 10:21]:
    Sat, May 20, 2006 at 09:49:31AM -0400, Jim Razmus wrote:
    Take a look at mail/relaydb in the ports tree. Also check the archives
    as this has been discussed at depth and included several solutions.

    Why ports instead of packages? Notably since he's already tried relaydb
    (and it doesn't do forwarded messages). Are there other flavours of
    interest?
  • No.5 | | 1676 bytes | |

    Hey I got exactly what you are looking for, its pretty easy. You need
    relaydb and procmail.
    Setup a user called 'spam' then in /home/spam/

    # cat .forward
    |/home/spam/procspam.sh

    # cat .procmailrc
    # .procmailrc
    RGMAIL=/var/mail/$LGNAME
    PATH=/usr/bin:/usr/local/bin
    MAILDIR=$HME/.mailspool # all mailboxes are in .mailspool/
    #DEFAULT=$HME/.mailspool/spam
    LGFILE=/dev/null
    SHELL=/bin/sh
    :0b:
    spam

    # cat procspam.sh
    #!/bin/sh
    HME=/home/spam

    /usr/local/bin/procmail
    relaydb -f /var/spamd/.relaydb -i /var/spamd/whitelist.relaydb | cat
    spam | grep -A 1000 Received: | relaydb -bf /var/spamd/.relaydb
    rm $HME/spam

    and then of course spamd.conf
    relaydb-black:\
    :black:\
    :msg="SPAM. Your address %A is in my relaydb list.":\
    :method=exec:\
    :file=/usr/local/bin/relaydb -4lb -f /var/spamd/.relaydb:

    Craig Hammond wrote:
    Hi all,
    I'm using spamd and it does a great job.

    What I'm trying to figure out is how to easily add the IP's of the
    sending mail server for the few
    spam that still get through.

    By easy, I mean for clients of mine who use Exchange/, where I
    put a obsd box running spamd
    in front of Exchange.

    I am trying to find a way where I could tell my clients that when some
    spam does get through, just forward
    that spam to a particular email address. Some process will extract the
    IP of the MTA that sent the spam
    and blacklist it.

    I installed and played around with relaydb from ports, but that doesn't
    work with emails that have been forwarded.

    Any ideas?
  • No.6 | | 369 bytes | |

    >You do know that headers can be forged right? So an automagic forward
    |/script -blacklist from a pissed off user can end up
    >blacklisting a legitimate MTA.


    This is a good point, if you use the scripts I sent you may want to
    modify them
    to look for a password, should be simple enough.

    Mike Spenard

Re: an easy way to black list IP's


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "BSD"

EMSDN.COM