1

In some cases, a mail isn't sent successfully and remains in front of the queue for some reasons. Say:

$ mailq
        /var/spool/mqueue/q6 (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
t5M34RxD020490      357 Mon Jun 22 12:04 <[email protected]>
      8BITMIME   (Deferred: 450 4.2.1 Mailbox temporary disabled for this reci)
                     <[email protected]>
/var/spool/mqueue/q2 is empty
        /var/spool/mqueue/q5 (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
t5JJG501000414      359 Sat Jun 20 04:16 <[email protected]>
      8BITMIME   (Deferred: Connection timed out with mail.server.com.)
                     <[email protected]>
        /var/spool/mqueue/q1 (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
t5JJG5RA000418      359 Sat Jun 20 04:16 <[email protected]>
      8BITMIME   (Deferred: Connection timed out with mail.server.com.)
                     <[email protected]>
/var/spool/mqueue/q3 is empty
        /var/spool/mqueue/q4 (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
t5JJGJU3000439      359 Sat Jun 20 04:16 <[email protected]>
      8BITMIME   (Deferred: Connection timed out with mail.server.com.)
                     <[email protected]>
        Total requests: 4

I'd like to make sendmail to move such deferred/timedout mails to the end of the queue, automatically. And the rest of mails will not be blocked by deferred/timed out mails. I've found a couple of shell scripts that delete deferred/time out mails from the queues, but these are the second best.

Is it possible to do this by modifying /etc/mail/sendmail.cf?

Alternatively, is it possible to move blocked mails to other empty queues? Currently, my system has 6 queues.

0

You must log in to answer this question.

Browse other questions tagged .