Re: [EXIM] Having a program conditionally handle mail

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Jason L Tibbitts III
CC: exim-users
Tárgy: Re: [EXIM] Having a program conditionally handle mail
On 16 Mar 1999, Jason L Tibbitts III wrote:

> This provides a configuration method that requires no aliases: just before
> giving up and bouncing a message with 'no such user', pass it through
> Majordomo. If the return code is not favorable then the message wasn't
> Majordomo's either and so it should bounce.


To do this would require a director which runs the command at directing
time. There isn't at present such a director in Exim, though there is a
router called queryprogram which does this for remote addresses. I keep
thinking there should be more uniformity between routers and
directors...

> While this is really quite interesting (the
> actual work is some regexp manipulation and a stat), I'm not sure that it
> is common to actually build Exim with embedded Perl.


No, it isn't, and it would also be quite expensive.

I have noted the requirement in the Wish List.

One other possibility is to provide support built in (conditional
compilation) to Exim by writing a new director which includes your regex
manipulation and stat directly. Hmm. How simple is the regex
manipulation? Exim can do regexs and stats. You can write things like

majordomo:
driver = smartuser
transport = majordomo_pipe
require_files = majordomo:/some/thing/$local_part
condition = ${if match{some regex}{$local_part}{yes}{no}}

which will pass the message to majordomo if the file
/some/thing/$local_part exists (doing the stat() as majordomo) and if it
matches that regex. It could also look things up in files. If those
facilities can be used, maybe your program isn't needed at all!


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



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