A Service of Softnik Technologies

DKIM / TXT scanner

You can get all your TXT / DKIM records automatically if you are able to import the data from a supported DNS provider (eg. DNS Made Easy) or if you are able to do AXFR transfers from your DNS provider. The scanner option is useful if your organization uses specific named TXT records and you want to identify domains that have one or more of those records.

What is it?

The TXT / DKIM (DomainKeys Identified Mail) scanner is an option available in the SED command-line tool for quickly checking all your domains for TXT records corresponding to a specified list of selectors. You can specify the selectors in a text file that contains one entry per line. The tool will automatically append ._domainkey to each selector before the DNS check. You can prevent this from happening by adding nodk as a command line parameter.

The script is run from the terminal (after using SSH to connect to your server). You can also run it as a cron job at regular intervals. You don't need to run it often because it is only used to identify TXT records and is not used for actual lookups. The lookups are handled by the scheduler in Watch My Domains SED. Make sure that you run it manually at first to find the approximate time it takes to run through all your domains.

The data obtained by the scanner is automatically inserted into the domain data table as TXT record names for the corresponding domain.

You can also manually enter the TXT record names for each domain using the user interface.

Adding TXT record names manually

How to use the scanner

Create a text file called selectors.txt that contains the selectors you want to scan. These should be one entry per line. You can have entries like

google
dkim1
mail
dkim2

Run the script from your terminal after changing to the root installation folder

php  sed.php txtscan=<path to selectors.txt>

For example,

php  sed.php txtscan=/home/data/selectors.txt
php  sed.php txtscan=/home/data/selectors.txt nodk debug

This will do the scanning and create the required table entries in the database. This will also take time because it has to do one DNS lookup for each selector in your list times the number of domains. If you are on a remote connection you may want to use the screen command before running the script. The debug option will show the progress in the terminal.

Here is a sample output

wmdsed@sed40:# php /home/wmdsed/sites/wmdsed50/sed.php txtscan=selectors.txt debug
        *** 2028173-sbeuaju7._domainkey.softnik.com ***
        (2%)    1/38] softnik.com
        (5%)    2/38] anilkumar.net
        (7%)    3/38] assetpunch.com
        (10%)   4/38] bidreporter.com
        (13%)   5/38] brainstormdomains.com
        (15%)   6/38] codepunch.com
        (18%)   7/38] codepun.com
        (21%)   8/38] dnlocker.com
        (23%)   9/38] dnmgr.com
        (26%)   10/38] dnpedia.com
        (28%)   11/38] domaincalendar.com
        (31%)   12/38] domainpunch.com
        (34%)   13/38] findgoodnames.com
        (36%)   14/38] freesoftware.org

Auto scan for common DKIM entries

To automatically scan for the common DKIM records, use txtscan=auto. This will scan for google._domainkey, mail._domainkey, default._domainkey and dkim._domainkey. Newer versions of the application will do this automatically. You can do it manually using the CLI tool for specific domains if the automatic scan from within the UI fails for some reason.

Selective Scanning

You can selectively scan only some domains using additional options.

To scan domains added within the last 6 hours, do

php  sed.php txtscan=/home/data/selectors.txt days=0 hours=6

To scan domains added within the last 10 days, do

php  sed.php txtscan=/home/data/selectors.txt days=10

By default, the days parameter is set to 7.

php  sed.php txtscan=/home/data/selectors.txt

is same as

php  sed.php txtscan=/home/data/selectors.txt days=7

To scan domains belonging to only a specified category, do

php  sed.php txtscan=/home/data/selectors.txt domain="[IN_Business Domains]" days=0
php  sed.php txtscan=/home/data/selectors.txt domain="[IN_Personal Domains]" days=0

To scan only a specific domain, do

php  sed.php txtscan=/home/data/selectors.txt domain=softnik.com

To scan domains belonging to only a specified category and added within the last 6 hours, do

php  sed.php txtscan=/home/data/selectors.txt domain="[IN_Business Domains]" days=0 hours=6