#spam
8 one-liners with this tag.
All one-liners tagged spam
Check if a server IP is on the Spamhaus blacklist
$dig +short $(echo 203.0.113.10 | awk -F. '{print $4"."$3"."$2"."$1}').zen.spamhaus.org
Delete all deferred mail from the Postfix queue
#postsuper -d ALL deferred
Delete all mail from one sender in the Postfix queue
#postqueue -p | awk -v s="info@example.com" '/^[0-9A-Za-z]/ && $7 == s {print $1}' | tr -d '*!' | postsuper -d -
Find a hacked mail account by its SMTP logins
#grep -o "sasl_username=[^ ,]*" /var/log/maillog | sort | uniq -c | sort -rn | head -20
Find the top senders in the Postfix queue
$postqueue -p | awk '/^[0-9A-Za-z]/ {print $7}' | sort | uniq -c | sort -rn | head -20
Permanently delete all spam comments
$wp comment list --status=spam --format=ids --path=/var/www/vhosts/example.com/httpdocs | xargs -r wp comment delete --force --path=/var/www/vhosts/example.com/httpdocs
Show outgoing SMTP connections and their processes
#ss -Htnp state established '( dport = :25 )'
Trace local PHP mail sending to a system user
#grep "postfix/pickup" /var/log/maillog | grep -o "uid=[0-9]*" | sort | uniq -c | sort -rn | head -10