How do I check the postfix queue size?Is Postfix the same thing as Sendmail?Minimum PostFix configuration for sending emails only?Changing the maximum mail size in Postfixpostfix: accepting all email addresses for a domain except for a fewPostfix: holding emails outside the Hold Queue possible?Checking Postfix queue size with NagiosHow to integrate postfix and mimedefangPostfix after-queue filtering for local destinations onlyHow to reinject scanned mail into the queue using sendmailTranslating sendmail “MASQUERADE_AS” to postfix?
Is being an extrovert a necessary condition to be a manager?
pwaS eht tirsf dna tasl setterl fo hace dorw
List of lists elementwise greater/smaller than
Gambler's Fallacy Dice
Presenting 2 results for one variable using a left brace
Do 'destroy' effects count as damage?
Do seaplanes need to get clearance for takeoff?
How can sister protect herself from impulse purchases with a credit card?
Hotel booking: Why is Agoda much cheaper than booking.com?
Separate the element after every 2nd ',' and push into next row in bash
Expand a hexagon
How does the +1 Keen Composite Longbow (+2 Str) work?
Is there a realtime, uncut video of Saturn V ignition through tower clear?
How to safely discharge oneself
Does a windmilling propeller create more drag than a stopped propeller in an engine out scenario?
Parse a C++14 integer literal
How did Jean Parisot de Valette, 49th Grand Master of the Order of Malta, die?
What does it mean for a program to be 32 or 64 bit?
How could Dwarves prevent sand from filling up their settlements
Is there a way to generate a mapping graph like this?
Why is こと used in 「私に何かできること」?
Is presenting a play showing Military characters in a bad light a crime in the US?
Bash - Execute two commands and get exit status 1 if first fails
tikz: 5 squares on a row, roman numbered 1 -> 5
How do I check the postfix queue size?
Is Postfix the same thing as Sendmail?Minimum PostFix configuration for sending emails only?Changing the maximum mail size in Postfixpostfix: accepting all email addresses for a domain except for a fewPostfix: holding emails outside the Hold Queue possible?Checking Postfix queue size with NagiosHow to integrate postfix and mimedefangPostfix after-queue filtering for local destinations onlyHow to reinject scanned mail into the queue using sendmailTranslating sendmail “MASQUERADE_AS” to postfix?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
What's the postfix equivalent to sendmail -bp
?
postfix
add a comment |
What's the postfix equivalent to sendmail -bp
?
postfix
add a comment |
What's the postfix equivalent to sendmail -bp
?
postfix
What's the postfix equivalent to sendmail -bp
?
postfix
postfix
asked Aug 25 '09 at 0:48
Gary RichardsonGary Richardson
1,00731321
1,00731321
add a comment |
add a comment |
8 Answers
8
active
oldest
votes
Or, less typing:
mailq
add a comment |
qshape active
will show you the number of emails being sent to each domain and how long they have been in the active queue
qshape deferred
will show you the same but for the deferred queue
add a comment |
postqueue -p
add a comment |
Here's what I use, culled from the postfix mailing list. I removed the author's name, in case he doesn't want it here (you can see it at the source). It only displays totals.
#!/usr/bin/env perl
# postfix queue/s size
# author:
# source: http://tech.groups.yahoo.com/group/postfix-users/message/255133
use strict;
use warnings;
use Symbol;
sub count
my ($dir) = @_;
my $dh = gensym();
my $c = 0;
opendir($dh, $dir) or die "$0: opendir: $dir: $!n";
while (my $f = readdir($dh))
if ($f =~ m^[A-F0-9]5,$)
++$c;
elsif ($f =~ m^[A-F0-9]$)
$c += count("$dir/$f");
closedir($dh) or die "closedir: $dir: $!n";
return $c;
my $qdir = `postconf -h queue_directory`;
chomp($qdir);
chdir($qdir) or die "$0: chdir: $qdir: $!n";
printf "Incoming: %dn", count("incoming");
printf "Active: %dn", count("active");
printf "Deferred: %dn", count("deferred");
printf "Bounced: %dn", count("bounce");
printf "Hold: %dn", count("hold");
printf "Corrupt: %dn", count("corrupt");
EDIT: Fixed a typo on line 26.
Great script, and IMHO should be a part of the standard Postfix distribution. Unlike mailq/postqueue returns immediate answer for a queue under duress
– Alexander Pogrebnyak
Aug 14 '12 at 16:27
Just a word of caution on the particular implementation ofcount
function. It will fail in Postfix 2.9+ when enable_long_queue_ids=yes'. I think it should not be too hard to fix it for long queue ids.
– Alexander Pogrebnyak
Aug 15 '12 at 15:58
add a comment |
postqueue -p | tail -n 1
Last line in the postqueue -p
shows how many requests and size:
-- 317788 Kbytes in 11860 Requests.
This command executes quickly since it doesn't waste cycles displaying the individual emails in the queue. If just want the total, run this.
– Paul Calabro
Nov 16 '17 at 17:35
add a comment |
[root@server ~]# time mailq | grep -c '^[0-9A-Z]'
10
real 0m1.333s
user 0m0.003s
sys 0m0.003s
(above result indicating that there are 10 email is queue)
2
More concisely: mailq | grep -c '^w'
– Antonio Bardazzi
Mar 28 '13 at 8:51
add a comment |
If you don't have qshape
you can install it via the following yum commands:
yum groupinstall perl development
yum install postfix-perl-scripts
qshape prints Postfix queue domain and age distribution information. You can read more about it here:
http://www.postfix.org/QSHAPE_README.html
Example output
% qshape -s hold | head
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 486 0 0 1 0 0 2 4 20 40 419
yahoo.com 14 0 0 1 0 0 0 0 1 0 12
extremepricecuts.net 13 0 0 0 0 0 0 0 2 0 11
ms35.hinet.net 12 0 0 0 0 0 0 0 0 1 11
winnersdaily.net 12 0 0 0 0 0 0 0 2 0 10
hotmail.com 11 0 0 0 0 0 0 0 0 1 10
worldnet.fr 6 0 0 0 0 0 0 0 0 0 6
ms41.hinet.net 6 0 0 0 0 0 0 0 0 0 6
osn.de 5 0 0 0 0 0 1 0 0 0 4
add a comment |
Here is an example.
#!/bin/bash
for q in active bounce corrupt defer deferred flush hold incoming maildrop pid private public saved trace
do
count=$(find /var/spool/postfix/$q ! -type d -print | wc -l)
echo $q $count
done
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f58196%2fhow-do-i-check-the-postfix-queue-size%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
Or, less typing:
mailq
add a comment |
Or, less typing:
mailq
add a comment |
Or, less typing:
mailq
Or, less typing:
mailq
answered Aug 25 '09 at 1:03
womble♦womble
86.3k18147205
86.3k18147205
add a comment |
add a comment |
qshape active
will show you the number of emails being sent to each domain and how long they have been in the active queue
qshape deferred
will show you the same but for the deferred queue
add a comment |
qshape active
will show you the number of emails being sent to each domain and how long they have been in the active queue
qshape deferred
will show you the same but for the deferred queue
add a comment |
qshape active
will show you the number of emails being sent to each domain and how long they have been in the active queue
qshape deferred
will show you the same but for the deferred queue
qshape active
will show you the number of emails being sent to each domain and how long they have been in the active queue
qshape deferred
will show you the same but for the deferred queue
answered Oct 13 '09 at 13:05
Alistair PrestidgeAlistair Prestidge
6211518
6211518
add a comment |
add a comment |
postqueue -p
add a comment |
postqueue -p
add a comment |
postqueue -p
postqueue -p
answered Aug 25 '09 at 0:56
Andrejs CainikovsAndrejs Cainikovs
1,51111220
1,51111220
add a comment |
add a comment |
Here's what I use, culled from the postfix mailing list. I removed the author's name, in case he doesn't want it here (you can see it at the source). It only displays totals.
#!/usr/bin/env perl
# postfix queue/s size
# author:
# source: http://tech.groups.yahoo.com/group/postfix-users/message/255133
use strict;
use warnings;
use Symbol;
sub count
my ($dir) = @_;
my $dh = gensym();
my $c = 0;
opendir($dh, $dir) or die "$0: opendir: $dir: $!n";
while (my $f = readdir($dh))
if ($f =~ m^[A-F0-9]5,$)
++$c;
elsif ($f =~ m^[A-F0-9]$)
$c += count("$dir/$f");
closedir($dh) or die "closedir: $dir: $!n";
return $c;
my $qdir = `postconf -h queue_directory`;
chomp($qdir);
chdir($qdir) or die "$0: chdir: $qdir: $!n";
printf "Incoming: %dn", count("incoming");
printf "Active: %dn", count("active");
printf "Deferred: %dn", count("deferred");
printf "Bounced: %dn", count("bounce");
printf "Hold: %dn", count("hold");
printf "Corrupt: %dn", count("corrupt");
EDIT: Fixed a typo on line 26.
Great script, and IMHO should be a part of the standard Postfix distribution. Unlike mailq/postqueue returns immediate answer for a queue under duress
– Alexander Pogrebnyak
Aug 14 '12 at 16:27
Just a word of caution on the particular implementation ofcount
function. It will fail in Postfix 2.9+ when enable_long_queue_ids=yes'. I think it should not be too hard to fix it for long queue ids.
– Alexander Pogrebnyak
Aug 15 '12 at 15:58
add a comment |
Here's what I use, culled from the postfix mailing list. I removed the author's name, in case he doesn't want it here (you can see it at the source). It only displays totals.
#!/usr/bin/env perl
# postfix queue/s size
# author:
# source: http://tech.groups.yahoo.com/group/postfix-users/message/255133
use strict;
use warnings;
use Symbol;
sub count
my ($dir) = @_;
my $dh = gensym();
my $c = 0;
opendir($dh, $dir) or die "$0: opendir: $dir: $!n";
while (my $f = readdir($dh))
if ($f =~ m^[A-F0-9]5,$)
++$c;
elsif ($f =~ m^[A-F0-9]$)
$c += count("$dir/$f");
closedir($dh) or die "closedir: $dir: $!n";
return $c;
my $qdir = `postconf -h queue_directory`;
chomp($qdir);
chdir($qdir) or die "$0: chdir: $qdir: $!n";
printf "Incoming: %dn", count("incoming");
printf "Active: %dn", count("active");
printf "Deferred: %dn", count("deferred");
printf "Bounced: %dn", count("bounce");
printf "Hold: %dn", count("hold");
printf "Corrupt: %dn", count("corrupt");
EDIT: Fixed a typo on line 26.
Great script, and IMHO should be a part of the standard Postfix distribution. Unlike mailq/postqueue returns immediate answer for a queue under duress
– Alexander Pogrebnyak
Aug 14 '12 at 16:27
Just a word of caution on the particular implementation ofcount
function. It will fail in Postfix 2.9+ when enable_long_queue_ids=yes'. I think it should not be too hard to fix it for long queue ids.
– Alexander Pogrebnyak
Aug 15 '12 at 15:58
add a comment |
Here's what I use, culled from the postfix mailing list. I removed the author's name, in case he doesn't want it here (you can see it at the source). It only displays totals.
#!/usr/bin/env perl
# postfix queue/s size
# author:
# source: http://tech.groups.yahoo.com/group/postfix-users/message/255133
use strict;
use warnings;
use Symbol;
sub count
my ($dir) = @_;
my $dh = gensym();
my $c = 0;
opendir($dh, $dir) or die "$0: opendir: $dir: $!n";
while (my $f = readdir($dh))
if ($f =~ m^[A-F0-9]5,$)
++$c;
elsif ($f =~ m^[A-F0-9]$)
$c += count("$dir/$f");
closedir($dh) or die "closedir: $dir: $!n";
return $c;
my $qdir = `postconf -h queue_directory`;
chomp($qdir);
chdir($qdir) or die "$0: chdir: $qdir: $!n";
printf "Incoming: %dn", count("incoming");
printf "Active: %dn", count("active");
printf "Deferred: %dn", count("deferred");
printf "Bounced: %dn", count("bounce");
printf "Hold: %dn", count("hold");
printf "Corrupt: %dn", count("corrupt");
EDIT: Fixed a typo on line 26.
Here's what I use, culled from the postfix mailing list. I removed the author's name, in case he doesn't want it here (you can see it at the source). It only displays totals.
#!/usr/bin/env perl
# postfix queue/s size
# author:
# source: http://tech.groups.yahoo.com/group/postfix-users/message/255133
use strict;
use warnings;
use Symbol;
sub count
my ($dir) = @_;
my $dh = gensym();
my $c = 0;
opendir($dh, $dir) or die "$0: opendir: $dir: $!n";
while (my $f = readdir($dh))
if ($f =~ m^[A-F0-9]5,$)
++$c;
elsif ($f =~ m^[A-F0-9]$)
$c += count("$dir/$f");
closedir($dh) or die "closedir: $dir: $!n";
return $c;
my $qdir = `postconf -h queue_directory`;
chomp($qdir);
chdir($qdir) or die "$0: chdir: $qdir: $!n";
printf "Incoming: %dn", count("incoming");
printf "Active: %dn", count("active");
printf "Deferred: %dn", count("deferred");
printf "Bounced: %dn", count("bounce");
printf "Hold: %dn", count("hold");
printf "Corrupt: %dn", count("corrupt");
EDIT: Fixed a typo on line 26.
edited Aug 1 '12 at 13:05
Community♦
1
1
answered Nov 10 '11 at 19:42
mikewatersmikewaters
66011225
66011225
Great script, and IMHO should be a part of the standard Postfix distribution. Unlike mailq/postqueue returns immediate answer for a queue under duress
– Alexander Pogrebnyak
Aug 14 '12 at 16:27
Just a word of caution on the particular implementation ofcount
function. It will fail in Postfix 2.9+ when enable_long_queue_ids=yes'. I think it should not be too hard to fix it for long queue ids.
– Alexander Pogrebnyak
Aug 15 '12 at 15:58
add a comment |
Great script, and IMHO should be a part of the standard Postfix distribution. Unlike mailq/postqueue returns immediate answer for a queue under duress
– Alexander Pogrebnyak
Aug 14 '12 at 16:27
Just a word of caution on the particular implementation ofcount
function. It will fail in Postfix 2.9+ when enable_long_queue_ids=yes'. I think it should not be too hard to fix it for long queue ids.
– Alexander Pogrebnyak
Aug 15 '12 at 15:58
Great script, and IMHO should be a part of the standard Postfix distribution. Unlike mailq/postqueue returns immediate answer for a queue under duress
– Alexander Pogrebnyak
Aug 14 '12 at 16:27
Great script, and IMHO should be a part of the standard Postfix distribution. Unlike mailq/postqueue returns immediate answer for a queue under duress
– Alexander Pogrebnyak
Aug 14 '12 at 16:27
Just a word of caution on the particular implementation of
count
function. It will fail in Postfix 2.9+ when enable_long_queue_ids=yes'. I think it should not be too hard to fix it for long queue ids.– Alexander Pogrebnyak
Aug 15 '12 at 15:58
Just a word of caution on the particular implementation of
count
function. It will fail in Postfix 2.9+ when enable_long_queue_ids=yes'. I think it should not be too hard to fix it for long queue ids.– Alexander Pogrebnyak
Aug 15 '12 at 15:58
add a comment |
postqueue -p | tail -n 1
Last line in the postqueue -p
shows how many requests and size:
-- 317788 Kbytes in 11860 Requests.
This command executes quickly since it doesn't waste cycles displaying the individual emails in the queue. If just want the total, run this.
– Paul Calabro
Nov 16 '17 at 17:35
add a comment |
postqueue -p | tail -n 1
Last line in the postqueue -p
shows how many requests and size:
-- 317788 Kbytes in 11860 Requests.
This command executes quickly since it doesn't waste cycles displaying the individual emails in the queue. If just want the total, run this.
– Paul Calabro
Nov 16 '17 at 17:35
add a comment |
postqueue -p | tail -n 1
Last line in the postqueue -p
shows how many requests and size:
-- 317788 Kbytes in 11860 Requests.
postqueue -p | tail -n 1
Last line in the postqueue -p
shows how many requests and size:
-- 317788 Kbytes in 11860 Requests.
answered Sep 30 '15 at 8:43
99 Problems - Syntax ain't one99 Problems - Syntax ain't one
20124
20124
This command executes quickly since it doesn't waste cycles displaying the individual emails in the queue. If just want the total, run this.
– Paul Calabro
Nov 16 '17 at 17:35
add a comment |
This command executes quickly since it doesn't waste cycles displaying the individual emails in the queue. If just want the total, run this.
– Paul Calabro
Nov 16 '17 at 17:35
This command executes quickly since it doesn't waste cycles displaying the individual emails in the queue. If just want the total, run this.
– Paul Calabro
Nov 16 '17 at 17:35
This command executes quickly since it doesn't waste cycles displaying the individual emails in the queue. If just want the total, run this.
– Paul Calabro
Nov 16 '17 at 17:35
add a comment |
[root@server ~]# time mailq | grep -c '^[0-9A-Z]'
10
real 0m1.333s
user 0m0.003s
sys 0m0.003s
(above result indicating that there are 10 email is queue)
2
More concisely: mailq | grep -c '^w'
– Antonio Bardazzi
Mar 28 '13 at 8:51
add a comment |
[root@server ~]# time mailq | grep -c '^[0-9A-Z]'
10
real 0m1.333s
user 0m0.003s
sys 0m0.003s
(above result indicating that there are 10 email is queue)
2
More concisely: mailq | grep -c '^w'
– Antonio Bardazzi
Mar 28 '13 at 8:51
add a comment |
[root@server ~]# time mailq | grep -c '^[0-9A-Z]'
10
real 0m1.333s
user 0m0.003s
sys 0m0.003s
(above result indicating that there are 10 email is queue)
[root@server ~]# time mailq | grep -c '^[0-9A-Z]'
10
real 0m1.333s
user 0m0.003s
sys 0m0.003s
(above result indicating that there are 10 email is queue)
answered Jan 21 '13 at 7:08
Business Website DesignBusiness Website Design
5111
5111
2
More concisely: mailq | grep -c '^w'
– Antonio Bardazzi
Mar 28 '13 at 8:51
add a comment |
2
More concisely: mailq | grep -c '^w'
– Antonio Bardazzi
Mar 28 '13 at 8:51
2
2
More concisely: mailq | grep -c '^w'
– Antonio Bardazzi
Mar 28 '13 at 8:51
More concisely: mailq | grep -c '^w'
– Antonio Bardazzi
Mar 28 '13 at 8:51
add a comment |
If you don't have qshape
you can install it via the following yum commands:
yum groupinstall perl development
yum install postfix-perl-scripts
qshape prints Postfix queue domain and age distribution information. You can read more about it here:
http://www.postfix.org/QSHAPE_README.html
Example output
% qshape -s hold | head
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 486 0 0 1 0 0 2 4 20 40 419
yahoo.com 14 0 0 1 0 0 0 0 1 0 12
extremepricecuts.net 13 0 0 0 0 0 0 0 2 0 11
ms35.hinet.net 12 0 0 0 0 0 0 0 0 1 11
winnersdaily.net 12 0 0 0 0 0 0 0 2 0 10
hotmail.com 11 0 0 0 0 0 0 0 0 1 10
worldnet.fr 6 0 0 0 0 0 0 0 0 0 6
ms41.hinet.net 6 0 0 0 0 0 0 0 0 0 6
osn.de 5 0 0 0 0 0 1 0 0 0 4
add a comment |
If you don't have qshape
you can install it via the following yum commands:
yum groupinstall perl development
yum install postfix-perl-scripts
qshape prints Postfix queue domain and age distribution information. You can read more about it here:
http://www.postfix.org/QSHAPE_README.html
Example output
% qshape -s hold | head
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 486 0 0 1 0 0 2 4 20 40 419
yahoo.com 14 0 0 1 0 0 0 0 1 0 12
extremepricecuts.net 13 0 0 0 0 0 0 0 2 0 11
ms35.hinet.net 12 0 0 0 0 0 0 0 0 1 11
winnersdaily.net 12 0 0 0 0 0 0 0 2 0 10
hotmail.com 11 0 0 0 0 0 0 0 0 1 10
worldnet.fr 6 0 0 0 0 0 0 0 0 0 6
ms41.hinet.net 6 0 0 0 0 0 0 0 0 0 6
osn.de 5 0 0 0 0 0 1 0 0 0 4
add a comment |
If you don't have qshape
you can install it via the following yum commands:
yum groupinstall perl development
yum install postfix-perl-scripts
qshape prints Postfix queue domain and age distribution information. You can read more about it here:
http://www.postfix.org/QSHAPE_README.html
Example output
% qshape -s hold | head
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 486 0 0 1 0 0 2 4 20 40 419
yahoo.com 14 0 0 1 0 0 0 0 1 0 12
extremepricecuts.net 13 0 0 0 0 0 0 0 2 0 11
ms35.hinet.net 12 0 0 0 0 0 0 0 0 1 11
winnersdaily.net 12 0 0 0 0 0 0 0 2 0 10
hotmail.com 11 0 0 0 0 0 0 0 0 1 10
worldnet.fr 6 0 0 0 0 0 0 0 0 0 6
ms41.hinet.net 6 0 0 0 0 0 0 0 0 0 6
osn.de 5 0 0 0 0 0 1 0 0 0 4
If you don't have qshape
you can install it via the following yum commands:
yum groupinstall perl development
yum install postfix-perl-scripts
qshape prints Postfix queue domain and age distribution information. You can read more about it here:
http://www.postfix.org/QSHAPE_README.html
Example output
% qshape -s hold | head
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 486 0 0 1 0 0 2 4 20 40 419
yahoo.com 14 0 0 1 0 0 0 0 1 0 12
extremepricecuts.net 13 0 0 0 0 0 0 0 2 0 11
ms35.hinet.net 12 0 0 0 0 0 0 0 0 1 11
winnersdaily.net 12 0 0 0 0 0 0 0 2 0 10
hotmail.com 11 0 0 0 0 0 0 0 0 1 10
worldnet.fr 6 0 0 0 0 0 0 0 0 0 6
ms41.hinet.net 6 0 0 0 0 0 0 0 0 0 6
osn.de 5 0 0 0 0 0 1 0 0 0 4
edited Apr 6 '13 at 14:59
slm
5,136124460
5,136124460
answered Apr 6 '13 at 14:15
Brock HensleyBrock Hensley
519411
519411
add a comment |
add a comment |
Here is an example.
#!/bin/bash
for q in active bounce corrupt defer deferred flush hold incoming maildrop pid private public saved trace
do
count=$(find /var/spool/postfix/$q ! -type d -print | wc -l)
echo $q $count
done
add a comment |
Here is an example.
#!/bin/bash
for q in active bounce corrupt defer deferred flush hold incoming maildrop pid private public saved trace
do
count=$(find /var/spool/postfix/$q ! -type d -print | wc -l)
echo $q $count
done
add a comment |
Here is an example.
#!/bin/bash
for q in active bounce corrupt defer deferred flush hold incoming maildrop pid private public saved trace
do
count=$(find /var/spool/postfix/$q ! -type d -print | wc -l)
echo $q $count
done
Here is an example.
#!/bin/bash
for q in active bounce corrupt defer deferred flush hold incoming maildrop pid private public saved trace
do
count=$(find /var/spool/postfix/$q ! -type d -print | wc -l)
echo $q $count
done
edited May 7 at 17:09
Akhil Jalagam
33
33
answered Feb 24 '14 at 2:57
Doug_CowieDoug_Cowie
211
211
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f58196%2fhow-do-i-check-the-postfix-queue-size%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown