[Top] [All Lists]

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

2008-04-21 13:03:02

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?