How to catch a mailer error

How to catch a mailer error

am 31.03.2008 10:41:52 von Christian

Hi,

I have a Perl mailer called that way :

Matmail P=/servers/apache/sites/atmail/savemsg.pl,
F=lsDFMA5:/|@qSPhn9, S=EnvFromL/HdrFromL,
R=EnvToL/HdrToL,
T=DNS/RFC822/X-Unix, U=nobody,
A=savemsg.pl $g $u

Sometimes, I get the following error :

Mar 31 07:32:14 black sendmail[25866]: m2V5WDq25860: to=,
delay=00:00:00, xdelay=00:00:00, mailer=atmail, pri=32256, dsn=5.3.0,
stat=unknown mailer error 255

I cannot find any relevant system information about a problem at the time
this error pops up. So here is my question : is there a way to catch a
mailer error so that the message stays in the mail queue until it gets
delivered ?

Thanks in advance.

Christian

Re: [sendmail,perl] How to catch a mailer error [perl script as sendmail.cf mailer]

am 01.04.2008 17:34:41 von Giorgos Keramidas

On Tue, 1 Apr 2008 16:05:40 +0200, "Christian" wrote:
> "Clemens Zauner" a ‚crit dans le message de news:
> fstegs$1ru7$1@geiz-ist-geil.priv.at...
>> Christian wrote:
>>> - write a savemsg.sh delivery prog which would be called in place of the
>>> savemsg.pl one, and which would call the latter, test for its return
>>> code,
>>> and exit with EX_TEMPFAIL when necessary. Fast but not very clean.
>>
>> replace the calling of "die" ba calling "exit $retval" with the correct
>> return values.
>
> The delivery prog has heaps of functions without error control. So I doubt
> there's any die statement I can modify that way.

Are you sure you want your email to pass through such a poorly written
program then? /me ducks and runs :-)

Re: [sendmail,perl] How to catch a mailer error [perl script as sendmail.cf mailer]

am 02.04.2008 10:33:01 von Christian

> On Tue, 1 Apr 2008 16:05:40 +0200, "Christian"
> wrote:
>> "Clemens Zauner" a ,crit dans le message de
>> news:
>> fstegs$1ru7$1@geiz-ist-geil.priv.at...
>>> Christian wrote:
>>>> - write a savemsg.sh delivery prog which would be called in place of
>>>> the
>>>> savemsg.pl one, and which would call the latter, test for its return
>>>> code,
>>>> and exit with EX_TEMPFAIL when necessary. Fast but not very clean.
>>>
>>> replace the calling of "die" ba calling "exit $retval" with the correct
>>> return values.
>>
>> The delivery prog has heaps of functions without error control. So I
>> doubt
>> there's any die statement I can modify that way.
>
> Are you sure you want your email to pass through such a poorly written
> program then? /me ducks and runs :-)
>

Actually, it has been through it for 4 or 5 years without noticeable
problems. These errors have started to arise only recently. And I need a
quick patch before investingating more in depth.

Just to let you known, it's a lightly customized version of the Atmail
delivery agent (http://atmail.com/).

Re: [sendmail,perl] How to catch a mailer error [perl script as sendmail.cf mailer]

am 02.04.2008 23:50:54 von Giorgos Keramidas

On Wed, 2 Apr 2008 10:33:01 +0200, "Christian" wrote:
> Just to let you known, it's a lightly customized version of the Atmail
> delivery agent (http://atmail.com/).

Ah, that's more familiar :)