Core Utility Help

mail-resolution

Resolving Mail Forwarding & Notification

----------------------------------------

For each recipient of a given mail message, the following two verbs are called to determine where the message should actually go and who should be notified about it:

:mail_forward([from])

should return either

. a list of objects (either players or $mail_recipients)

to which mail for this recipient will be redirected.

. a string error message to be printed to the player sending the message.

If this recipient is one of the original destinations (i.e., not the

result of a previous forwarding), no mail is actually sent.

If :mail_forward returns a nonempty list, the recipient itself will *not*

actually receive the mail message unless it is included in the list.

#-1 is allowed to be on the list; it is ignored but does make the list

nonempty. Thus, having :mail_forward() return {#-1} is the canonical way

to have arriving mail disappear without being kept or forwarded.

:mail_notify([from])

should return a list of objects that are to be told about any mail sent

to this recipient (whether or not the recipient actually receives it).

Said objects must have a :notify_mail verb, but other from that, there

is no restriction on what these can be.

object:notify_mail is called with the arguments

(sender,recipients,msgnumbers) where

recipients == list of recipients including object in .mail_notify

msgsnumbers == corresponding list of :receive_message return values

(or 0 if :receive_message is not actually called, which

will be the case if the recipient forwards without keeping)

When called as part of a mail send, the `from' argument is the immediate predecessor on the forwarding chain. The default versions of these verbs return the values of .mail_forward and .mail_notify respectively (pronoun_subbing if the value is a string), unless this is a moderated mailing list and `from' is an unapproved sender (see `help MR-access') in which case the following verbs are called instead:

:moderator_forward(from)

what :mail_forward should return for mail coming from unapproved senders

This returns .moderator_forward (pronoun_subbed if a string) by default.

:moderator_notify(from)

what :mail_notify should return for mail coming from unapproved senders

This returns .moderator_notify (pronoun_subbed if a string) by default.

Since the :mail_forward verbs only see the previous sender in the forwarding chain, if, e.g, B is moderated but A can send to B (i.e., B:mail_forward(A) returns an actual list), then any mail sent to A goes to B even if the original sender isn't normally allowed to send to B directly.

These verbs should all allow `from' to be omitted in which case they should return as if `from' were a generic approved sender (e.g., wizard).

It should rarely be necessary to actually modify any of :*_forward/*_notify verbs, since one has a fair amount of control over their behavior via the following properties

.mail_forward

.mail_notify

.moderated (see `help MR-access')

.moderator_forward

.moderator_notify