An email or club message.
An email or club message.This structure describes a BBS message, be it private or public. BBS messages differ from RFC-822 (Internet email) messages in a number of ways. In fact, in terms of philosophy BBS messages are a combination of email messages and newsgroup articles, with built-in encryption and (optional single) file attachments. Here is a description of the fields:
- from
- The message's sender. This is usually a user ID, but could also be an RFC-822 email address (hence the larger length of the string).
- to
- The message's recipient (a BBS user ID or RFC-822 email address). BBS messages can either have a single recipient, or be public, in which case this field is set to MSG_ALL. If a message needs to be private, yet must reach more than one recipient, copies are made, i.e. multiple individual messages are sent.
- subject
- A brief summary of the contents of the message.
- history
- A list of tortures this message has been subjected to in the recent past. These include forwarding from user to user, networking between systems, sending via off-line reader, being a reply to another message, et cetera. Don't print the contents of this field directly, if you can help it. The field should be tokenised, parsed and translated to improve readability.
- fatt
- The preferred filename of the optional file attachment. In default of a value for this field, the attachment name is constructed the Majoresque way: by appending the extension .ATT(achment) to the message's number. If the message has no attachment, the contents of this field should be considered undefined.
- msgno
- The aforementioned message number.
- flags
- Flags describing this message. Please see the documentation for the MSF_x flags.
- crdate, crtime
- These two 32-bit fields contain the date and time the message was created. This is silly, yes. The very names of the fields refer to the 16-bit days when date and time couldn't fit in one int. These days we only need 32 bits for both time and date. However, these fields are kept in place. We'll need to migrate to a 64-bit time_t soon.
- replies
- The number of replies to this message.
- timesread
- How many times the message was read or downloaded as part of an off-line reader message packet.
- timesdnl
- How many times the file attachment of this message was downloaded. The value should be treated as undefined if the message has no file attachment.
- [timesdnl] How many times the file attachment of this message was downloaded.
- [period] Megistos public messages can be periodic: they re-appear after a set period of time. This field sets the period in days. A value of zero means the message is not periodic. Re-appearance is implemented by forwarding, which implies that the original message is automatically deleted. This makes sense: you don't want rabbit messages in your system.
- cryptkey
- Private messages are weakly encrypted to protect them from the curious eyes of the unscrupulous, inept (and bored) Sysop. This really is weak. The unscrupulous but expert Sysop could crack this in a flash, but at least the contents aren't clearly visible to anyone. If you need strong encryption for private messages, I recommend you looking into transparently encrypted filesystems. Although this still doesn't cure the Bastard Sysop From Hell problem, it keeps things safe from outsiders. Only private messages are encrypted. Public messages have this field set to zero.
- club
- The name of the club this message was published in. Set to the empty string if the message is private (in which case, cryptkey should also be non-zero). The club lacks the conventional leading slash.
- origbbs
- The BBS this message was originally posted to. This is useful for networked systems.
- magic
- A magic number (MESSAGE_MAGIC) included as sort of an afterthought. It should avoid some nasty business with corrupted messages.
- spare
- Reserved for future expansion. Do not use.
- origclub
- The club the message was originally posted to. Used in networking.
- msgid
- Along with origbbs and origclub, this field forms a unique identifier for this message. This is used (unsurprisingly) to make sure that networked messages don't get exchanged if a system already has them.
- replyto
- A tentative reference to the number of the message this message replies to. Set to zero if this is an original message. Do not use this! It's a fallback field used in networking. The history field contains the full reference to the original message.