Hi all,

I recently wrote a small content filter script (in bash) to use on my
local Postfix installation. The script receives via "pipe:" the
recipient and the sender's addresses then responds by sending back a
message containing some body text and an image attachment.
It works as it is supposed to do, but with some email clients the image
is not displayed properly.
Gmail, Yahoo and MS Outlook detect the image as an attachment, but
Squirrelmail and my Blackberry only show garbled text.
Here's what a message looks like:

[headers]
[body]

begin 600 img.jpg
m_]...@`.5$n5!y(J````````__X`#DD!-@&D!P```&J2R__;`$,``P("`@("
M`P("`@,#`P,$...@0$!`0$"`8&!08)"`H*"0@)"0H,#PP*"PX+"0D-$0T.#Q`0
M$1`*#!(3$A`3#Q`0$/_;`$,!`P,#!`,$"`0$"!`+"0L0$!`0$!`0$!`0$!`0
M$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$!`0$/_``!$(`>`"

[...]

M"XD.U5'F(,9Y'%-RYG=F:5M!MX[%1!)'O#`D8Z[L]ZR5C7[3!;$%)IY-H4MP
MO.,FMU1-,T,@'F$-A\_>8_PBK&B^']9UGQ3I[6^FR`+,`TAZ#`S^/%:4X7=[
'"ERI6;/_V0``
`
end


To encode the image I use:

/usr/bin/uuencode img.jpg img.jpg > attachment.txt
cat hdr.txt body.txt attachment.txt > message.txt
$SENDMAIL "-f" $4 "--" $2 <message.txt


Anyone knows how to solve this?
Thanks


-RV


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1268056418.3170.14.ca...@osmosis.gnet.eu

Reply via email to