Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lots of mails stuck in active queue

699 views
Skip to first unread message

Hitendra

unread,
Feb 11, 2004, 6:54:32 AM2/11/04
to
Hi,

We had around 10K mails yesterday night in the mail queue and today
afternoon still it is around 8K when i looked at the queue status it showed
as below

[root@server1 tjay]# find /var/spool/postfix/active -type f -print | wc -l
8562
[root@server1 tjay]# find /var/spool/postfix/deferred -type f -print | wc -l
911
[root@server1 tjay]# find /var/spool/postfix/flush -type f -print | wc -l
1
[root@server1 tjay]# find /var/spool/postfix/defer -type f -print | wc -l
914
[root@server1 tjay]# find /var/spool/postfix/bounce -type f -print | wc -l
1
You have new mail in /var/spool/mail/tjay
[root@server1 tjay]# find /var/spool/postfix/incoming -type f -print | wc -l
2
[root@server1 tjay]# find /var/spool/postfix/maildrop -type f -print | wc -l
1
[root@server1 tjay]# find /var/spool/postfix/private -type f -print | wc -l
0
[root@server1 tjay]# find /var/spool/postfix/saved -type f -print | wc -l
0
[root@server1 tjay]# find /var/spool/postfix/corrupt -type f -print | wc -l
0


As evident there are lot of mails stuck in the active queue but for some
reason the mails are going our very slowly.

Can someone suggest a solution?

Thanks and regards

Hitendra Molleti


Ralf Hildebrandt

unread,
Feb 11, 2004, 6:57:52 AM2/11/04
to
* Hitendra <hitendra...@itp.net>:

> [root@server1 tjay]# find /var/spool/postfix/active -type f -print | wc -l
> 8562

Use qshape to find out which destination dominates the active queue

--
Ralf Hildebrandt Ralf.Hil...@charite.de
my current spamtrap spam...@charite.de
http://www.arschkrebs.de/postfix/ Tel. +49 (0)30-450 570-155
"We all enter this world in the same way: naked; screaming; soaked in
blood. But if you live your life right, that kind of thing doesn't
have to stop there."' -- Dana Gould

Hitendra

unread,
Feb 11, 2004, 7:03:31 AM2/11/04
to
This is what qshape gives.

[root@server1 tjay]# /var/www/html/cgi-bin/qshape.pl |more
T A 5 10 20 40 80 160 320
320+
TOTAL 8619 7655 2 0 17 13 29 0 1
902
emirates.net.ae 6019 6005 0 0 0 0 0 0 0
14
hotmail.com 1027 1027 0 0 0 0 0 0 0
0
yahoo.com 131 131 0 0 0 0 0 0 0
0
gawab.com 71 0 0 0 3 1 2 0 0
65
ayna.com 63 1 0 0 0 0 1 0 0
61
masrawy.com 32 0 0 0 0 0 1 0 0
31
islamway.net 29 0 0 0 1 0 3 0 0
25
redington.co.ae 17 0 0 0 0 1 1 0 0
15
mmi.co.ae 17 0 1 0 0 0 2 0 0
14
hotmial.com 15 0 0 0 0 0 0 0 0
15
meesony.com.sa 14 0 0 0 0 0 0 0 0
14
sceco-east.com.sa 13 0 0 0 0 0 0 0 0
13
emirates.net 12 0 0 0 0 0 0 0 0
12
omnix.co.ae 12 4 0 0 0 0 0 0 0
8
msn.com 12 12 0 0 0 0 0 0 0
0
myway.com 12 0 0 0 0 1 1 0 0
10
itp.net 11 11 0 0 0 0 0 0 0
0
itparabia.com 11 0 0 0 0 0 0 0 0
11
prime.net.sa 10 0 0 0 0 0 0 0 0
10


emirates.net.ae is our local isp provided email addresses. What can i do to
push those out?

Ralf Hildebrandt

unread,
Feb 11, 2004, 7:18:07 AM2/11/04
to
* Hitendra <hitendra...@itp.net>:

> This is what qshape gives.
>
> [root@server1 tjay]# /var/www/html/cgi-bin/qshape.pl |more
> T A 5 10 20 40 80 160 320 320+
> TOTAL 8619 7655 2 0 17 13 29 0 1 902
> emirates.net.ae 6019 6005 0 0 0 0 0 0 0 14

OK, why is mail to emirates.net.ae slow?

See:

Host: emirates.net.ae
WARNING: This host is blocked with <http://www.rfc-ignorant.org/>: postmaster
MX: aimail4.emirates.net.ae(10)
MX: dimail1.emirates.net.ae(10)
MX: dimail2.emirates.net.ae(10)
MX: dimail3.emirates.net.ae(15)
Checking IP: 195.229.241.57 [MX:10(aimail4.emirates.net.ae)] - TIMEOUT
Warning: Unable to check IP: 195.229.241.57
Checking IP: 213.42.1.72 [MX:10(dimail1.emirates.net.ae)] - FAILED(HELO)
>>> MAIL From: <>
Failure:
While talking with 213.42.1.72 on Wed Feb 11 13:14:31 2004
HELO hauptpostamt.charite.de
.
ERROR: Bad response from IP: 213.42.1.72
Checking IP: 213.42.1.73 [MX:10(dimail2.emirates.net.ae)] - TIMEOUT
Warning: Unable to check IP: 213.42.1.73
Checking IP: 213.42.1.74 [MX:15(dimail3.emirates.net.ae)] - TIMEOUT
Warning: Unable to check IP: 213.42.1.74
ERROR: At least one host failed the check.

They are VERY busy or under a DoS attack.

> hotmail.com 1027 1027 0 0 0 0 0 0 0 0

hotmail is always busy.

> emirates.net.ae is our local isp provided email addresses. What can i do to
> push those out?

Find out why mail to emirates.net.ae is so damn slow.
I cannot reach them from here, are they still online??

My last hop to them is:
bcr1.Thamesside.cw.net
after that, it's nada.

God does not play dice.
-- Einstein

Hitendra

unread,
Feb 11, 2004, 7:26:16 AM2/11/04
to
Hi,

How did you get that stats for the busy emirates.net.ae domain? This might
help me to query stuff myself in future.

I have contacted the local isp and they did mention that they are facing
some problems with their service.

Thanks for your help.

Regards

Hitendra

-----Original Message-----
From: owner-pos...@postfix.org
[mailto:owner-pos...@postfix.org]On Behalf Of Ralf Hildebrandt
Sent: Wednesday, February 11, 2004 4:18 PM
To: postfi...@postfix.org
Subject: Re: Lots of mails stuck in active queue

Ralf Hildebrandt

unread,
Feb 11, 2004, 7:36:58 AM2/11/04
to

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

* Hitendra <hitendra...@itp.net>:


> Hi,
>
> How did you get that stats for the busy emirates.net.ae domain? This might
> help me to query stuff myself in future.

I used mtr and traceroute.
The other output is from a script (attached)

If M$ only employs the best programmers, how comes the programs are so bad?

--C7zPtVaVf+AK4Oqc
Content-Type: application/x-perl
Content-Disposition: attachment; filename="check-null-mail-host.pl"
Content-Transfer-Encoding: quoted-printable

#!/usr/bin/perl -w=0A=0Amy(%opt, @known_rejection_patterns, @known_good_pat=
terns);=0A=0Ause Carp;=0Ause Net::DNS;=0Ause Net::Telnet;=0Ause Getopt::Std=
;=0Ause Sys::Hostname;=0Ause Time::CTime;=0A($iam =3D $0) =3D~ s,.*/,,;=0A=
=0A@known_rejection_patterns =3D (=0A '^5\d\d .*(?i)((?i:spam)|bogus mail =
=66rom|invalid (mail|address|user|sender)|access denied|configured to (reje=
ct|refuse)|syntax err|empty|<>|buildaddr|fqdn|Malformed|where is .* in that=
|Anonymous Senders Prohibited|input error|not verified|refused|error parsin=
g|Argument required|Sender Not Authorised|Transaction failed|Illegal Addres=
s|envelope sender|sorry|not legal|local error in processing|Internal System=
Error|non local adresses|Address Rejected|fatal error|command argument|Fai=
led address)',=0A '451 (Command parser|Bad sender)',=0A '452 Out of memor=
y',=0A '421 .*closing transmission channel',=0A '451-.*local error in pro=
cessing',=0A '^5\d\d \s*$',=0A );=0A=0A@known_good_patterns =3D (=0A '=
^[45]\d\d .*(?i)(message size|exceeds maximum|Insufficient disk space)',=0A=
);=0A=0A$ret =3D getopts("",\%opt);=0A=0Aif (!$ret) {=0A print <<EOF;=
=0AUsage: $iam hostname=0AEOF=0A exit(1);=0A}=0A=0A$timeout=3D10;=0A$FQDN =
=3D shift;=0Aprint STDERR "Host: $FQDN\n";=0A=0Amy $resolver =3D new Net::D=
NS::Resolver;=0A=0A# Check RFC-Ignorant lists for known bad behaviour=0Afor=
each $rbltype ("dsn", "abuse", "postmaster", "whois") {=0A alarm($timeout)=
;=0A $query =3D $resolver->search($FQDN . ".$rbltype.rfc-ignorant.org.");=
=0A alarm(0);=0A if ($query) {=0A foreach $rr ($query->answer) {=0A =
next unless $rr->type eq "A";=0A print STDERR "WARNING: This host i=
s blocked with <http://www.rfc-ignorant.org/>: $rbltype\n";=0A }=0A }=
=0A}=0A=0A# Look for MX hosts for the FQDN in question=0A@mx =3D mx($resolv=
er,$FQDN);=0Aif (scalar(@mx)>0) {=0A=0A # For each host returned on the =
MX list, get the A record(s)=0A foreach $mx (@mx) {=0A print STDE=
RR "MX: ",$mx->exchange,"(",$mx->preference,")\n";=0A alarm($timeout=
);=0A $query =3D $resolver->search($mx->exchange);=0A alarm(0=
);=0A if ($query) {=0A foreach $rr ($query->answer) {=0A =
next unless $rr->type eq "A";=0A $check_ips{$=
rr->address} =3D "MX:" . $mx->preference . "(" . $mx->exchange . ")";=0A =
}=0A }=0A }=0A}=0A=0A# If there are MX hosts, use those,=
otherwise, search for an A record=0Aif (!scalar(%check_ips)) {=0A $quer=
y =3D $resolver->search($FQDN);=0A if ($query) {=0A foreach $rr (=
$query->answer) {=0A next unless $rr->type eq "A";=0A =
$check_ips{$rr->address} =3D "A($FQDN)";=0A }=0A }=0A}=0A=0A# In=
itialize the state variables that will tell us the results in the end=0A$al=
l_good=3D1;=0A$incomplete=3D0;=0A$unknown=3D0;=0A=0A$my_hostname =3D hostna=
me();=0Aif (!defined($my_hostname) or $my_hostname eq "") {=0A print STD=
ERR "Error: cannot determine my own hostname!\n";=0A exit(1);=0A}=0A=0Af=
oreach $ip (sort(keys(%check_ips))) {=0A $result =3D &check_IP($ip);=0A =
if (!defined($result)) {=0A print STDERR "Warning: Unable to chec=
k IP: $ip\n";=0A $incomplete=3D1;=0A } elsif ($result=3D=3D0) {=
=0A print STDERR "ERROR: Bad response from IP: $ip\n";=0A $al=
l_good=3D0;=0A } elsif ($result =3D=3D -1) {=0A print STDERR "WAR=
NING: Unknown response from IP: $ip\n";=0A $unknown=3D1;=0A } els=
e {=0A #print STDERR "OK: Acceptable response: $ip\n";=0A }=0A}=
=0A=0Aif (!$all_good) {=0A print STDERR "ERROR: At least one host failed t=
he check.\n";=0A exit(1);=0A}=0A=0Aif ($unknown) {=0A print STDERR "WARNI=
NG: Unknown response from at least one host, check manually.\n";=0A exit(3=
);=0A}=0A=0Aif ($incomplete) {=0A print STDERR "WARNING: No bad hosts, but=
some could not be checked.\n";=0A exit(2);=0A}=0A=0Aprint STDERR "Good: a=
ll of the hosts passed the checks.\n";=0Aexit(0);=0A=0A### Support subrouti=
nes=0A=0Asub check_IP {=0A my($ip)=3Dshift;=0A print STDERR "Checking=
IP: $ip [$check_ips{$ip}]";=0A &print_if_ordb($ip);=0A=0A $session=
=3D"While talking with $ip on " . ctime(time);=0A $smtp =3D new Net::Tel=
net;=0A $smtp->errmode("return");=0A $start=3Dtime;=0A $openretval=
=3D $smtp->open(Host =3D> $ip, Port =3D> 25, Timeout =3D> $timeout);=0A =
if (!defined($openretval)) {=0A if (time-$start<$timeout) {=0A =
print STDERR " - CONN_REFUSED\n";=0A } else {=0A p=
rint STDERR " - TIMEOUT\n";=0A }=0A return(undef);=0A }=0A=
($prebanner, $banner) =3D $smtp->waitfor('/^\d\d\d .*$/');=0A $sessi=
on .=3D "$prebanner\n" if (defined($prebanner) and $prebanner ne "");=0A =
$session .=3D "$banner\n" if (defined($banner) and $banner ne "")=
;=0A $smtp->dump_log("/tmp/smtpdump");=0A=0A ### >>> HELO (send)=0A =
$helo_retval =3D $smtp->print("HELO $my_hostname");=0A $session .=3D "=
HELO $my_hostname\n";=0A if (!defined($helo_retval) or !$helo_retval) {=
=0A print STDERR " - FAILED(HELO)\n";=0A return(0);=0A }=
=0A=0A ### <<< HELO (response)=0A ($prematch, $match) =3D $smtp->wait=
for('/^\d{3}.*$/m');=0A $session .=3D "$prematch\n" if (defined($prematc=
h) and $prematch =3D~ /\S/m);=0A $session .=3D "$match\n" if (defined=
($match) and $match ne "");=0A if (!defined($match) or $match !~ /=
^2/) {=0A print STDERR " - FAILED(HELO)\n";=0A print STDERR "=
>>> MAIL From: <>\n";=0A print STDERR "Failure:\n"; &print_session($=
session); print STDERR ".\n";=0A return(0);=0A }=0A=0A ### >>>=
MAIL From: <> (send)=0A $mail_retval =3D $smtp->print("MAIL From: <>");=
=0A $session .=3D "MAIL From: <>\n";=0A if (!defined($mail_retval) or=
!$mail_retval) {=0A print STDERR " - FAILED(MAIL)\n";=0A ret=
urn(0);=0A }=0A=0A ### <<< MAIL (response)=0A ($prematch, $match) =
=3D $smtp->waitfor('/^\d{3}.*$/m');=0A $session .=3D "$prematch\n" if (d=
efined($prematch) and $prematch =3D~ /\S/m);=0A $session .=3D "$match\n"=
if (defined($match) and $match ne "");=0A if (!defined($match)=
or grep($match=3D~$_, @known_rejection_patterns)) {=0A print STDERR=
" - FAILED(MAIL)\n";=0A print STDERR "Failure:\n"; &print_session($=
session);=0A return(0);=0A } elsif (defined($match) and $match !~=
/^2/) {=0A print STDERR " - UNKNOWN_RESPONSE(MAIL)\n";=0A pr=
int STDERR "Failure:\n"; &print_session($session);=0A return(-1);=0A=
}=0A=0A $postmaster_failed =3D 0;=0A=0A ### >>> RCPT To: <postmas=
ter@$FQDN> (send)=0A $rcpt_retval =3D $smtp->print("RCPT TO: <postmaster=
\@$FQDN>");=0A $session .=3D "RCPT To: <postmaster\@$FQDN>\n";=0A# $s=
ession .=3D "RCPT To: <abuse\@$FQDN>\n";=0A if (!defined($rcpt_retval) o=
r !$rcpt_retval) {=0A print STDERR " - FAILED(RCPT)\n";=0A $p=
ostmaster_failed =3D 1;=0A }=0A =0A ### <<< RCPT (response)=0A ($p=
rematch, $match) =3D $smtp->waitfor('/^\d{3}.*$/m');=0A $session .=3D "$=
prematch\n" if (defined($prematch) and $prematch =3D~ /\S/m);=0A $sessio=
n .=3D "$match\n" if (defined($match) and $match ne "");=0A if =
(!defined($match) or $match !~ /^2/) {=0A print STDERR " - FAILED(MA=
IL)\n";=0A print STDERR "Failure:\n"; &print_session($session);=0A =
return(0);=0A }=0A=0A $rcpt_retval =3D $smtp->print("RSET");=0A=
$rcpt_retval =3D $smtp->print("QUIT");=0A print STDERR " - OK\n";=0A=
}=0A=0Asub print_session {=0A my($session)=3Dshift;=0A @session_lines=
=3Dsplit(/\n/,$session);=0A print STDERR " ",join("\n ",@session_lines=
),"\n";=0A}=0A=0Asub print_if_ordb {=0A my($ip)=3Dshift;=0A $rev_ip=
=3Djoin(".",reverse(split(/\./,$ip))) . ".relays.ordb.org.";=0A=0A my($q=
uery,$rr);=0A alarm($timeout); $query =3D $resolver->search($rev_ip);=0A=
alarm(0);=0A if ($query) {=0A foreach $rr ($query->answer) {=
=0A next unless $rr->type eq "A";=0A print STDERR " [=
RBL:ordb.org]";=0A last;=0A }=0A }=0A=0A}=0A=0A
--C7zPtVaVf+AK4Oqc--

Hitendra

unread,
Feb 11, 2004, 7:47:17 AM2/11/04
to
I tried running this script it gave an error:

[root@server1 tjay]# /var/www/scripts/check-null-mail-host.pl
Can't locate Net/DNS.pm in @INC (@INC contains:
/usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux
/usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at
/var/www/scripts/check-null-mail-host.pl line 6.
BEGIN failed--compilation aborted at
/var/www/scripts/check-null-mail-host.pl line 6.

I think its not a standalone script and is a part of a program. Am i right?

If yes then I will try to search the net for the required files.

Thanks

Hitendra

-----Original Message-----
From: owner-pos...@postfix.org
[mailto:owner-pos...@postfix.org]On Behalf Of Ralf Hildebrandt
Sent: Wednesday, February 11, 2004 4:37 PM
To: postfi...@postfix.org
Subject: Re: Lots of mails stuck in active queue

Ralf Hildebrandt

unread,
Feb 11, 2004, 7:51:00 AM2/11/04
to
* Hitendra <hitendra...@itp.net>:

> I tried running this script it gave an error:
>
> [root@server1 tjay]# /var/www/scripts/check-null-mail-host.pl
> Can't locate Net/DNS.pm in @INC (@INC contains:

Install Net::DNS using CPAN (man CPAN, just before you ask)

> I think its not a standalone script and is a part of a program. Am i right?

No.

"Sometimes it pays to stay in bed in Monday, rather than spending the
rest of the week debuging Monday's code."-Dan Salomon

Hitendra

unread,
Feb 11, 2004, 7:56:16 AM2/11/04
to
thanks

-----Original Message-----
From: owner-pos...@postfix.org
[mailto:owner-pos...@postfix.org]On Behalf Of Ralf Hildebrandt
Sent: Wednesday, February 11, 2004 4:51 PM
To: postfi...@postfix.org
Subject: Re: Lots of mails stuck in active queue

WC Jones

unread,
Feb 11, 2004, 10:01:43 AM2/11/04
to

>OK, why is mail to emirates.net.ae slow?
...

>Host: emirates.net.ae
>WARNING: This host is blocked with <http://www.rfc-ignorant.org/>: postmaster
>MX: aimail4.emirates.net.ae(10)
...

>Checking IP: 195.229.241.57 [MX:10(aimail4.emirates.net.ae)] - TIMEOUT
>Warning: Unable to check IP: 195.229.241.57
>Checking IP: 213.42.1.72 [MX:10(dimail1.emirates.net.ae)] - FAILED(HELO)
...

>Warning: Unable to check IP: 213.42.1.74
>ERROR: At least one host failed the check.


Did qshape tell you all that as well?

Ralf Hildebrandt

unread,
Feb 11, 2004, 10:16:03 AM2/11/04
to
* WC Jones <s...@insecurity.org>:

> Did qshape tell you all that as well?

No, that was found out by the script I attached on the other posting.

Why you can't find your system administrators:
(S)he's sitting under the desk, hysterical at what the (l)user just asked.

Hitendra

unread,
Feb 12, 2004, 12:55:27 AM2/12/04
to
I still have now today morning 42K mails stuck in the queue and when i
qshape it i get the following details:

Can someone help? I tried restarting postfix but not much use...

T A 5 10 20 40 80 160 320
320+

TOTAL 41382 38847 0 0 0 0 0 4
10 2
521
emirates.net.ae 13302 13138 0 0 0 0 0 0
0
164
hotmail.com 5756 5756 0 0 0 0 0 0 0
0
server1.itp.net 3891 3891 0 0 0 0 0 0 0
0
yahoo.com 2277 2276 0 0 0 0 0 0 0
1
omantel.net.om 447 182 0 0 0 0 0 0 1
264
batelco.com.bh 200 197 0 0 0 0 0 0 0
3
emirates.com 151 151 0 0 0 0 0 0 0
0
qatar.net.qa 126 123 0 0 0 0 0 0 0
3
stc.com.sa 122 122 0 0 0 0 0 0 0
0
gawab.com 111 15 0 0 0 0 0 0 0
96
rediffmail.com 106 102 0 0 0 0 0 0 0
4
usa.net 78 77 0 0 0 0 0 0 0
1
ayna.com 72 9 0 0 0 0 0 0 0
63
eim.ae 72 52 0 0 0 0 0 0 0
20
msn.com 71 71 0 0 0 0 0 0 0
0

-----Original Message-----
From: owner-pos...@postfix.org
[mailto:owner-pos...@postfix.org]On Behalf Of Ralf Hildebrandt
Sent: Wednesday, February 11, 2004 4:37 PM
To: postfi...@postfix.org
Subject: Re: Lots of mails stuck in active queue


* Hitendra <hitendra...@itp.net>:


> Hi,
>
> How did you get that stats for the busy emirates.net.ae domain? This might
> help me to query stuff myself in future.

I used mtr and traceroute.
The other output is from a script (attached)

--

Ralf Hildebrandt

unread,
Feb 12, 2004, 1:39:58 AM2/12/04
to
* Hitendra <hitendra...@itp.net>:

> I still have now today morning 42K mails stuck in the queue and when i
> qshape it i get the following details:
>
> Can someone help? I tried restarting postfix but not much use...
>
> T A 5 10 20 40 80 160 320 320+
> TOTAL 41382 38847 0 0 0 0 0 4 10 2 521
> emirates.net.ae 13302 13138 0 0 0 0 0 0 0 164

Are they reachable now? No, they are not: What did you expect?

"I rigged my cellular to send a message to my PDA, which is online with
my PC, to get it to activate the voicemail, which sends the message to
the inbox of my email, which routes it to the PDA, which beams it back
to the cellular. Then I realized my gadgets have a better social life
than I do." !" - Tom Ostad.

Wietse Venema

unread,
Feb 12, 2004, 2:20:41 PM2/12/04
to
> > > emirates.net.ae 13302 13138 0 0 0 0 0
> 0
> >
> > Have you tried to actually connect to that site?
>
> Nope. Then he would have noticed that it is down.
> Hi,
>
> I have connected to the site and it isn't down of course it might be slow
> when tried to access it from outside UAE.

When I connected to the site it took SEVERAL MINUTES before
the SMTP server answered.

> try http://www.emirates.net.ae

That is a web server.

You have a problem delivering EMAIL.

Wietse

Ralf Hildebrandt

unread,
Feb 12, 2004, 4:02:47 PM2/12/04
to
* Wietse Venema <wie...@porcupine.org>:

> When I connected to the site it took SEVERAL MINUTES before
> the SMTP server answered.

Welcome to the club.

Real programmers don't bring brown-bag lunches. If the vending
machine doesn't sell it, they don't eat it. Vending machines don't
sell quiche.

0 new messages