Re: [Exim] Inline Perl filtering

Top Pagina
Delete this message
Reply to this message
Auteur: Philip Hazel
Datum:  
Aan: charlie
CC: exim-users
Onderwerp: Re: [Exim] Inline Perl filtering
On Sat, 12 Aug 2000, Charlie Freckleton wrote:

> The manual seems a bit light on instructions for using embedded perl, but it
> does mention that you must register your perl routines before you can use them.
> Could someone please enlighten me on how I use the above function in a filter
> file and also how to register it.


It's light because it's a "rarely used feature". However, I thought
chapter 10 gave enough information. As it says, you must put something
like

perl_startup = do '/etc/exim.pl'

in your config, where the file contains the Perl *subroutines* you want
to use (i.e. not a complete script). Then you can use

${perl{foo}{arg1}{arg2}..}

in any expansion string, where foo is a Perl subroutine that is defined
in /etc/exim.pl. So a filter file could contain

if "${perl{foo}{...." is "VIRUS!!!" then .... whatever .... endif


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