Re: [exim] How to trap "command timed out"? (avoid 451 rejec…

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Evgeniy Berdnikov
日付:  
To: exim-users
題目: Re: [exim] How to trap "command timed out"? (avoid 451 reject)
On Thu, Mar 14, 2019 at 07:14:30PM +0000, Andrew C Aitchison via Exim-users wrote:
> On Thu, 14 Mar 2019, Aki Kyo via Exim-users wrote:
>
> > Hi,
> >
> > I'm running a command on a decoded MIME part:
> >
> > ${run{/path/to/command $mime_decoded_filename}}
> >
> > In some very rare cases, I get "command timed out" and the message is
> > rejected with 451 code
> >
> > Aside from debugging why it timed out, most important, how can I catch
> > this condition so the timed out command doesn't cause a 4xx temporary
> > rejection? My command not so important so I want to skip this command
> > and accept the message
>
> If no one comes up with a way to do it in exim,
> you can write a wrapper that calls "command" and returns after a set time
> even if command has not completed.
> I have never written such a wrapper and don't know which scripts
> or other languages would be good for such a task.


Linuxes are generally packed with timeout(1) from coreutils.
Test shows that ${run..} sets timer for 1 minute, so argument
for timeout(1) wrapper should be less then 60s.
--
Eugene Berdnikov