[Top] [All Lists]

Re: MIME loops: Extracting attachment to disk and replacing it with an URL

2008-04-30 23:05:21

While I can see the utility of such an extension, I would not want to
burden the MIME loops spec for replace with it.


Alexey Melnikov wrote:

Arnt Gulbrandsen wrote:

Alexey Melnikov <alexey(_dot_)melnikov(_at_)isode(_dot_)com>
Elaborate on how this can be done with Sieve variables, or elaborate on
extracting attachements in general?
How it would be done, the role of :url, and why :url makes this
Ok, imagine that I receive in my mailbox a multipart/mixed message with some text/plain and a big pdf attachment.
The pdf attachment might look like this:

Content-Type: application/pdf;

Content-Transfer-Encoding: base64
Content-Disposition: inline;



I want my Sieve script to extract the attachment and put it on an FTP server that my mail server trusts.
I want to write a Sieve script (or rather a piece of it), for example:

replace :url text:
Sender sent you a big PDF. If you really want to read it, look here:

And this would generate a replacement text/plain body part, something like:

Content-Type: text/plain

Sender sent you a big PDF. If you really want to read it, look here:


(Name of the extracted pdf was generated in a way to guaranty filename uniqueness.)

Does this make more sense?