[exim] More embedded Perl functionality

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Tore Anderson
Data:  
Para: exim-users
Asunto: [exim] More embedded Perl functionality

Hi. I've got a few items for the WishList.

First off, I'd like to be able to process the whole message inside the
embedded Perl functions. I'm happy with it being some read-only
variable or file handle (or even an intrinsic Exim variable that can
be passed along as a parameter), just so that I can actually do spam
filtering and return a string fit for headers_add or something.

Secondly, I'd like to have a "perl" transport. No, really, I'm being
serious. :) Often, I find myself ending up writing custom MDAs, as I
need to update some quota counter in a database or whatever, which
rarely is possible to do properly within Exim itself. But it could
easily be done within Exim's embedded Perl, which would make all of my
home-made external MDAs superfluous. For example:

    localstore:
      driver = perl
      return_path_add = true
      perlsub = deliver_localstore $local_part $message_size


and the deliver_localstore() function got $local_part and
$message_size as $_[0] and $_[1] and was then responsible for updating
the quota counter, saving the message (found in <MESSAGE> or wherever,
according to wish #1) to disk somewhere, fsync'ing, and return 0 if
everything went fine.

I wonder how hard it would be to implement something like this? :)

Kind regards,
--
Tore Anderson