Re: [EXIM] Detecting the return code of procmail?

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Tabor J. Wells
CC: exim-users
Subject: Re: [EXIM] Detecting the return code of procmail?
On Thu, 30 Apr 1998, Tabor J. Wells wrote:

> We've got things set up so that final delivery is done via procmail if a
> .procmailrc exists in a user's home directory. However if that user is
> over quota mail sent to them bounces as undeliverable instead of being
> queued for a future deliver attempt with an error message that looks like:
>
>     Child process of procmail_pipe transport returned 73 from command:  


That code is defined in sysexits.h (on Solaris 2) as

#define EX_CANTCREAT    73      /* can't create (user) output file */


Exim does already treat code 75, defined as

#define EX_TEMPFAIL     75      /* temp failure; user is invited to retry */


as a temporary error.

> Ideally I'd like to be able to change things such that if procmail returns
> error code 73, the mail would be defered instead of bounced.


You can patch transports/smtp.c at line 837, which reads

      addr->transport_return = (rc == EX_TEMPFAIL)? DEFER : FAIL;


and change it to something like

      addr->transport_return = (rc == EX_TEMPFAIL || rc == EX_CANTCREAT)? 
        DEFER : FAIL;


I have made a note to upgrade the driver to allow a list of temporary
codes to be configured. That will make it more flexible.

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***