In file mail.h:

struct message

An email or club message.

[more]char from[80]
User ID or RFC-822 address of message sender
[more]char to[80]
User ID or RFC-822 address of message recipient
[more]char subject[64]
Message subject
[more]char history[80]
History of message
[more]char fatt[16]
Name of attached file (if any)
[more]uint32 msgno
Message number
[more]uint32 flags
Message flags (MSF_x)
[more]uint32 crdate
Creation date
[more]uint32 crtime
Creation time
[more]uint32 replies
Number of replies to this message
[more]uint32 timesread
Times this message was read
[more]uint32 timesdnl
Times the attached file was downloaded
[more]uint32 period
Resurfacing period
[more]uint32 cryptkey
Key for weak private mail cryptography
[more]char club[16]
Club this message was posted to
[more]char origbbs[12]
Original BBS message was posted to
[more]uint32 magic
Magic number (MESSAGE_MAGIC)
[more]char spare[16]
A little of spare space
[more]char origclub[16]
Original remote BBS club message was posted to
[more]char msgid[32]
Message ID (for networking)
[more]uint32 replyto
Reference to a message that this one replies to


Documentation

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.

  • ochar from[80]
    User ID or RFC-822 address of message sender

    ochar to[80]
    User ID or RFC-822 address of message recipient

    ochar subject[64]
    Message subject

    ochar history[80]
    History of message

    ochar fatt[16]
    Name of attached file (if any)

    ouint32 msgno
    Message number

    ouint32 flags
    Message flags (MSF_x)

    ouint32 crdate
    Creation date

    ouint32 crtime
    Creation time

    ouint32 replies
    Number of replies to this message

    ouint32 timesread
    Times this message was read

    ouint32 timesdnl
    Times the attached file was downloaded

    ouint32 period
    Resurfacing period

    ouint32 cryptkey
    Key for weak private mail cryptography

    ochar club[16]
    Club this message was posted to

    ochar origbbs[12]
    Original BBS message was posted to

    ouint32 magic
    Magic number (MESSAGE_MAGIC)

    ochar spare[16]
    A little of spare space

    ochar origclub[16]
    Original remote BBS club message was posted to

    ochar msgid[32]
    Message ID (for networking)

    ouint32 replyto
    Reference to a message that this one replies to

    Deprecated:
    Use message_t, the typedef instead. It's more convenient.

    Alphabetic index



    This page was generated with the help of DOC++.