Check your SenderScore IP reputation in bash

0
576
views
Return Path SenderScore Logo
SenderScore.org is a Return Path’s service that claims to have one of the most comprehensive mail spamming database in the world. See how to easily check your server’s IP reputation with them.

If your IP’s reputation score falls below 50 points (out of 100) you may experience quite a few issues getting your server’s mail delivered.
Microsoft with their Office365 and hotmail.com is quite a big fan of this service and generally moderates it’s e-mail deliverability in regards to SenderScore.
Whether you are a shared hosting provider or just simply host a couple of your friend’s websites that they never bother to update, you can easily find yourself in trouble due to infected websites spamming from your IP address.
At the bottom you will find a little bash script that simply gives you the result of the IP address that is queried (no signup required) like so:

SenderScore Script 1

IP is blurred due to security reasons

If your IP has not sent out enough mail to be noticed by SenderScore you will receive an empty response:

So without further ado here is the script:

#!/usr/bin/env bash                                                                                      │ject-with tcp-reset
# usage: ./senderscore.sh IP address

if [ -z "$1" ]
    then
    echo "You need to provide an IP address to query."
    exit
fi

IP=$1
REVERSED=`echo $IP | awk -F . '{print $4"."$3"."$2"."$1".score.senderscore.com"}'`
LOOKUP=`dig a $REVERSED +short`
echo `echo $LOOKUP | awk -F . '{print $4""}'`

You can also make a little Cron job to run every day and send you an e-mail with the results.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.