Re: [EXIM] Prcessing outbound messages

Top Page
Delete this message
Reply to this message
Author: J C Lawrence
Date:  
To: exim-users
Subject: Re: [EXIM] Prcessing outbound messages
On Sat, 29 May 1999 13:04:37 +0300
Vadim Vygonets <vadik@???> wrote:

> Quoth J C Lawrence on Fri, May 28, 1999:
>> Given messages that arrive in Exim's queue from <where-ever>, how
>> can I configure Exim such that all outbound messages which
>> contain a specified header field are processed by a defined
>> script which edits the message contents?


> Yes, with a system filter.


True, but that gets painful for what I need to do. The short story
on what I'm attempting is to set up a crypted mailing list:

  1) Messages are sent to the list either in plain text or crypted
     with the list's public key


  2) An Exim filter decrypts any crypted messges and adds a custom
     header to the message to indicate such.


3) The list then broadcasts the messages to the subscribers.

  4) An Exim router intercepts the outbound messages, and re-crypts
     those with the custom header with each recipient's individual
     key (no key group, individual messages/crypts).


Yes, I know all the scalability problems. I've also seen how many
have tried this and given up. No, I'm not going to use
PGPsendmail/PGPdaemon.

It looks like I can do the above as follows (untested, so
corrections and comments ___extremely___ welcome):

  if $local_part does not begin "crypt-" then
    finish
  else if $message_body contains "-----BEGIN PGP MESSAGE-----" then
    if $header_X-Crypt: is not "yes" then
      headers add "X-Crypt: yes"
    endif
    pipe "uncrypting.filter ${local_part}-real"
    finish
  else 
    headers add "X-Crypt: no"
    deliver ${local_part}-real
  endif


Where the list names all begin with "crypt-", <listname>-real is the
actual address that reaches the mailing list (the first address just
hits the decrypt filter), and "uncrypting.filter ${local_part}-real"
uncrypts any crypted blocks and then pipes the resultant message
back to the MTA as a new message (I'm ignoring envelope problems for
now) targetted at <listname>-real.

For the outbound side it looks like I can use a transport/router something
like:

  secure_smtp:
    size_addition = -1
    transport_filter = "crypter.py $pipe_addresses"


  secure_delivery:
    senders = crypt-*@???
    headers_remove = "X-Crypt"
    transport = secure_smtp


Does this look like it will work?

> From your description I can hardly understand what exactly you
> want, so I can't help you further...


Hopefully the above clarifies.

>> ... Beware of cromagnons wearing chewing gum and palm pilots ...


> Nice!


<bow>

-- 
J C Lawrence                                   Home: claw@???
---------(*)                Linux/IA64 - Work: claw@???
 ... Beware of cromagnons wearing chewing gum and palm pilots ...


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