How to catch a mailer error
Hi,
I have a Perl mailer called that way :
Matmail P=/servers/apache/sites/atmail/savemsg.pl,
F=lsDFMA5:/| [at] 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=<xxx [at] xxx.fr>,
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]
On Tue, 1 Apr 2008 16:05:40 +0200, "Christian" <cgregoir99 [at] yahoo.com> wrote:
> "Clemens Zauner" <cz+usenet [at] onlineloop.com> a ‚crit dans le message de news:
> fstegs$1ru7$1 [at] geiz-ist-geil.priv.at...
>> Christian <cgregoir99 [at] yahoo.com> 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]
> On Tue, 1 Apr 2008 16:05:40 +0200, "Christian" <cgregoir99 [at] yahoo.com>
> wrote:
>> "Clemens Zauner" <cz+usenet [at] onlineloop.com> a ,crit dans le message de
>> news:
>> fstegs$1ru7$1 [at] geiz-ist-geil.priv.at...
>>> Christian <cgregoir99 [at] yahoo.com> 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]
On Wed, 2 Apr 2008 10:33:01 +0200, "Christian" <cgregoir99 [at] yahoo.com> 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 :)