Re: [exim] Saving and/or processing attachments

Pàgina inicial
Delete this message
Reply to this message
Autor: Jasen Betts
Data:  
A: exim-users
Assumpte: Re: [exim] Saving and/or processing attachments
On 2013-10-07, Aurelin <code@???> wrote:
>
> Hi all,
>
> My customer wants to be able to send an e-mail with an attached image
> (up to ~2 MB) to have this posted to their website.
> Now what I set up is a router that forwards the e-mail to a pipe and
> then gets processed by a scrip. In order to transmit the e-mail to the
> script, I use the $message_body and $message_body variables, but
> here's my problem: If the attachment is bigger than ~50 KB, those
> variables will not hold the entire e-mail text and the attachment is
> broken (due to the attachment being sent as a base64 encoded string).
> Now my questions are:


> 1. Can I somehow get exim to save the attachment before the e-mail is
> piped to the script?


possibly I haven't looked into content scanning much.

> 2. Is there a variable that holds the entire e-mail content, without
> character limitation?


You can read it from the spool file but that's probably not the best
way.

> 3. Would it somehow be possible to change the attachment format from a
> base64 encoded string to something that uses less characters?


yenc, or 8-bit use less but not sufficiently less.

> I have tried to change the limit for $message_body, but if I increase
> it above 99999, the e-mail will be bounced. Also, I have a feeling
> that this is not the way to go..


Use the pipe transport instead.

Most standard configurations of exim (and other MTAs) accept
"|/path/to/script-name" as a destination in ~/.forward or in /etc/aliases

--
⚂⚃ 100% natural