Re: [exim] Disk failure => 5xx error code

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: John Rowe
CC: exim-users
Subject: Re: [exim] Disk failure => 5xx error code
On Fri, 31 Mar 2006, John Rowe wrote:

> Sorry about the confusion, clearly it wasn't getpwnam but was presumably
> either a hosts_ctl() or verify_check_host() problem.


hosts_ctl() refers to the use of tcpwrappers, which I think few people
use. verify_check_host() refers to the use of the host_reject_connection
option, which again I think few people use - because this can done more
flexibly in an ACL. I presume you are, however, using one or both of
those? I still agree that avoiding the 554 when your disks die is
desirable.

> Obviously this raises a potentially tricky question of whether this
> should return 5xx or 4xx but could we try the following: zero errno
> before the check and if the check fails test errno for a list of values
> that must mean "something is wrong" (EIO, EMFILE, ENFILE, ENOMEM, ENOSPC
> and maybe a few others).


All sorts of things might modify errno while inside those functions and
those they call. I don't think relying on checking at the outer level is
a good idea. Checks on errno should happen right after the system call
that might set the value. Otherwise something else might flatten it.

I'll take a deeper look at this some time, but not before 4.61.


-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book