Re: [exim-dev] [PATCH] Implement redirect

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Robert Millan
CC: exim-dev, Magnus Holmgren
Betreff: Re: [exim-dev] [PATCH] Implement redirect
On Tue, 11 Jul 2006, Robert Millan wrote:

> The second digit is also relevant (accept: 250-299, defer: 450-499,
> deny: 550-599).


Are you sure? Where does it say that? What about these (taken from RFC
2821):

      500 Syntax error, command unrecognized
         (This may include errors such as command line too long)
      501 Syntax error in parameters or arguments
      502 Command not implemented  (see section 4.2.4)
      503 Bad sequence of commands
      504 Command parameter not implemented


      421 <domain> Service not available, closing transmission channel


      221 <domain> Service closing transmission channel


> I suggest converting it to integer and then just do a few comparisons.


I don't see the need, even if the test is required, and I'm afraid that
I don't at the moment believe you :-) If we know that x is a digit
(from the pattern match) then x >= '5' is a quicker test.

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