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

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Robert Millan
CC: exim-dev, David Woodhouse
Subject: Re: [exim-dev] [PATCH] Implement redirect
On Thu, 29 Jun 2006, Robert Millan wrote:

> On Thu, Jun 29, 2006 at 12:10:14AM +0100, David Woodhouse wrote:
> >
> > Cute idea, but I don't like the implementation much -- it would be
> > better for it to be available in a general fashion from ACLs.
>
> I looked at that first. However, since (AFAICT) the ACL system works in a
> accept/reject/defer logic, my understanding was that a fourth command would had
> to be added to the underlying code specificaly for this feature. Is this
> appreciation correct?


I am watching this thread, but my first feeling is that it is totally
against the overall Exim "approach" to put it where you have. Deciding
what local parts mean (alias/mailinglist/local login/etc) happens in
routers, and it doesn't seem right to hard wire it into the smtp_in
module unconditionally. (Can't remember if you checked the domain, but
that needs flexibility too - not all domains are the same.)

As to your question above, I'm not sure what you are asking. There are
only the three possibilities (accept/reject/defer) that one can give to
a RCPT command. What is the fourth that you are thinking of?

I haven't spent much time looking at this, but if you just want to give
a particular 5xx response to a RCPT command when a user sets up a
.redirect file, what is wrong with a router like this? Not tested,
not even syntactically correct, but I think it should be possible to do
it:

redirect_special:
  driver = redirect
  check_local_user
  require_file $home/.redirect
  condition = ${a hairy condition that reads the file, picks the domain
    out of the address, and checks it against +local_domains for not 
    being local}  
  data = :fail: Not local, try ${readfile{$home/.redirect}}   


OK, it may give the wrong 5xx code - there are wish list items about
that kind of problem.

Final thought: how many users are going to appreciate the difference
between .forward and .redirect, or were you thinking that sysadmins
would create those files?


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