Subject: [netatalk-admins] Converting MIME AppleDouble resource fork to netatalk AppleDouble

From: [email-masked] (Thad MacMillan)
Date: Wed, 8 Jul 1998 07:10:08 -0700

I'm running netatalk-1.4b2+asun2.0a18.2, and I've hit a small snag. I've
searched the email archives, looked through the source, even wandered through
RFC 1740 with no luck.

I have an application that has to extract MIME attachments from mail files
and make them available via netatalk to some Macs. I'm using munpack to
extract them and further processing the files dependant upon their encoding.

If the encoding is BinHex, MacBinary, or AppleSingle, I can run unbin, unhex,
or unsingle to split the attachments into the 2 files (forks) netatalk needs.

I'm running into trouble when the encoding is AppleDouble. munpack leaves me
2 files -- The data fork, and the AppleDouble resource file. I have tried
simply moving the resource file into .AppleDouble with the correct name, but
the Macs only see a default TEXT (folded-corner) document. Upon closer
inspection it appears that the MIME AppleDouble format is a Ver. 2, where,
netatalk uses a Ver. 1 format. Of course, I can't find a spec. that outlines
the differences between the two...

Am I going to be stuck with trying to write a filter to convert these, or has
someone already done it, or am I simply doing something wrong?

Any help/suggestions would be greatly appreciated.

Thanks in advance,
Thad MacMillan
Oregonain Publishing Co.
Portland, OR

---

From: [email-masked] (Bob Smith, Hammett & Edison, Inc.)
Date: Fri, 10 Jul 1998 19:47:48 -0700

On Fri, Jul 10, 1998, 16:23:53 Thad MacMillan wrote:

>netatalk uses a Ver. 1 format.
>
>Am I going to be stuck with trying to write a filter to convert these, or
>has someone already done it, or am I simply doing something wrong?

The problem is netatalk assumes it will only encounter AD files created by
itself, so it looks for a very specific layout to the file header and doesn't
properly parse a file that doesn't have the format it expects.  Even a version
1 AD file not created by netatalk will cause unpredictable behavior.  I've got
a header conversion utility that may be useful for anyone with this problem, I
sent it privately to Thad, if anyone else is interested just send me a
request!

Bob Smith
Hammett & Edison, Inc.
[email-masked]