Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Spam Check Script

Discussion in 'General Discussion' started by lostinspace, Feb 10, 2005.

  1. lostinspace

    lostinspace Well-Known Member

    Jul 19, 2003
    Likes Received:
    Trophy Points:
    Colorado Springs, CO
    Hey folks.

    I followed the RBL tutorial posted (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:
    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 " = "
    grep "" kilme -c
    printf "spamcop   = "
    grep "bl.spamcop" kilme -c
    printf "easynet   = "
    grep "easynet" kilme -c
    printf "spamhaus  = "
    grep "sbl.spamhaus" kilme -c
    printf "  = "
    grep "dsbl" kilme -c
    printf "abuseat   = "
    grep "" kilme -c
    printf "  = "
    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:
    Total Spam Count = 3430
    Totals Per Blacklist Domain:
    ============================ = 811
    spamcop   = 1411
    easynet   = 0
    spamhaus  = 484  = 245
    abuseat   = 478  = 0
    Manual Blocks     = 1
    Verify Fail       = 337
    No Relay          = 126
    Dictionary Attack = 33
    All Spam:
    Basically, I'd like to add each RCPT address into the totals but not sure how to grep it.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 lostinspace, Feb 10, 2005
    Last edited: Feb 10, 2005

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice