Results 1 to 1 of 1

Thread: Spam Check Script

  1. #1
    Member lostinspace's Avatar
    Join Date
    Jul 2003
    Location
    Colorado Springs, CO
    Posts
    124

    Default Spam Check Script

    Hey folks.

    I followed the RBL tutorial posted http://forum.ev1servers.net/showthre...threadid=34689 (I have no idea who the original poster of the tutorial is since it's duplicated on several sites). Regaurdless, the tutorial is excellent and goes great with Cheerpys dictionary attack tutorial.

    I run the script in the RBL tutorial nightly. I was wondering if anyone would be willing to give me some pointers on how to enhance the script to include RCPT e-mails for tracking?

    Here's a copy of what I have so far:
    Code:
    grep "blacklisted" /var/log/exim_mainlog -i > kilme
    tail -100 kilme
    tail /var/log/exim_paniclog
    printf "\n"
    printf "Total Spam Count = "
    grep "blacklisted" kilme -c -i
    printf "\n"
    printf "Totals Per Blacklist Domain:"
    printf "\n"
    printf "============================"
    printf "\n"
    printf "njabl.org = "
    grep "njabl.org" kilme -c
    printf "spamcop   = "
    grep "bl.spamcop" kilme -c
    printf "easynet   = "
    grep "easynet" kilme -c
    printf "spamhaus  = "
    grep "sbl.spamhaus" kilme -c
    printf "dsbl.org  = "
    grep "dsbl" kilme -c
    printf "abuseat   = "
    grep "abuseat.org" kilme -c
    printf "ordb.org  = "
    grep "ordb" kilme -c
    printf "\n"
    printf "Manual Blocks     = "
    grep "manual" kilme -c
    printf "Verify Fail       = "
    grep "verify fail" /var/log/exim_mainlog -c
    printf "No Relay          = "
    grep "not permitted" /var/log/exim_mainlog -c
    printf "Dictionary Attack = "
    grep "dictionary attack" /var/log/exim_mainlog -c
    printf "\n"
    printf "All Spam: \n"
    zgrep -ci "blacklisted" /var/log/exim_mainlog*
    printf "\n"
    Example Output:
    Code:
    Total Spam Count = 3430
    
    Totals Per Blacklist Domain:
    ============================
    njabl.org = 811
    spamcop   = 1411
    easynet   = 0
    spamhaus  = 484
    dsbl.org  = 245
    abuseat   = 478
    ordb.org  = 0
    
    Manual Blocks     = 1
    Verify Fail       = 337
    No Relay          = 126
    Dictionary Attack = 33
    
    All Spam:
    /var/log/exim_mainlog:3430
    /var/log/exim_mainlog.1.gz:0
    /var/log/exim_mainlog.2.gz:0
    /var/log/exim_mainlog.3.gz:0
    /var/log/exim_mainlog.4.gz:0
    Basically, I'd like to add each RCPT address into the totals but not sure how to grep it.
    Last edited by lostinspace; 02-10-2005 at 06:51 PM.

Similar Threads

  1. How to check spam mail in server?
    By Ghansham in forum New User Questions
    Replies: 6
    Last Post: 08-23-2011, 04:16 AM
  2. SURBL Spam check install changes for cPanel 11
    By DavidR in forum E-mail Discussions
    Replies: 0
    Last Post: 11-07-2007, 04:52 PM
  3. Exim filters for spam check
    By Wallaby in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 12-21-2006, 04:50 AM
  4. Check for spam independent of user accounts ?
    By 4u123 in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 07-28-2006, 04:49 AM
  5. How to check for spam?
    By DWHS.net in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 10-16-2002, 03:20 AM