. .

Debugging sendmail queue delivery

Sometime, you may want to force sendmail to do queue delivery and maybe you would like to get the detail traffic of sending.

  • Forcing sendmail to do mail delivery
    > sendmail -q -v
    

    You may:

    • add ‘-oQ/var/spool/mqueue/1h‘ to delivery other mail queue
    • add ‘-q[!][I|R|S][matchstring]
      You can also limit the jobs to those with a particular queue identifier, recipient, sender, or queue group using one of the queue modifiers. For example, “-qRberkeley” restricts the queue run to jobs that have the string “berkeley” somewhere in one of the recipient addresses. Similarly, “-qSstring” limits the run to particular senders, “-qIstring” limits it to particular queue identifiers, and “-qGstring” limits it to a particular queue group. The named queue group will be run even if it is set to have 0 runners.

      You may also place an ! before the I or R or S to indicate that jobs are limited to not including a particular queue identifier, recipient or sender. For example, “-q!Rseattle” limits the queue run to jobs that do not have the string “seattle” somewhere in one of the recipient addresses. Should you need to terminate the queue jobs currently active then sending a SIGTERM to the parent of the process (or processes) will cleanly stop the jobs.

    • add ‘-X smtp traffic log file‘ to log the smtp traffic to a log file