Re: [EXIM] Perl enabled exim

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Oliver Smith
Date:  
À: exim-users
Sujet: Re: [EXIM] Perl enabled exim
>I'm
>thinking that a hypothetical Perl mail hub would be started by a
>wrapper program which immediately surrendered its privileges, and



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.

Perl 5 comes with integration documentation; see man perlembed, man
perlcall, man perl api and man perlapio - there's also perlxs and perlxstut
to see to, but later :-).

The main issues with embedding perl into exim are security (you could embed
taintperl, but that wouldn't help much) and garbage collection. How many
perl scripts open files, create strings and arrays, and then just exit, with
no cleanup?

As for writing a mail system in Perl, it's really not that sort of language.
It's ideal for writing small to medium-large scripts. If you start chaning
perlscripts together it starts becoming very inefficient.

There is programming perl and there is programming in perl; if you're doing
the latter you should probably be doing it in Java.


Oliver


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