Re: [EXIM] Remove attachments

Top Page
Delete this message
Reply to this message
Author: Nigel Metheringham
Date:  
To: Marc Haber
CC: exim-users
Subject: Re: [EXIM] Remove attachments
> On Fri, 4 Jun 1999 11:34:30 +0100 (BST), you wrote:
> >You can't really tamper with the body of a message in a system filter.
>
> But I can _see_ the entire body of a message in a system filter?
> $message_body doesn't seem to do it.


What you can see is in $message_body and is the first part of the body.
You really can't do this in a system filter, you might be able to do it
in perl.


> >(b) You could write a transport filter for the local delivery transport.
>
> That would have to be C code compiled into exim?


No - its a filter process called within the transport - message in,
mangled message out. It could be a shell script.

> I'd like to see some way of piping entire messages through an
> arbitrary filter. This would faciliate removal of attachments, virus
> scanning, QP-to-8-bit-conversion and a bunch of other things. This
> mechanism should have possibilities to generate notification messages
> for both sender and recipient and to optionally fail delivery for a
> single or all recipients.


This can be done with a transport filter... mostly. To do things on a
per recipient basis the filter would need to be invoked on a per
recipient basis. This could get expensive in CPU usage etc.

Also changing the message size dramatically could have interesting
effects - if you do this within an SMTP transaction then the size
changing could upset things - I guess you need to turn off ESMTP.

> Maybe some kind of transport that doesn't do any deliveries but passes
> the message through some processing?


Putting everything through a BSMTP transport to disk and then post
processing it into another exim invocation is a method I have used
before (with smail) - it works very nicely! Its also more efficient
than a transport filter.

    Nigel.


-- 
[ Nigel Metheringham                  Nigel.Metheringham@??? ]
[ Phone: +44 1423 850000                         Fax +44 1423 858866 ]




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