Re: [Exim] Filtering: piping

Góra strony
Delete this message
Reply to this message
Autor: dman
Data:  
Dla: exim-users
Temat: Re: [Exim] Filtering: piping
On Fri, Dec 28, 2001 at 05:35:51PM +0000, Philip Hazel wrote:
| On Thu, 27 Dec 2001, dman wrote:

|
| > I was thinking that it would be really useful (and general) if the
| > 'pipe' command (or perhaps "epipe" to maintain the current "pipe"
| > semantics) would simply report the exit code of the sub process in a
| > variable (such as $exitcode) that the filter script can check and
| > decide what to do with it. For example :

|
| Excuse me. I am very sorry about this, but I can't help it. I am going
| to have to shout, because I've said this so many times before:

|
| PIPE DELIVERIES ARE NOT RUN AT FILTER TIME.


Umm, yeah, duh!, I should have known/remembered.

| The documentation tries very hard to say this, in several places. All
| that happens during a user (or indeed system) filter is that delveries
| are specified. They don't happen until later, along with all other
| deliveries of the message.

|
| Since the pipe is not run during the filter, its result cannot be
| tested. Period.


That makes sense :-).

| If you want procmail-like functionality, use procmail, or write
| something else that runs at delivery time.


Hmm. I'll have to think a bit more about this. It seems that, given
sufficient logic in the filter file, that it could pipe to an external
program first which routes it back to exim to finish filtering later.
Rather convoluted though.

| > I think that this feature would allow exim filters to be infinitely
| > extensible via external programs. Do you think this would be useful?
| > Does the new ${run expansion already provide this functionality? If I
| > made a patch (I haven't looked at the source yet, but I expect it
| > would be quite simple) would you consider accepting it?

|
| To answer the last question first: I can assure you, it won't be "quite
| simple". It will be "completely re-design Exim to an entirely different
| way of working".


Yeah, I see that now. I was thinking I would just have to create a
variable and do little else.

| The ${run facility does allow you to run a program at filter time. It
| does not deliver the message to it, however.


I'd like to see more information about this. I'm sure the info is
there, I just have to dig. (certainly it's in the source if nowhere
else :-)).


Thanks for the response!

-D

--

If your company is not involved in something called "ISO 9000" you
probably have no idea what it is.  If your company _is_ involved in ISO
9000 then you definitely have no idea what it is.
                                (Scott Adams - The Dilbert principle)