SENDMAIL

=Misc=
 * Show Version : /usr/sbin/sendmail -d0.1 -bt < /dev/null
 * How to manually parse the mail queue : sendmail -q -v
 * In an alternate queue(directory) : sendmail -oQ/var/spool/ -q -v

mailq | grep " (" | sed 's/\(8BITMIME\|    7BIT\)/        /' | sort | uniq -c
 * Queue processing information
 * How to use mailq (Man page) command to summarize emails in the queue (From HERE)

=Scripts= Below are several useful scripts obtained from HERE :

Removal
The proper way to remove messages from the mail queue is to use the qtool.pl program included in the contrib subdirectory of the Sendmail source code distribution. qtool.pl uses the same file locking mechanism as Sendmail. The scripts below utilize qtool.pl


 * Double Bounce Script . This removes "double bounce" messages. A "double bounce" is a message that is addressed to a non-existent user and that is sent from an invalid return address.


 * Remove Mail by Domain . This will remove all mail in the mail queue addressed to domain. Messages with multiple envelope recipients to different domains will not be deleted.


 * Remove Mail by Address . This will remove all mail in the mail queue addressed to email_address. Messages with multiple envelope recipients will not be deleted.

Search

 * Queued by Domain Name . This show all queued mail by domain. A message may be counted more than once if it has multiple envelope recipients from different domains.


 * Queued by Email Address . This will show all queued mail by email address. A message may be counted more than once if it has multiple envelope recipients.