Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

script for administering queue

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


ntserafica at gmail

Sep 1, 2010, 2:29 AM

Post #1 of 16 (1597 views)
Permalink
script for administering queue

I'm using qmqtool and qmhandle to monitor queue. I notice that when I
do qmqtool -s, it display:

Messages with local recipients: 0
Messages with remote recipients: 6
Messages not yet preprocessed: 0
Total messages in queue: 23

But when I do qmhandle -s

Total messages: 6
Messages with local recipients: 0
Messages with remote recipients: 6
Messages with bounces: 0
Messages in preprocess: 0

When I also do qmailctl queue, it display:

messages in queue: 25
messages in queue but not yet preprocessed: 0
<email address below>

I'm a little bit curious and concern about the 23 emails that qmqtool is
reporting. Where it did get the numbers? Do I need to be concern about
that report?


ar-djblists at acrconsulting

Sep 1, 2010, 3:03 AM

Post #2 of 16 (1555 views)
Permalink
Re: script for administering queue [In reply to]

On Wednesday 01 September 2010 10:29:49 Nelson Serafica wrote:
> I'm using qmqtool and qmhandle to monitor queue. I notice that when I
> do qmqtool -s, it display:
>
> Messages with local recipients: 0
> Messages with remote recipients: 6
> Messages not yet preprocessed: 0
> Total messages in queue: 23

Perhaps you have the big-todo patch installed? (see below)

> But when I do qmhandle -s
>
> Total messages: 6
> Messages with local recipients: 0
> Messages with remote recipients: 6
> Messages with bounces: 0
> Messages in preprocess: 0
>
> When I also do qmailctl queue, it display:
>
> messages in queue: 25
> messages in queue but not yet preprocessed: 0
> <email address below>
>
> I'm a little bit curious and concern about the 23 emails that qmqtool is
> reporting. Where it did get the numbers? Do I need to be concern about
> that report?

You need to be aware of how your queue monitoring programs are implemented.
Different ones make different assumptions about what patches you might also have
installed; some will count subdirectories (= directory entries) as well as
files, thus for example counting subdirectories if the big-todo patch is
installed and the queue monitoring program's author didn't take this
possibility into account.

It's therefore worth looking closely at the programs you're using - they're
generally fairly straightforward to understand - that way you know what
they're actually measuring when installed on *your* system.

With the same logic, take similar care when using such programs to
*manipulate* your queue: If their assumptions are wrong you may corrupt your
queue.

cheers,

Andrew.
--
====================================================================
* Custom email solutions * Systems Administration * Networking
http://www.acrconsulting.co.uk/email/qmail.html
====================================================================


classifieds at thecouriermail

Sep 1, 2010, 3:05 AM

Post #3 of 16 (1550 views)
Permalink
RE: script for administering queue [In reply to]

Your email/fax has been received.

Your reference number is 1-180DN9N.

Please quote this number if you need to contact us regarding your request.

Thank you for contacting the Queensland Newspapers Group.

Customers outside of Queensland during the period of daylight saving,
please contact QNP Classifieds on 132202 if you have not received
your proof/quote by your close of business.

Queensland Newspapers Group incorporates Queensland Newspapers Pty Ltd
(ABN 61 009 661 778). This document and any following pages are intended
solely for the named addressee, are confidential and may contain legally privileged information. The copying or distribution of them or any information they contain
by any other than the addressee, is prohibited. If you have received this document
in error, please notify sender by reply e-mail, and then return it by mail to - 41 Campbell Street, Bowen Hills, Queensland, 4006.

-----Original Message-----
From: ar-djblists [at] acrconsulting
Sent: 1/09/2010 8:03:03 PM
To: classifieds [at] thecouriermail
Subject: Re: script for administering queue

On Wednesday 01 September 2010 10:29:49 Nelson Serafica wrote:
> I'm using qmqtool and qmhandle to monitor queue. I notice that when I
> do qmqtool -s, it display:
>
> Messages with local recipients: 0
> Messages with remote recipients: 6
> Messages not yet preprocessed: 0
> Total messages in queue: 23

Perhaps you have the big-todo patch installed? (see below)

> But when I do qmhandle -s
>
> Total messages: 6
> Messages with local recipients: 0
> Messages with remote recipients: 6
> Messages with bounces: 0
> Messages in preprocess: 0
>
> When I also do qmailctl queue, it display:
>
> messages in queue: 25
> messages in queue but not yet preprocessed: 0
> <email address below>
>
> I'm a little bit curious and concern about the 23 emails that qmqtool is
> reporting. Where it did get the numbers? Do I need to be concern about
> that report?

You need to be aware of how your queue monitoring programs are implemented.
Different ones make different assumptions about what patches you might also have
installed; some will count subdirectories (= directory entries) as well as
files, thus for example counting subdirectories if the big-todo patch is
installed and the queue monitoring program's author didn't take this
possibility into account.

It's therefore worth looking closely at the programs you're using - they're
generally fairly straightforward to understand - that way you know what
they're actually measuring when installed...



***********************************************************************************************
This message and its attachments may contain legally privileged or confidential information.
It is intended solely for the named addressee. If you are not the addressee indicated in this
message or responsible for delivery of the message to the addressee, you may not copy or deliver
this message or its attachments to anyone. Rather, you should permanently delete this message
and its attachments and kindly notify the sender by reply e-mail. Any content of this message
and its attachments which does not relate to the official business of the sending company must
be taken not to have been sent or endorsed by that company or any of its related entities. No
warranty is made that the e-mail or attachments are free from computer virus or other defect.
***********************************************************************************************


qmail-09 at jeremykister

Sep 1, 2010, 7:15 AM

Post #4 of 16 (1548 views)
Permalink
Re: script for administering queue [In reply to]

On 9/1/2010 5:29 AM, Nelson Serafica wrote:
> I'm a little bit curious and concern about the 23 emails that qmqtool is
> reporting. Where it did get the numbers? Do I need to be concern about
> that report?

you've most likely have some queue corruption.

use the latest qmqtool (which makes only minor changes, but the output
of -s is more correct)

and then run: qmqtool -c

that'll show you what qmqtool thinks is evil in your queue.

then i'd stop all of qmail (qmail-send & friends), run qmqtool -r (to
repair the queue) and then start qmail back up.



--

Jeremy Kister
http://jeremy.kister.net./


ntserafica at gmail

Sep 1, 2010, 4:52 PM

Post #5 of 16 (1546 views)
Permalink
Re: script for administering queue [In reply to]

Could you elaborate how to properly backup qmail? Are you referring to
/var/qmail/queue directory?


Nelson

>
> then i'd stop all of qmail (qmail-send & friends), run qmqtool -r (to
> repair the queue) and then start qmail back up.
>
>
>


graham901 at webenhanced

Sep 1, 2010, 4:57 PM

Post #6 of 16 (1549 views)
Permalink
RE: script for administering queue [In reply to]

Nelson Serafica wrote:
>> then i'd stop all of qmail (qmail-send & friends), run qmqtool -r (to
>> repair the queue) and then start qmail back up.
> Could you elaborate how to properly backup qmail? Are you referring
> to /var/qmail/queue directory?

That phrase means "start qmail again", he was not referring to a file backup.

Graham


ntserafica at gmail

Sep 1, 2010, 5:55 PM

Post #7 of 16 (1550 views)
Permalink
Re: script for administering queue [In reply to]

Oopps! Thanks for the clarification.


> That phrase means "start qmail again", he was not referring to a file
> backup.


qmail-09 at jeremykister

Sep 1, 2010, 7:26 PM

Post #8 of 16 (1546 views)
Permalink
Re: script for administering queue [In reply to]

On 9/1/2010 7:57 PM, Graham Miller wrote:
> Nelson Serafica wrote:
>> Could you elaborate how to properly backup qmail? Are you referring
>> to /var/qmail/queue directory?
>
> That phrase means "start qmail again", he was not referring to a file backup.

sorry for the ambiguity :)

but, if you are actually seeking an answer to backing up the qmail
queue, it's [basically] on the qmqtool FAQ:

# to make a backup:
#stop qmail-send and qmail-smtpd(s)
qmqtool -Bb
cd /var/qmail
tar zcf queue.tgz queue.backup/

# to restore the backup:
cd /var/qmail
tar zxf queue.tgz
#stop qmail-send and qmail-smtpd(s)
qmqtool -Br
#start qmail-send

note that it's probably not a great idea to backup and restore the queue
on a running mail server - any mail that was delivered after you made
your backup will be re-delivered when you restore. This technique is
really to transfer your queue to a new machine without having to keep
the old mta running.

--

Jeremy Kister
http://jeremy.kister.net./


rejaine at bhz

Sep 2, 2010, 7:26 AM

Post #9 of 16 (1532 views)
Permalink
Re: script for administering queue [In reply to]

see qfixq tool : http://qmail.jms1.net/scripts/qfixq.shtml
and qkill's scripts : http://qmail.jms1.net/scripts/


Em 01-09-2010 23:26, Jeremy Kister escreveu:
> On 9/1/2010 7:57 PM, Graham Miller wrote:
>> Nelson Serafica wrote:
>>> Could you elaborate how to properly backup qmail? Are you referring
>>> to /var/qmail/queue directory?
>>
>> That phrase means "start qmail again", he was not referring to a file
>> backup.
>
> sorry for the ambiguity :)
>
> but, if you are actually seeking an answer to backing up the qmail
> queue, it's [basically] on the qmqtool FAQ:
>
> # to make a backup:
> #stop qmail-send and qmail-smtpd(s)
> qmqtool -Bb
> cd /var/qmail
> tar zcf queue.tgz queue.backup/
>
> # to restore the backup:
> cd /var/qmail
> tar zxf queue.tgz
> #stop qmail-send and qmail-smtpd(s)
> qmqtool -Br
> #start qmail-send
>
> note that it's probably not a great idea to backup and restore the
> queue on a running mail server - any mail that was delivered after you
> made your backup will be re-delivered when you restore. This
> technique is really to transfer your queue to a new machine without
> having to keep the old mta running.
>


christopher at ias

Sep 7, 2010, 7:15 AM

Post #10 of 16 (1484 views)
Permalink
Re: script for administering queue [In reply to]

Nelson Serafica wrote:
> I'm using qmqtool and qmhandle to monitor queue. I notice that when I
> do qmqtool -s, it display:
>
> Messages with local recipients: 0
> Messages with remote recipients: 6
> Messages not yet preprocessed: 0
> Total messages in queue: 23
>
> But when I do qmhandle -s
>
> Total messages: 6
> Messages with local recipients: 0
> Messages with remote recipients: 6
> Messages with bounces: 0
> Messages in preprocess: 0
>
> When I also do qmailctl queue, it display:
>
> messages in queue: 25
> messages in queue but not yet preprocessed: 0
> <email address below>
>
> I'm a little bit curious and concern about the 23 emails that qmqtool is
> reporting. Where it did get the numbers? Do I need to be concern about
> that report?
>
>

Like Jeremy posted, you probably have a corrupt queue. However, qmhandle
does not check for corruption in queue. It ignores files under the mess
subdirectory that do not have matching header files. Those files will be
overwritten and qmail-queue hits the inodes anyway. If you look at your
qmail-send logs, are there any reports of borken messages at all?


ntserafica at gmail

Sep 7, 2010, 6:07 PM

Post #11 of 16 (1490 views)
Permalink
Re: script for administering queue [In reply to]

Is qmail-send logs different to /var/log/qmail/smtpd/current? My
/service/qmail-send/log/run is
"exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
/var/log/qmail" but current file is not incrementing unlike in smtp
folder where current file shows tcpserver connection.

BTW, I've now fixed the corrupted queue.


On 9/7/2010 10:15 PM, Christopher Chan wrote:
> Like Jeremy posted, you probably have a corrupt queue. However,
> qmhandle does not check for corruption in queue. It ignores files
> under the mess subdirectory that do not have matching header files.
> Those files will be overwritten and qmail-queue hits the inodes
> anyway. If you look at your qmail-send logs, are there any reports of
> borken messages at all?
>


christopher at ias

Sep 8, 2010, 1:55 AM

Post #12 of 16 (1483 views)
Permalink
Re: script for administering queue [In reply to]

Nelson Serafica wrote:
> Is qmail-send logs different to /var/log/qmail/smtpd/current? My
> /service/qmail-send/log/run is
> "exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
> /var/log/qmail" but current file is not incrementing unlike in smtp
> folder where current file shows tcpserver connection.

Yes, qmail-send logs will different if the above information is true.


>
> BTW, I've now fixed the corrupted queue.
>

Yours was harmless corruption. Really corrupt queues generate errors in
qmail-send. Missing info, local or remote files.


>
> On 9/7/2010 10:15 PM, Christopher Chan wrote:
>> Like Jeremy posted, you probably have a corrupt queue. However,
>> qmhandle does not check for corruption in queue. It ignores files
>> under the mess subdirectory that do not have matching header files.
>> Those files will be overwritten and qmail-queue hits the inodes
>> anyway. If you look at your qmail-send logs, are there any reports of
>> borken messages at all?
>>


ntserafica at gmail

Sep 8, 2010, 8:55 AM

Post #13 of 16 (1484 views)
Permalink
Re: script for administering queue [In reply to]

So it means that qmail-send log is not actually logging after all.
Any idea how would I implement it? Here is my run script

[root [at] li90-8 qmail]# cat /service/qmail-smtpd/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
/var/log/qmail/smtpd
[root [at] li90-8 qmail]# cat /service/qmail-send/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
/var/log/qmail

current file on /var/log/qmail/smtpd is empty while
/var/log/qmail/smtpd/current logs fine. Files was owned by qmaill:nofiles

On 9/8/2010 4:55 PM, Christopher Chan wrote:
> Nelson Serafica wrote:
>> Is qmail-send logs different to /var/log/qmail/smtpd/current? My
>> /service/qmail-send/log/run is
>> "exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
>> /var/log/qmail" but current file is not incrementing unlike in smtp
>> folder where current file shows tcpserver connection.
>
> Yes, qmail-send logs will different if the above information is true.
>
>


christopher at ias

Sep 8, 2010, 5:00 PM

Post #14 of 16 (1474 views)
Permalink
Re: script for administering queue [In reply to]

On Wednesday, September 08, 2010 11:55 PM, Nelson Serafica wrote:
> So it means that qmail-send log is not actually logging after all. Any
> idea how would I implement it? Here is my run script
>
> [root [at] li90-8 qmail]# cat /service/qmail-send/log/run
> #!/bin/sh
> exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
> /var/log/qmail
>
> current file on /var/log/qmail/smtpd is empty while
> /var/log/qmail/smtpd/current logs fine. Files was owned by qmaill:nofiles

Maybe you want to show us your /service/qmail-send/run file's contents
first. You might be logging to syslog.


ntserafica at gmail

Sep 8, 2010, 5:47 PM

Post #15 of 16 (1467 views)
Permalink
Re: script for administering queue [In reply to]

Yes. it s syslog if I'm not mistaken because of splogger. If yes,
there's no broken messages

[root [at] li90-8 ~]# cat /service/qmail-send/run
#!/bin/sh
exec /var/qmail/rc
[root [at] li90-8 ~]# cat /var/qmail/rc
#!/bin/sh
# Using stdout for logging
# Using control/defaultdelivery from qmail-local to deliver messages by
default
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start "`cat /var/qmail/control/defaultdelivery`" splogger qmail


On 9/9/2010 8:00 AM, Christopher Chan wrote:
>
> Maybe you want to show us your /service/qmail-send/run file's contents
> first. You might be logging to syslog.
>


christopher at ias

Sep 9, 2010, 7:40 AM

Post #16 of 16 (1445 views)
Permalink
Re: script for administering queue [In reply to]

Nelson Serafica wrote:
> Yes. it s syslog if I'm not mistaken because of splogger. If yes,
> there's no broken messages

There you go. Your corrupt queue is the sort that qmail takes care of
when a new message comes in. Not the sort that was created by mucking
about with the queue while qmail-send is still running.

That's why qmhandle does not bother reporting entries under mess without
all corresponding headers. Not sure if it raises alarm bells if there
are headers but no corresponding mess file or missing headers...

>
> [root [at] li90-8 ~]# cat /service/qmail-send/run
> #!/bin/sh
> exec /var/qmail/rc
> [root [at] li90-8 ~]# cat /var/qmail/rc
> #!/bin/sh
> # Using stdout for logging
> # Using control/defaultdelivery from qmail-local to deliver messages by
> default
> exec env - PATH="/var/qmail/bin:$PATH" \
> qmail-start "`cat /var/qmail/control/defaultdelivery`" splogger qmail
>
>
> On 9/9/2010 8:00 AM, Christopher Chan wrote:
>>
>> Maybe you want to show us your /service/qmail-send/run file's contents
>> first. You might be logging to syslog.
>>

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.