Hi,
Aurelin <code@???> (Mo 07 Okt 2013 17:44:03 CEST):
>
> 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).
I do not understand why you use the above mentioned variables.
If you have a pipe router, it's up to your pipe command to process the
entire mail.
begin routers
…
foo:
driver = pipe
command = /usr/local/bin/<your command here>
The mail will be send to STDIN of your command. Read more details
in the "The pipe transport" part of the spec.txt (especially about
how to setup the user the process runs as, what to do with output on
STDOUT/STDERR of your command.
It's not up to Exim to decode/extract the message. (But Exim will do so
as part of the mime acl processing.)
> 3. Would it somehow be possible to change the attachment format from
> a base64 encoded string to something that uses less characters?
You're asking for less encoding characters, your lesser size of the encoded
attachment? It's up to the sender to use some more efficient encoding
and up to your script to decode this encoding. Exim itself should handle
any attachment format well, even if it's binary. But a binary attachment
violates the MIME standard, I think.
Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
gnupg fingerprint: 9288 F17D BBF9 9625 5ABC 285C 26A9 687E 7CBF 764A -
(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B)-