Re: [EXIM] Filtering Question + patch for MySQL database.

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Vincent Renardias
CC: exim-users
New-Topics: [EXIM] ETRN and Microsoft NT Exchange
Subject: Re: [EXIM] Filtering Question + patch for MySQL database.
On Fri, 19 Jun 1998, Vincent Renardias wrote:

> I'm testing exim .forward's filtering feature, and I haven't found the
> method to get the exit value of a command excuted by the pipe directive.
> ie: I'd like for example to have in my .forward:
>
> ---
> # Exim filter
> pipe /usr/local/bin/foo
> if $pipe_exit_value is "0" then
>    deliver joe@???
> elif $pipe_exit_value is above "0" then
>    save $home/Mail/
> else
>    seen finish
> endif
> ---

>
> Did I overlooked the filtering doc, or is this feature currently not
> available?


It's not available. The filtering facility *sets up* deliveries; it does
not actually run them while filtering (pipe is just another kind of
delivery). Think of filtering as a "forward file with conditions".

This is a common misconception. I have it in mind to think about whether
something could be done about it, since people do seem want to run pipes
as part of the filtering process. However, this won't happen for some
time (the thinking, that is) because I have plenty of other things to
do...

> Something totally unrelated: I have added a new lookup method to exim-1.92
> to use a MySQL database which allows to have in exim.conf:
> "local_domains = mysql;domains"
> or
> "file_directory = ${lookup{$local_part@$domain}mysql{aliases}{$value}fail},"
>
> The code is currently very messy, but once I've cleaned it up a bit, I
> intend to publish it if other people are interested. (it also currently
> only allows single-key lookups, query-style lookups should be done by next
> week).


Somebody else was doing some SQL work some time ago, but I never heard
anything more about it.

Philip

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



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