From: Alex Moen on
OK, here's some more information.... I manually ran the mail queue with the
following command:

# /usr/lib/sendmail -oQ/var/mqueue/worldq -v -q -cf /etc/mail/sendmail.alex

It sat at this line for over an hour:

Running /var/mqueue/worldq/l11M03g9002470 (sequence 2 of 739)
<nicuacalderone(a)maxxrep.com>... Connecting to mail.maxxrep.com. via esmtp...

Here are my timeouts in the sendmail.alex file:
# timeouts (many of these)
#O Timeout.initial=5m
O Timeout.initial=20s
#O Timeout.connect=5m
O Timeout.connect=20s
#O Timeout.aconnect=0s
O Timeout.aconnect=20s
O Timeout.iconnect=5s
#O Timeout.helo=2m
O Timeout.helo=20s
#O Timeout.mail=5m
O Timeout.mail=20s
#O Timeout.rcpt=1h
O Timeout.datainit=2m
#O Timeout.datablock=1h
#O Timeout.datafinal=1h
#O Timeout.rset=5m
#O Timeout.quit=2m
#O Timeout.misc=2m
O Timeout.misc=20s
#O Timeout.command=1h
O Timeout.ident=0s
#O Timeout.fileopen=60s
#O Timeout.control=2m
O Timeout.queuereturn=2d
O Timeout.queuereturn.normal=2d
O Timeout.queuereturn.urgent=2d
O Timeout.queuereturn.non-urgent=2d
O Timeout.queuereturn.dsn=2d
O Timeout.queuewarn=4h
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgent=12h
#O Timeout.queuewarn.dsn=4h
#O Timeout.hoststatus=30m
#O Timeout.resolver.retrans=5s
#O Timeout.resolver.retrans.first=5s
#O Timeout.resolver.retrans.normal=5s
#O Timeout.resolver.retry=4
#O Timeout.resolver.retry.first=4
#O Timeout.resolver.retry.normal=4
#O Timeout.lhlo=2m
#O Timeout.auth=10m
#O Timeout.starttls=1h

Shouldn't it wait like 20 seconds, determine that the mail server is
unreachable, and move on? It looks to me like the server is stalling on
these queued files and just hangs...

Thanks!


From: Alex Moen on
More info to go along with this:

Another queue file that was acting wierd...

Running /var/mqueue/worldq/l11LGHEN020602 (sequence 6 of 775)
<1234567bwyw(a)email.lu>... Connecting to mail.email.lu. via esmtp...
220 free.email.lu ESMTP Unity v1.0 TestPhase
>>> EHLO ndtc3500.stellarnet.com
250-free.email.lu
250-PIPELINING
250-SIZE 20971520
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
>>> MAIL From:<> SIZE=3074 BODY=8BITMIME
250 Ok
>>> RCPT To:<1234567bwyw(a)email.lu>
>>> DATA
450 <1234567bwyw(a)email.lu>: Recipient address rejected: User unknown in
local recipient table
<1234567bwyw(a)email.lu>... Deferred: 450 <1234567bwyw(a)email.lu>: Recipient
address rejected: User unknown in local recipient table
554 Error: no valid recipients
>>> RSET
250 Ok
<1234567bwyw(a)email.lu>... Connecting to plop.gms.lu. via esmtp...

Why, after sendmail got the 554 error, did it retry connecting to
plop.gms.lu??? The nslookup shows
[root(a)ndtc3500 worldq]# nslookup -type=mx gms.lu
Server: ns2.stellarnet.com
Address: 66.163.128.15

Non-authoritative answer:
gms.lu preference = 10, mail exchanger = mail.gms.lu
gms.lu preference = 20, mail exchanger = mail2.gms.lu

Authoritative answers can be found from:
gms.lu nameserver = ns2.gms.lu
gms.lu nameserver = ns.gms.lu
mail.gms.lu internet address = 194.235.201.3
mail2.gms.lu internet address = 194.235.201.1

[root(a)ndtc3500 worldq]# nslookup plop.gms.lu
Server: ns2.stellarnet.com
Address: 66.163.128.15

Non-authoritative answer:
Name: md.gms.lu
Address: 194.235.201.9
Aliases: plop.gms.lu

Where did it get the idea that it should connect to plop.gms.lu?

Here's the contents of the qfile:
V8
T1170364577
K1170364594
N1
P32382
I79/11/124143
MDeferred: 450 <1234567bwyw(a)email.lu>: Recipient address rejected: User
unknown in local recipient table
Frs
$_localhost
$r
$slocalhost
${daemon_flags}
${if_addr}66.163.128.10
SMAILER-DAEMON
MDeferred: 450 <1234567bwyw(a)email.lu>: Recipient address rejected: User
unknown in local recipient table
rRFC822; 1234567bwyw(a)email.lu
RPF:<1234567bwyw(a)email.lu>
H?P?Return-Path: <\201g>
H??Received: from localhost (localhost)
by ndtc3500.stellarnet.com with \234 id l11LGHEN020602;
Thu, 1 Feb 2007 15:16:17 -0600 (CST)
H?D?Date: Thu, 1 Feb 2007 15:16:17 -0600 (CST)
H?F?From: Mail Delivery Subsystem <MAILER-DAEMON>
H?x?Full-Name: Mail Delivery Subsystem
H?M?Message-Id: <200702012116.l11LGHEN020602(a)ndtc3500.stellarnet.com>
H??To: <1234567bwyw(a)email.lu>
H??MIME-Version: 1.0
H??Content-Type: multipart/report; report-type=delivery-status;
boundary="l11LGHEN020602.1170364577/ndtc3500.stellarnet.com"
H??Subject: Returned mail: see transcript for details
H??Auto-Submitted: auto-generated (failure)

I don't understand the reason that it is doing this...

TIA!


From: Grant Taylor on
Alex Moen wrote:
> Running /var/mqueue/worldq/l11LGHEN020602 (sequence 6 of 775)
> <1234567bwyw(a)email.lu>... Connecting to mail.email.lu. via esmtp...
> 220 free.email.lu ESMTP Unity v1.0 TestPhase
> >>> EHLO ndtc3500.stellarnet.com
> 250-free.email.lu
> 250-PIPELINING
> 250-SIZE 20971520
> 250-VRFY
> 250-ETRN
> 250-STARTTLS
> 250-AUTH LOGIN PLAIN
> 250-AUTH=LOGIN PLAIN
> 250 8BITMIME
> >>> MAIL From:<> SIZE=3074 BODY=8BITMIME
> 250 Ok
> >>> RCPT To:<1234567bwyw(a)email.lu>
> >>> DATA
> 450 <1234567bwyw(a)email.lu>: Recipient address rejected: User unknown in
> local recipient table

Um, why is the server Temp Failing for an unknown / invalid recipient? Furthermore why is it doing so after the DATA phase, not after the RCPT phase?

> <1234567bwyw(a)email.lu>... Deferred: 450 <1234567bwyw(a)email.lu>: Recipient
> address rejected: User unknown in local recipient table
> 554 Error: no valid recipients
> >>> RSET
> 250 Ok
> <1234567bwyw(a)email.lu>... Connecting to plop.gms.lu. via esmtp...

This is as I would expect.

> Why, after sendmail got the 554 error, did it retry connecting to
> plop.gms.lu??? The nslookup shows
> [root(a)ndtc3500 worldq]# nslookup -type=mx gms.lu

Wrong domain to do an MX query for.

> Where did it get the idea that it should connect to plop.gms.lu?

nslookup -query=mx email.lu
Server: 206.152.114.66
Address: 206.152.114.66#53

Non-authoritative answer:
email.lu mail exchanger = 10 mail.email.lu.
email.lu mail exchanger = 20 plop.gms.lu.

plop.gms.lu is a backup mail exchanger (MX) for the email.lu domain. Thus, I would expect Sendmail to connect to plop.gms.lu.

> I don't understand the reason that it is doing this...

MX records are telling it to do so.

With the fact that email.lu and plop.gms.lu are returning Temp Fails on unknown recipients, Sendmail will keep retrying to send messages until they expire, I think. This in and of its self may be why messages never left the mail queue.

Can / Will someone with more experience in such a situation please help clarify this?

Per Hedeland: Do you have any thing to add to this / correct me?



Grant. . . .

From: Alex Moen on

"Grant Taylor" <gtaylor(a)riverviewtech.net> wrote in message
news:mailman.142.1170370768.28999.comp.mail.sendmail(a)maillists.riverviewtech.net...
> Alex Moen wrote:
>> Running /var/mqueue/worldq/l11LGHEN020602 (sequence 6 of 775)
>> <1234567bwyw(a)email.lu>... Connecting to mail.email.lu. via esmtp...
>> 220 free.email.lu ESMTP Unity v1.0 TestPhase
>> >>> EHLO ndtc3500.stellarnet.com
>> 250-free.email.lu
>> 250-PIPELINING
>> 250-SIZE 20971520
>> 250-VRFY
>> 250-ETRN
>> 250-STARTTLS
>> 250-AUTH LOGIN PLAIN
>> 250-AUTH=LOGIN PLAIN
>> 250 8BITMIME
>> >>> MAIL From:<> SIZE=3074 BODY=8BITMIME
>> 250 Ok
>> >>> RCPT To:<1234567bwyw(a)email.lu>
>> >>> DATA
>> 450 <1234567bwyw(a)email.lu>: Recipient address rejected: User unknown in
>> local recipient table
>
> Um, why is the server Temp Failing for an unknown / invalid recipient?
> Furthermore why is it doing so after the DATA phase, not after the RCPT
> phase?
>
>> <1234567bwyw(a)email.lu>... Deferred: 450 <1234567bwyw(a)email.lu>: Recipient
>> address rejected: User unknown in local recipient table
>> 554 Error: no valid recipients
>> >>> RSET
>> 250 Ok
>> <1234567bwyw(a)email.lu>... Connecting to plop.gms.lu. via esmtp...
>
> This is as I would expect.
>
>> Why, after sendmail got the 554 error, did it retry connecting to
>> plop.gms.lu??? The nslookup shows
>> [root(a)ndtc3500 worldq]# nslookup -type=mx gms.lu
>
> Wrong domain to do an MX query for.
>
>> Where did it get the idea that it should connect to plop.gms.lu?
>
> nslookup -query=mx email.lu
> Server: 206.152.114.66
> Address: 206.152.114.66#53
>
> Non-authoritative answer:
> email.lu mail exchanger = 10 mail.email.lu.
> email.lu mail exchanger = 20 plop.gms.lu.
>
> plop.gms.lu is a backup mail exchanger (MX) for the email.lu domain.
> Thus, I would expect Sendmail to connect to plop.gms.lu.
>
>> I don't understand the reason that it is doing this...
>
> MX records are telling it to do so.

Yep. I get it. I missed that. Duh!!!

> With the fact that email.lu and plop.gms.lu are returning Temp Fails on
> unknown recipients, Sendmail will keep retrying to send messages until
> they expire, I think. This in and of its self may be why messages never
> left the mail queue.
>
> Can / Will someone with more experience in such a situation please help
> clarify this?
>
> Per Hedeland: Do you have any thing to add to this / correct me?
>
>
>
> Grant. . . .



So, if Sendmail will keep trying until they expire, that would be reflected
in the setting I have for one of the queuereturns, which I have set for 2
days, right? So, can I change the behavior to dump immediately in the case
of unknown recipients, and have it drop them immediately on the unknown?
Or, does it do that already and I am just not waiting long enough?

Thanks for the help so far, Grant... And for pointing out my "duhness"! :)


From: jmaimon on
On Feb 1, 10:15 am, "Alex Moen" <a...(a)ndtel.com> wrote:
> "mega" <erich.t...(a)think.ch> wrote in message
>
> news:45c1f554$0$18821$5402220f(a)news.sunrise.ch...
>
>
>
> > Alex Moen wrote:
> > .....
>
> >> Symptoms like never deleting undeliverable mail, and mail queues filling
> >> up
> >> to a hundred thousand messages in a few days, appears to be a Sendmail
> >> problem, or an improper configuration. Sendmail should delete these
> >> messages after a time limit (which, BTW, is set for 2 days), and not let
> >> the
> >> queue grow to such a spectacular size. I have pursued this problem from
> >> many different angles on the newsgroup in the past, and I cannot seem to
> >> get
> >> anyone to help solve the problem. I realize that everyone here has other
> >> things better to do and are not compensated, so I am not angry or
> >> anything,
> >> don't get me wrong. Just figured I'd asked the question improperly. So,
> >> the drastic measure of stopping all these "friendly" bounces is simply a
> >> way
> >> to regain control over this machine and keep the business up and running.
> >> Is it impossible to do this? Even if it is RFC incompliant? We are
> >> looking
> >> into the commercial version of Sendmail, but it would be nice to continue
> >> using the open-source version if possible...
>
> > You can....
>
> > The best answer you got is _use_ldap_routing_
>
> > If you cannot deploy a LDAP server in a short timeframe, you may be able
> > to use the same feature with a local map. Actually building such a map
> > file is not that difficult. You can then convert to real ldap routing
> > once your server is up and functional
>
> > cheers
>
> > Erich
>
> OK, understood, but that does not answer the question of why the queue files
> never go away, even after the timeout has occurred. Why would those files
> not be deleted after the timeout? If Sendmail would accept that it is
> undeliverable after a time and then give up and delete the files, the
> problem would not exist. Do I not understand something here, or what am I
> missing?

Timeouts and runners per queue.