Solved

Force Qmail to send Emails in Queue.

Posted on 2009-07-09
9
1,439 Views
Last Modified: 2013-12-02
Hello,

Qmail Queue Problem:

I would like to know how to force deliver the emails in queue. I have tried the solutions listed under the following section.

http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Qmail/Q_24092478.html#a23494093

But still so many mails are remaining in queue. Also let me know if possible to force deliver each email separately using "qmhandle" or using any qmail tools.

Already tried "qmhandle -a".
0
Comment
Question by:LinuxGuru
9 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 24816961
Maybe You should take a look at maillog to find out why those deliveries fail.
The mentioned solutions (killall -ALRM qmail-send) instructs qmail to try all messages again, but it's for nothing if deliveries fail.
0
 
LVL 20

Expert Comment

by:Daniel McAllister
ID: 24823974
Do you not have the qmailctl script?

If so, enter "qmailctl doqueue" and you'll restart the entire queue sending...

However, I suspect that ravenpl is correct -- there is a REASON these messages are still in the queue -- they are not deliverable for a reason, and that reason should be gleamable from the log files for qmail-send

Hope this helps!

Dan
IT4SOHO
0
 
LVL 13

Author Comment

by:LinuxGuru
ID: 24829169
Thanks for your suggestions. I will try installing qmailctl script and let you know the results.
0
 
LVL 13

Author Comment

by:LinuxGuru
ID: 24829855
Tried installing qmailctl script and getting the following error while running the script.

/var/qmail/bin/qmailctl doqueue
Flushing timeout table and sending ALRM signal to qmail-send.
/var/qmail/bin/qmailctl: line 50: svc: command not found

Any ideas ?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 13

Author Comment

by:LinuxGuru
ID: 24829871
I have also checked the log files. I was not able to find any reasons. :(
0
 
LVL 13

Author Comment

by:LinuxGuru
ID: 24829919
Please let me know how to install this svc ...
0
 
LVL 20

Accepted Solution

by:
Daniel McAllister earned 125 total points
ID: 24834741
qmailctl is a script -- and it is usually provided with the "distribution" of qmail that you install... so again, I ask if you know which "install guide" you followed when you installed QMail to start with? If not, I can pepper you with additional questions to try to discover which one it is, or we can re-install QMail with a setup we know.

In the mean time, please post the following bits of information...

 1) Run qmail-qstat (it SHOULD be in /var/qmail/bin) and post the 2-line output here
 2) Run qmail-qread (in same location) and post the first 25 lines of the output (qmail-qread | head -25)

The last part will be kinda tricky...
 a) open (for reading) the log file for qmail-send (on my system, this is located at /var/log/qmail/send, but yours may be different)... Remember, QMail uses tai64 timing, and rolls-over log files when they reach a certain size or age -- so I'm only interested in the current log file. So, in my case, I would run:
     vi -R /var/log/qmail/send/current
 b) look at the FIRST line of output of the qmail-qread file -- it will show a MESSAGE NUMBER... for example:
       12 Jul 2009 07:07:05 GMT  #90096614  2123  
     In the above example, the message number is 90096614
 c) Go to the BOTTOM of the log file (current) and search UPWARD for that message number... in my case, in vi I'd enter
        :$
        ?90096614
     
 d) The line you "land on" should START with the words (after the tai64 time stamp) "starting delivery"... if not, press n to search for the next prior instance
 e) Post the contents of the line you landed on PLUS all of the lines that follow until the next "starting delivery" line

What you've done is:
 1) read the number of items in the queue
 2) shown the first few entries in the queue
 3) used the queue entry to get the message number for an undelivered message, then found the latest attempt by qmail-send to deliver that message

I'll await your reply!

Dan
IT4SOHO
 

0
 
LVL 13

Author Comment

by:LinuxGuru
ID: 24946347
Hi,

Am sorry for the late reply. Finally i got the solution.Some spam mails was stopping the mails. I have blocked all the ips and now everything works fine now. Thanks for all your suggestions.

Thank you very much.
0
 

Expert Comment

by:sphaerapharma
ID: 37411492
Also, you should verify whether or not, your domain IP is part of any RBL or CBL or not. If that is case, then also the messages will remain queued without getting transmitted and doqueue/flush / ALRM signal may not do any good.

Thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now