Delivery to RT queue returning EX_TEMPFAIL but not debug logs or anything useful

Hi RT list,

I have about 20 RT queues and my users are reporting intermittent
failures with delivery. One example is as follows;

Aug 11 21:32:20 dcmon01 sendmail[8402]: m7BLWJQC008218:
to="|/opt/rt3/bin/rt-mailgate --debug --queue ‘Operations’ --action
correspond --url http://dcmon01.osti.local/rt/", ctladdr=<op
erations.support@tickets.xxx.net> (8/0), delay=00:00:01,
xdelay=00:00:01, mailer=prog, p
ri=46549, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited
with EX_TEMPFAIL

A what appears to be, well formed ticket email is sent to my request
alias, and is rejected with EX_TEMPFAIL. (There are further EX_TEMPFAILS
for the same message)

Eventually the exchange server gives up.

However the confusing thing is that with --debug set in the alias
command, I would expect something useful to be logged in either
/opt/rt3/log/rt.log or /var/log/messages

However there is nothing at all in them for the relevant time for the
message and EX_TEMPFAIL time.

According to the rt-mailgate script, there should be something for this;

warn $content if ($opts{debug});

and according to “perldoc warnings”, the function warn should send the
content to STDERR…

So I’ve no idea where that information is going…

Any ideas?

Thanks,

Tom

Tom H wrote:

Hi RT list,
According to the rt-mailgate script, there should be something for this;

warn $content if ($opts{debug});

and according to “perldoc warnings”, the function warn should send the
content to STDERR…

So I’ve no idea where that information is going…

So further digging reveals this possibility;
http://docs.hp.com/en/B2355-90685/ch04s03.html#ccicedga

“If stdout and stderr are not redirected, they are not printed to the
terminal, and they disappear. However, if a command returns a non-zero
exit status, its output to stderr becomes part of the sendmail error
transcript.”

And the message that is sent back through the relay is;
#< #4.4.7 X-Unix; 75> #SMTP#

So rt-mailgate is sending back exit status 75, its just doesn’t look
like its sending the STDERR, which should at least include stuff like;

warn “Connecting to $full_url” if $opts{‘debug’};

So I’m still losing my rt-mailgate STDERR…

Tom

warn $content if ($opts{debug});

and according to “perldoc warnings”, the function warn should send the
content to STDERR…

So I’ve no idea where that information is going…

Any ideas?

Try to log the error to a file by modifying a little bit rt-mailgate.

Look in you’re apache and rt error logs, if rt-mailgate cannot submit,
there should be an error there.

Try to get the source email which causes problem and to pipe it manually
to the same rt-mailgate command and the same user as sendmail does.

Hi RT list,

I have about 20 RT queues and my users are reporting intermittent
failures with delivery. One example is as follows;

Aug 11 21:32:20 dcmon01 sendmail[8402]: m7BLWJQC008218:
to="|/opt/rt3/bin/rt-mailgate --debug --queue ‘Operations’ --action
correspond --url http://dcmon01.osti.local/rt/", ctladdr=<op
erations.support@tickets.xxx.net> (8/0), delay=00:00:01,
xdelay=00:00:01, mailer=prog, p
ri=46549, dsn=4.0.0, stat=Deferred: prog mailer (/usr/sbin/smrsh) exited
with EX_TEMPFAIL

A what appears to be, well formed ticket email is sent to my request
alias, and is rejected with EX_TEMPFAIL. (There are further EX_TEMPFAILS
for the same message)

Eventually the exchange server gives up.

However the confusing thing is that with --debug set in the alias
command, I would expect something useful to be logged in either
/opt/rt3/log/rt.log or /var/log/messages

However there is nothing at all in them for the relevant time for the
message and EX_TEMPFAIL time.

According to the rt-mailgate script, there should be something for this;

warn $content if ($opts{debug});

and according to “perldoc warnings”, the function warn should send the
content to STDERR…

So I’ve no idea where that information is going…

Any ideas?

Thanks,

Tom

Emmanuel Lacour wrote:

warn $content if ($opts{debug});

and according to “perldoc warnings”, the function warn should send the
content to STDERR…

So I’ve no idea where that information is going…

Any ideas?

Try to log the error to a file by modifying a little bit rt-mailgate.

Look in you’re apache and rt error logs, if rt-mailgate cannot submit,
there should be an error there.

The problem itself is odd, because RT itself is returning 200 for the
request to create the message;

10.127.2.24 - - [11/Aug/2008:21:32:19 +0000] “POST
/rt//REST/1.0/NoAuth/mail-gateway HTTP/1.1” 200 721 “-” “libwww-perl/5.808”

but rt-mailgate is returning exit code 75 to smrsh/sendmail;

operations.support@tickets.xxx.net
#< #4.4.7 X-Unix; 75> #SMTP#

By the looks of it the server returns EX_TEMPFAIL if the return content
didn’t include ok|not ok

114: if ( $content !~ /^(ok|not ok)/ ) {

But sendmail is still not including this error text in the bounce mail
to the requestor… which I guess is the part I am confused about.

I’m going to patch rt-mailgate to log that stuff to a local file for the
meanwhile. But I would be keen to understand where the option to do
that is in the sendmail config.

Tom