Mailing List Archive

local_scan in perl?
Hi,

has anybody yet written a local_scan function that can call a perl
function, or that can even all an arbitrary shell command as a filter?

Greetings
Marc

--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
Re: local_scan in perl? [ In reply to ]
--
On Sun, Jun 30, 2002 at 12:06:53PM +0200, Marc Haber wrote:

| has anybody yet written a local_scan function that can call a perl
| function, or that can even all an arbitrary shell command as a filter?

Yes. See sa-exim by Marc Merlin. It uses the common unix mechanism
of using a pipe to pass data around.

-D

--

Stay away from a foolish man,
for you will not find knowledge on his lips.
Proverbs 14:7

http://dman.ddts.net/~dman/

--
[ Content of type application/pgp-signature deleted ]
--
Re: local_scan in perl? [ In reply to ]
On Jun 30 Marc Haber wrote:

>has anybody yet written a local_scan function that can call a perl
>function, or that can even all an arbitrary shell command as a filter?

The former is just a case of expand_string() with "${perl ...}" :-)

The latter is easy enough too; see my uvscan local_scan() posted here
about a month ago. (NB mine isn't strictly a shell command--I wanted to be
even lighter than that--but the principle is nice and easy, I hope.)

Matt
Re: local_scan in perl? [ In reply to ]
On Tue, 2 Jul 2002 01:09:39 +0100 (BST), mb@dcs.qmul.ac.uk wrote:
>On Jun 30 Marc Haber wrote:
>>has anybody yet written a local_scan function that can call a perl
>>function, or that can even all an arbitrary shell command as a filter?
>
>The former is just a case of expand_string() with "${perl ...}" :-)

A nice idea ;) Is this actually verified to work?

Greetings
Marc

--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
Re: local_scan in perl? [ In reply to ]
Ok

finally persuaded my company to open source the one I wrote. See
http://oss.bibliotech.net/ . This is a local_scan.c that starts a Perl
interpreter and runs a perl subroutine on each email in much the
same way as the C API works. Its GPL licenced with all the usual
that implies :-)

Instructions for install and how to write the perl local_scan
bit are there as well. I'd appreciate any feedback.

cheers

Richard

On Sun, Jun 30, 2002 at 12:06:53PM +0200, Marc Haber wrote:
> Hi,
>
> has anybody yet written a local_scan function that can call a perl
> function, or that can even all an arbitrary shell command as a filter?
>
> Greetings
> Marc
>
> --
> -------------------------------------- !! No courtesy copies, please !! -----
> Marc Haber | " Questions are the | Mailadresse im Header
> Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
> Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Richard Baker richardb@bibliotech.net
BiblioTech Ltd, Unit 3 Piper Centre, 50 Carnwath Road, London, SW6 3EG.
Office: +44 20 7384 6990 Mobile: 07803 205 898