On Wed, 20 Jan 1999, Graham Leggett wrote:
> The question still remains though, the documentation on the queryprogram
> function is vague - it doesn't specifically say (as far as I can see)
> how the email message is passed to the program. Is this done on stdin?
The email message is not passed to the queryprogram router, which is
intended for doing routing, not for scanning messages. You typically pass
it the address of interest via the command line. A single message, with
many recipients, might cause the queryprogram router to be invoked many
times.
If you want to do a once-per-message scan, then a system filter might be
the answer. You can inspect $message_headers and $message_body (though
the latter is usually limited to the first part of the body only), and I
guess these days you could get it to fire up an embedded Perl
interpreter and run some Perlery that does all sorts of weird and
wonderful things.
The other thing that I believe has been done by some people is to
deliver all messages via a pipe to a checking program, that resubmits
them for delivery in some private way that can be checked (e.g. on a
specific SMTP port, or IP address).
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.
--
*** Exim information can be found at
http://www.exim.org/ ***