From: m3047@halcyon.com (Fred Morris) Newsgroups: comp.sys.mac.comm Subject: SUMMARY: Eudora, Mac <-> PC e-mail, MIME, BinHex, uuencode, AppleDouble... Date: Sun, 04 Feb 1996 16:20:15 -0800 Organization: VAX, Mac, distributed/remote/internet guru Lines: 85 Message-ID: NNTP-Posting-Host: crc7-fddi.cris.com A little while ago there was a thread about the best way to wrap binary enclosures for Mac to PC e-mail. A lot of handwaving in the direction of MIME, somebody said to use AppleDouble, I said uuencode even though, admittedly, it's barbaric. Here's the down & dirty, then, as I've now spent some effort sending enclosures from a couple of different versions of Eudora to a unix box and looking at the raw messages there. Important points to remember for inter-platform transfer of attachments: PCs don't have resource forks; BinHexed and uuencoded attachments can still be MIME-compliant; MIME has its own preferred encoding(s) for binary attachments; the nitty gritty on AppleDouble. PCs DON'T HAVE RESOURCE FORKS PC files don't have resource forks. So you should remember that in the absence of some special "prep" translation, you should be transferring just the data fork of the Mac file; if you're coming the other way, what you send will become the data fork of a Mac file. BINHEXED AND UUENCODED ATTACHMENTS CAN STILL BE MIME-COMPLIANT Traditionally a BinHexed or uuencoded attachment was simply pasted into an e-mail message. This is not MIME-compliant. However many mailers such as Eudora will generate MIME-part headers for attachments that they are responsible for encoding with BinHex or uuencode. Likewise there are many mailers which will decode MIME-parts which are application/binhex, etc. If your mailer can't deal with a BinHex or uuencoded attachment, if it's MIME-compliant then it should save it to a file anyway; you then use some cut & paste and a decoder application to unpack the attachment. If your mailer is not MIME-compliant, then the MIME-parts will be preserved in the body of the e-mail message; you then use some cut & paste and a decoder application as in the case of an attachment-type that your MIME mailer can't handle. BinHex encodes the data and resource forks of a file. While there are PC mailers which decode BinHexed attachments, they can't do anything with the resource fork, so you're wasting some variable amount of bandwidth and diskspace by sending it. uuencode encodes only the data fork of a file. So if you are sending e-mail that may be read on a Mac, and the resource fork contains information that is useful at least on that platform, you're shortchanging yourself by sending stuff this way. OTOH, uudecoders exist for virtually every platform out there. MIME HAS ITS OWN PREFERRED ENCODINGS FOR BINARY ATTACHMENTS The MIME standard introduces its own encoding schemes for binary data, in place of the schemes used by BinHex and uuencode. They are quoted-printable and base64. (Are there helper applications ala BinHex 4.0 on the Mac and the PC that encode/decode base64?) THE NITTY GRITTY ON APPLEDOUBLE AppleDouble creates a nested attachment with two subparts, both encoded with base64. One subpart, application/applefile, is the resource fork of the Mac file. The other subpart is the data fork of the file: the part that's really transportable between Macs & PCs. So hopefully when it gets to a MIME-compliant PC mailer, it ignores the application/applefile subpart and just saves the data fork. To further confuse things, the data fork subpart may be sent with a variety of application/ content-types, which theoretically allows the receiving mailer to know what type of binary file it is. I didn't have ready access to a PC to see what happens coming the other way, in terms of how it looks on the server. The reason I started poking around at this in the first place was MS Word attachments, apparently sent from MS Office on the PC, that had a "map:8" directive that Eudora finds irritating. I'd be interested in further characterizing what PC and other Mac mailers (Eudora, MS Office, gatewayed cc:mail) do in terms of producing MIME-compliant attachments of Word files & the like; if anybody out there can help by generating a few such test messages, drop me a line. This isn't a high-priority issue; it's just that once I get this far into something, I'm never really happy until I've beat it to death. ;-) -- Fred Morris VAX, Mac, distributed/remote/internet fu m3047@halcyon.com fred@blueridge.com Systems Engr., Blueridge Technologies (Sausalito)