Penelope Fudd said:
> Hello!
>
> I've set up mgetty to email incoming faxes to me and my buddy.  When a
> fax comes in, it's converted to gif files (1 per page) and emailed using
> sendmail.
>
> The problem is, I can read the faxes fine (using Evolution), but my
> buddy can't (using IE and SM).  When I switch to Mozilla and SM, I have
> the same corruption.  When either of us save the attachments to a file
> using SM, the file is corrupted (3 bytes shorter than it should be).
> Further examination of a hexdump shows that something weird is going on.
>
> $ ls -l realfax1.gif test1.gif
> -rw-------  1 root root 85326 Apr 29 01:39 realfax1.gif
> -rw-------  1 root root 85323 Apr 29 01:00 test1.gif
> $ cmp realfax1.gif test1.gif
> realfax1.gif test1.gif differ: char 17063, line 62
> $ file realfax1.gif test1.gif
> realfax1.gif:                 GIF image data, version 87a, 1728 x 2164
> test1.gif:                    GIF image data, version 87a, 1728 x 2164
> $ xxd realfax1.gif realfax1.gif.xxd
> $ xxd test1.gif test1.gif.xxd
> $ diff -u realfax1.gif.xxd test1.gif.xxd | sort +0.1 -0.10 +0.0r > out
> $ head out
> +++ test1.gif.xxd       2004-04-29 02:00:47.838404192 -0700
> --- realfax1.gif.xxd    2004-04-29 02:00:35.269314984 -0700
>  0004270: defd 0743 7124 4bf3 4453 7565 5bf7 8563  ...Cq$K.DSue[..c
>  0004280: 79a6 6bfb c673 7de7 7bff 0706 8543 62d1  y.k..s}.{....Cb.
>  0004290: 7844 2695 4b66 d3f9 8446 a553 6ad5 7ac5  xD&.Kf...F.Sj.z.
> -00042a0: 66b5 5b6e d7fb 0587 4f00 7282 7c0e 9c01  f.[n....O.r.|...
> +00042a0: 66b5 5b6e d7fb 5874 f007 2827 c0e9 c012  f.[n..Xt..('....
> -00042b0: 28b4 d8fd 86c7 e573 7add 7ec7 e7f5 fba4  (......sz.~.....
> +00042b0: 8b4d 8fd8 6c7e 5737 add7 ec7e 7f5f ba4f  .M..l~W7...~._.O
> -00042c0: faa3 5e6b 680b 293b 184c 0344 2cfc 5b54  ..^kh.);.L.D,.[T
> $
>
> Starting at 42a6, the entire file is shifted *four bits* to the left!
> '0587 4f00' becomes '5874 f007', and so on for quite a ways... until
> 8f4c or so, where it slips another four bits to the left.  To lose three
> bytes, I guess it slips 6 times.
>
> What the heck is causing this???
>
> I'd include this fax gif file, except a) it's my tax return, and b) it
> happens to every gif file we've tried viewing with SM.  The commands to
> create the gif file were:
>
> $ cat (some fax file) | g3topbm -s | ppmtogif > out.gif
>
> Then to encode it:
>
> $ mewencode -b out.gif > out.base64
>
> Since it's ok in Evolution, I'm inclined to think the encoding process
> is just fine.
>

I think I have fixed this.

Probably it has todo with the line length of the base64 encoded data. If
the number of bytes excluding \r\n on a line isn't a multiply of 4 then
attachments gets corrupted when you display or save them in SquirrelMail.

SquirrelMail 1.4.3 which will be released soon contains a fix for that.

Regards,

Marc Groot Koerkamp.





-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id)95
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to