Check send mail version:
#/usr/sbin/sendmail -d0.13 </dev/null
Kill Sendmail
#killall -HUP sendmail
Check network status of sendmail:
#netstat -tuplan | grep sendmail
# netstat -lnptu
#netstat -tulpn | grep :53
Check Sendmail routing:
#echo “3,0 info@cadena-it.com” | sendmail -bt
#echo “3,0 phongb2b@outlook.com” | sendmail -bt
# sendmail -bv phongb2b@hotmail.com
Checking Spam filter process:
#ps -aux | grep spam
Checking clamav process:
#ps -aux | grep clamav
How to view and manage sendmail SMTP queue:
- Listing all e-mails stored in Sendmail queue:
#sendmail -bp
Or
#mailq
- Checking queue for specific mail sender or recipient:
# mailq | grep -i email@domain-name.com -A 2 -B 2
- Removing all e-mails from Sendmail queue:
# rm /var/spool/mqueue/*.*
#rm /var/mqueue/*.*
Deleting all pending mails from queue:
# sendmail -qS -v domain-name.com
To delete e-mail from certain user or recipieint:
# sendmail -qR -v someone@somedomain.com