Automatic file encoding / decoding

To send files to other users in FidoNet, you can use file attaches. To send files to other users on the Internet or attached to an article in a newsgroup, you encode the file and store it in the body of the message.

An encoded files in a message can look like this:

begin 666 wtrutil.dif
M1$E&7U8U5U12551)3"Y%6$4@\"@"`.'(W\2=A(@@`0```/__```!`/____\!
<etc>
>`/$H`````````(`=`6,#`@#E`6(#`@"M`6$#`@``
`
end
This is a so called "UU-encoded" file. The strange format is done because most news articles and e-mail messages can only contain 7-bit characters and no control characters or high-ASCII. A binary files contains a lot of 8-bit codes so this cannot be put into a message directly.

How it works

UU-encoding takes a group of 8-bits codes and converts it to four 6-bit codes. These 6 bits are then encoded in the message using 64 (2^6) characters, amongst which A-Z, 0-9 and some others.

The difference between UU-encoding, XX-encoding and MIME encoding is basically the set of 64 characters used. There are different reasons to use a certain character set, basically to become independent of the transport mechanisms between the sender and recipient.

Encoding files

To help you send files along to other users on the Internet, WaterGate has the ability to automatically UU-encode an attached file when it gates a netmail message to an e-mail. All you have to do is write a netmail that will be gated and attach the file to that netmail (using a file attach).

WaterGate currently never deletes the gated files. Automatically gated files from your downlinks will be deleted in the future though.

The internal decoder is smart enough not to encode files that don't contain 8-bit codes, for example plain text files.

Decoding files

WaterGate can detect and extract an encoded file from a message when it writes the message to a message base. It can do this for all three types of message bases.

Decoding files is only done when you have specifically told WaterGate to do it for that area. For netmail it only decodes files for messages addressed to your system. It will never decode files for your users. This requires some more support that will follow in the future.

Each area can be configured to have its own path where the decoded files will be stored. This way you can keep the decoded files nicely separated per area.

Notice that decoding takes place when the message is imported into the message base, thus not when the message is gated from e-mail to netmail or news to echomail. This was done with several reasons in mind: the same message will be sent to several users, imported into an area and possible distributed via a mailing list. Not all "targets" want this file extracted, so it is extracted when the message is imported.

This means that an echomail or netmail message that contains a valid encoded file, but did not arrive via the Internet, can be decoded by WaterGate when that message is imported. If you are a Fidonet style user underneath some gateway, then you can now decode the files from messages you receive from that gateway!

Look for the options "Decode files" and "Files path" in the Area definitions and Fido message bases setup to enable the automatic decoding.

Tip: I have disabled decoding of files for my primary netmail area, but I have set up a Private Scan for my personal mail and connected it to a *.MSG base and enabled decoding on that message base.


Back to Table of Contents or continue to the next section.

Comments or questions? Send an e-mail to editor@wsd.wline.se.

Last updated 13 October 1996