amispammer(1)

โœจ amispammer(1) โœจ โ€” the blacklist check bestie ๐Ÿฆ‹

๐ŸŒธ NAME ๐ŸŒธ

okay so amispammer is literally the way to know if your MX IPs are blacklisted ๐Ÿ’… no cap, it's giving clarity ๐Ÿซถ

๐Ÿ’– SYNOPSIS ๐Ÿ’–

amispammer [ -v 0|1 ] [ -i <IPaddress> | -d <domain> ] [ -T 0|1 ] [ -f
emailfrom -t emailto -s smtp_server ] [ -h ]

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

okay so amispammer is a command line tool that checks whether an IP address or domain's MX IPs are currently sitting on any blacklist because of spam reports or bad reputation ๐Ÿ˜ญ it's giving detective energy ๐Ÿ•ต๏ธโ€โ™€๏ธ

the main target audience is system admins and security officers or consultants who want to check, from the terminal, whether an IP they're responsible for (or are auditing) is blacklisted ๐Ÿงš main character energy for sure ๐Ÿ‘‘

to get the goods, amispammer checks over 90 popular blacklisting lists, the same ones used by almost every antispam professional device and software ๐Ÿ”ฅ literally the whole industry is looking at these lists, so we should too ๐Ÿ’…

optionally, it can send an email to someone once it's finished checking the different lists where the IP address shows up ๐Ÿ“ง this is SO useful if the task runs automatically at night, or even more often, in orgs where email is critical ๐ŸŒˆ and fr fr it only sends an email if the IP address appears on some blacklist, so no spam about nothing ๐Ÿ™ˆ

๐Ÿฆ‹ OPTIONS ๐Ÿฆ‹

  • -i โ€” the IP address you want checked, in A.B.C.D format ๐Ÿ’–
  • -d โ€” the domain to check ๐ŸŒธ super handy when there are several MX records ๐Ÿ’…

If you don't pass an IP or domain with -i or -d, amISpammer just assumes you want the public IP of the machine it's running on, and it detects that automatically ๐Ÿซถ

  • -T โ€” 0|1, which disables or enables the queries using threads ๐Ÿงต turning threads on makes things faster and cuts the query time, BUT it needs more memory and CPU ๐Ÿ˜ญ by default -T 1 is enabled, so threads are on unless you turn them off ๐Ÿ”ฅ
  • -f โ€” emailfrom, the email account (like sender@corp.org) that sends the email ๐Ÿ’Œ
  • -t โ€” emailto, the recipient email account (like recipient@corp.org) that receives the email ๐Ÿ’œ
  • -s โ€” smtp_server, the SMTP server IP address where the email gets sent ๐Ÿ“ฎ by default it's localhost ๐Ÿ 
  • -v โ€” 0|1, the verbose level ๐Ÿ”Š
    • 0 (the default if you don't specify anything) โ†’ only shows the blacklists where the IP address appears as listed ๐Ÿ™ˆ in this mode you can send an email with the results โœจ
    • 1 โ†’ shows every single blacklist on the terminal along with the result of checking each one (blacklisted or not blacklisted) ๐Ÿ”
  • -h โ€” asks for the program's usage info ๐Ÿงš

๐Ÿ“ CRON EXAMPLE ๐Ÿ“

okay so if you want it running automatically every night at 4:30, here's the vibe ๐ŸŒ™

30 4 * * * /usr/bin/amispammer -i <A.B.C.D> -v0 -f emailfrom@from.com -t
emailto@to.com  >> /dev/null 2>&1

๐ŸŒˆ DEPENDENCIES ๐ŸŒˆ

you'll need these perl modules, bestie ๐Ÿ’œ

  • LWP::UserAgent
  • Net::DNS
  • English
  • getopt.pl
  • threads
  • threads::shared
  • Email::Sender::Simple
  • Email::Simple::Creator
  • Email::Sender::Transport::SMTP

๐Ÿ’… AUTHOR ๐Ÿ’…

Lorenzo Martinez Rodriguez <lorenzo at lorenzomartinez dot es> โ€” the legend who made this ๐Ÿ‘‘

Copyright (C) 2009-2010, Lorenzo Martinez Rodriguez ๐Ÿซถ


bye bestie, that's the tea โœจ (manual from Linux, APRIL 2010, amispammer(1)) ๐Ÿฆ‹๐Ÿ’–