<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Hi all,<br>
<br>
I solve my problem. I just change the line 88 of check_mailq.pl written
by Don Badrak as this:<br>
<br>
## open mailq <br>
<br>
if ( defined $utils::PATH_TO_MAILQ && -x
$utils::PATH_TO_MAILQ) {<br>
- if (! open (MAILQ, "$utils::PATH_TO_MAILQ | " ) ) <br>
+ if (! open (MAILQ, "$utils::PATH_TO_MAILQ $configfile | " ) ) <br>
<br>
So now, the mailq command is /usr/bin/mailq -C/etc/mail/sendmail.cf or
/usr/bin/mailq -C/etc/mail/sendmail.cf.delivery if i use the -f option.<br>
<br>
Carole.<br>
<br>
carole verdon wrote:<br>
<blockquote type="cite" cite="mid40D2A1D2.8010001@cict.fr">
<title></title>
But i have got the qf* files in /var/spool/mqueue1:<br>
<br>
[nagios@gw1-mail plugins-scripts]$ ls -la /var/spool/mqueue1|more<br>
...<br>
-rw------- 1 root root 1214 Jun 18 08:45 qfi5F7lLQU018592<br>
-rw------- 1 root root 1270 Jun 18 08:38 qfi5F7upaq026391<br>
-rw------- 1 root root 1520 Jun 18 08:45 qfi5F8qxkY015433<br>
-rw------- 1 root root 1303 Jun 18 08:25 qfi5F9lA9f017520<br>
-rw------- 1 root root 1077 Jun 18 08:28 qfi5FA0iYO002193<br>
-rw------- 1 root root 910 Jun 18 08:16 qfi5FACOZD018046<br>
-rw------- 1 root root 1226 Jun 18 08:28 qfi5FAq6Po018406<br>
-rw------- 1 root root 2513 Jun 18 08:35 qfi5FArclt020854<br>
-rw------- 1 root root 2513 Jun 18 08:35 qfi5FB2wV2001275<br>
-rw------- 1 root root 1258 Jun 18 08:19 qfi5FBiTTq018978<br>
-rw------- 1 root root 2223 Jun 18 08:28 qfi5FBQnq6030125<br>
-rw------- 1 root root 1231 Jun 18 08:40 qfi5FBvuj4002931<br>
-rw------- 1 root root 1272 Jun 18 08:45 qfi5FCbjn7032123<br>
-rw------- 1 root root 943 Jun 18 08:31 qfi5FCefJ0002705<br>
-rw------- 1 root root 1878 Jun 18 08:22 qfi5FCjQJS006138<br>
-rw------- 1 root root 1616 Jun 18 08:45 qfi5FCk5El006633<br>
-rw------- 1 root root 2513 Jun 18 08:45 qfi5FCQAPp023249<br>
-rw------- 1 root root 2513 Jun 18 08:45 qfi5FCU7k7026177<br>
-rw------- 1 root root 1275 Jun 18 08:38 qfi5FD7WRd022388<br>
-rw------- 1 root root 1196 Jun 18 08:09 qfi5FDEQ1a027435<br>
-rw------- 1 root root 2513 Jun 18 08:35 qfi5FDU9dP006223<br>
-rw------- 1 root root 911 Jun 18 08:19 qfi5FEFG4n006807<br>
-rw------- 1 root root 2513 Jun 18 08:35 qfi5FENTg0012842<br>
-rw------- 1 root root 1159 Jun 18 08:28 qfi5FFDqRr011585<br>
-rw------- 1 root root 1020 Jun 18 07:50 qfi5FFnFdn002657<br>
-rw------- 1 root root 919 Jun 18 08:03 qfi5FFNnS0017593<br>
-rw------- 1 root root 1233 Jun 18 08:19 qfi5FFPoRN019173<br>
-rw------- 1 root root 993 Jun 18 08:06 qfi5FFxFkg012137<br>
-rw------- 1 root root 1241 Jun 18 08:19 qfi5FGCagP023592<br>
-rw------- 1 root root 1213 Jun 18 08:19 qfi5FGDVOC024196<br>
-rw------- 1 root root 2512 Jun 18 08:19 qfi5FGjWkr014177<br>
-rw------- 1 root root 2513 Jun 18 08:19 qfi5FGw2UF022547<br>
-rw------- 1 root root 1292 Jun 18 08:19 qfi5FHDSLS032581<br>
........<br>
<br>
<br>
In fact, i find what it's my problem. The /usr/bin/mailq command count
only the number of "requests" for the queue directory: /var/spool/mqueue <br>
<br>
[nagios@gw1-mail plugins-scripts]$ ./check_mailq -w 200 -c 500 -f
/etc/mail/sendmail.cf -v <br>
qpattern before open mailq= /var/spool/mqueue <br>
after open, mailq= /usr/bin/mailq <br>
qpattern apres if= /var/spool/mqueue <br>
/usr/bin/mailq = /var/spool/mqueue (618 requests) <br>
size = 618, msg_q = 618 warn=200 crit=500 <br>
msg_q = 618 warn=200 crit=500 <br>
CRITICAL: mailq is 618 (threshold c = 500)|unsent=618;200;500;0 <br>
<br>
<br>
So when i want run the script to the queue directory:
/var/spool/mqueue1, it don't work. <br>
<br>
[nagios@gw1-mail plugins-scripts]$ ./check_mailq -w 20 -c 50 -f
/etc/mail/sendmail.cf.delivery -v <br>
qpattern before open mailq= /var/spool/mqueue1 <br>
after open, mailq= /usr/bin/mailq <br>
OK: mailq is empty|unsent=0;20;50;0 <br>
<br>
<br>
To work, the mailq command must be /usr/sbin/sendmail -bp -C
configfile_sendmail where configfile_sendmail = /etc/mail/sendmail.cf or
/etc/mail/sendmail.cf.delivery<br>
<br>
How can i do that?<br>
<br>
Thanks for your help. <br>
<br>
Carole. <br>
<br>
<br>
Don Badrak wrote:<br>
<blockquote type="cite"
cite="midPine.SGI.4.58.0406171014490.12768334@brain.tco.census.gov">
<pre wrap="">Carole,
On Thu, 17 Jun 2004, carole verdon wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I use the patch of check_mailq submitted by Don Badrak.
<a class="moz-txt-link-freetext"
href="http://sourceforge.net/tracker/index.php?func=detail&aid=880904&group_id=29880&atid=397599">http://sourceforge.net/tracker/index.php?func=detail&aid=880904&group_id=29880&atid=397599</a>
I don't understand the result of this plugin.
When i execute the following command in local mode, i obtain:
[nagios@gw1-mail libexec]$./check_mailq -w 20 -c 50 -f /etc/mail/sendmail.cf.delivery (to take the queue directory /var/spool/mqueue1)
OK: mailq is empty|unsent=0;20;50;0
</pre>
</blockquote>
<pre wrap=""><!---->
These numbers mean (I didn't write that part):
0 no message in the queue
20 warning level
50 critical level
0 (hardcoded to 0, not sure what it's for)
</pre>
<blockquote type="cite">
<pre wrap="">Whereas the queue directory /var/spool/mqueue1 contains a lot of files.
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">[nagios@gw1-mail libexec]$ ls -la /var/spool/mqueue1|more
total 19208
drwxr-xr-x 2 root mail 356352 Jun 17 08:36 .
drwxr-xr-x 17 root root 4096 May 27 11:31 ..
-rw------- 1 root root 120 Jun 14 08:43 dfi5E6hCVr020981
-rw------- 1 root root 8491 Jun 14 08:45 dfi5E6jck4023564
-rw------- 1 root root 18003 Jun 14 09:02 dfi5E72Glg006944
-rw------- 1 root root 18003 Jun 14 09:36 dfi5E7aFHI031188
-rw------- 1 root root 18009 Jun 14 09:41 dfi5E7f0Z9001998
-rw------- 1 root root 18009 Jun 14 09:45 dfi5E7jOiU005300
-rw------- 1 root root 18003 Jun 14 09:20 dfi5E7KPYg021585
-rw------- 1 root root 18003 Jun 14 09:21 dfi5E7LAu9021927
-rw------- 1 root root 18003 Jun 14 09:21 dfi5E7LuPY022338
-rw------- 1 root root 18003 Jun 14 09:50 dfi5E7oAii008351
-rw------- 1 root root 18108 Jun 14 09:25 dfi5E7PjTM024651
-rw------- 1 root root 18003 Jun 14 09:52 dfi5E7qkX2010331
-rw------- 1 root root 593 Jun 14 09:55 dfi5E7t2KY011829
-rw------- 1 root root 18108 Jun 14 09:30 dfi5E7UuW0027677
-rw------- 1 root root 18108 Jun 14 09:33 dfi5E7Xx8X029494
-rw------- 1 root root 18003 Jun 14 09:35 dfi5E7ZTbH030643
-rw------- 1 root root 208387 Jun 14 11:51 dfi5E9owJa022588
-rw------- 1 root root 1683 Jun 14 14:21 dfi5ECL3bL013410
-rw------- 1 root root 1904 Jun 14 14:49 dfi5ECndk5002742
-rw------- 1 root root 48 Jun 15 08:41 dfi5ECq4Xn004549
-rw------- 1 root root 1086 Jun 14 14:27 dfi5ECRHMn018953
-rw------- 1 root root 11199 Jun 14 14:58 dfi5ECw3wi009133
-rw------- 1 root root 11199 Jun 14 14:58 dfi5ECw3xC009133
-rw------- 1 root root 11199 Jun 14 14:58 dfi5ECw3xU009133
-rw------- 1 root root 8715 Jun 14 15:48 dfi5EDmXmS015674
-rw------- 1 root root 3063 Jun 14 15:32 dfi5EDWsC4003637
-rw------- 1 root root 38504 Jun 14 16:37 dfi5EEarJ1016521
-rw------- 1 root root 38504 Jun 14 16:38 dfi5EEarJl016521
........
Why does it find the queue directory is empty?
</pre>
</blockquote>
<pre wrap=""><!---->
Yes, it has a lot of files, but there are no qf* files (the queue control
file). Without a corresponding qf* file, the df* (data file, the actual
message) files will stay there. Sounds like you had some problems with
your mail system somehow, where either the qf* files didn't get created
(sendmail hung or file system problems) or the df* files didn't get
deleted.
</pre>
<blockquote type="cite">
<pre wrap="">As i'm not a programmer, can someone answer to my question and help me?
My OS is a linux v2.4.
</pre>
</blockquote>
<pre wrap=""><!---->
Don
</pre>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
**********************************
VERDON Carole
Ingénieur Système
CICT - Université Paul Sabatier
118, route de Narbonne
31062 Toulouse Cedex
Tél.: 05.61.36.60.44
Fax: 05.61.52.14.58
Mail: <a class="moz-txt-link-abbreviated" href="mailto:verdon@cict.fr">verdon@cict.fr</a>
**********************************
</pre>
</body>
</html>