Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When i send email it sleep in my queue list. How can i send them out? (Fedora 15 distro).

# mailq
        /var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
pBMNMDA1009288*    2100 Fri Dec 23 00:22 <apache@example>
                     <b@a.com>
pBMNIjU5009236     2100 Fri Dec 23 00:18 <apache@example>
                 (Deferred: Connection timed out with aspmx3.googlemail.com.)
                     <b@a.com>
share|improve this question
1  
Which MTA? Sendmail, postfix, qmail, exim? –  Paul Tomblin Dec 23 '11 at 0:25

2 Answers 2

up vote 2 down vote accepted

Whenever sendmail has to deliver mails to other hosts which cannot be reached at that time, the messages are kept in the queue and are marked as “Deferred: Connection timed out”. Although the other hosts could be reached again and you want to tell sendmail to flush the mail queue, the command sendmail -q -v does not really try to reconnect to these hosts and still assumes that the connection timed out. The reason is that the hoststatus is cached, per default for a period of 30 minutes. Using sendmail -OTimeout.hoststatus=0m -q -v you can re-run the mail queue and force sendmail to reconnect to the hosts.

Alternatively, if you want to do a selective flush on perticular domain or user or recepitience mail to delete, use this command

  sendmail -qS -v apache # it will delete all mail from *@apache

  sendmail -qR -v a.com # it will delete all mail destined for recepient at user of a.com
share|improve this answer
sendmail -q

(if sendmail or postfix is your mta)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.