Re: [EXIM] Perl enabled exim

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Lee McLoughlin
Fecha:  
A: Nigel Metheringham
Cc: Oliver Smith, exim-users
Asunto: Re: [EXIM] Perl enabled exim
Nigel Metheringham wrote:
>
> oliver@??? said:
> } To answer this and then try and get back to the original question;
> } Perl 5 is designed to be integratable, so you could actually hijack
> } perl5 and write your own main() for it, which opened port 25 as a
> } listening port if neccessary, gave away permissions, ran your C
> } initialisation and then handed over to Perl.
>
> Hmm... could do things this way I guess...
>
> My preference is leaning more and more towards having an additional thing
> that goes in the same place as the system filter does right now. It
> starts a new interpreter (probably using a script that was pre-compiled on
> startup - saves overall time), and runs that at that point, probably with
> the same permissions as the system filter runs right now. The API built
> round it would give it read-only access to basically the set of variables
> that exim defines for filters.
>
> It would be able to return:-
> - a list of recipients (unmodified, modified or empty)
> - an instruction (freeze, drop, bounce or "send-directly-to-transport(x)"
>
> } The main issues with embedding perl into exim are security (you could
> } embed taintperl, but that wouldn't help much)
>
> run in same way as the current filter - same security worries (but more
> powerful language)
>
> } and garbage collection.
>
> Need to look what happens right now - I guess the filter actually runs in
> another process (need to look), in which case that process dies and gets
> taken out with the trash (oh dear, how american - maybe I mean collected
> by the dustbin lorry).
>
> } How many perl scripts open files, create strings and arrays, and then
> } just exit, with no cleanup?
>
> The perl stuff itself should garbage collect - if you destroy the
> interpreter.


My suggestion a few days ago was to add the ability to filter a message
through an external program. This could be used to do all you ask. It
is also more general than hardwiring in perl, as has been suggested.
Personally I like perl but it would be a shame to lock people in to perl
as a scripting language when it isn't necessary.

--
Lee McLoughlin.                         Phone: +44 171 594 8388
IC-Parc, Imperial College,              Fax:   +44 171 594 8432
South Kensington, London. SW7 2AZ. UK.  Email: lmjm@???


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