Ref: 17350002
Title: How 3+Mail sorts a Distribution List
date: 10/8/90

Copyright 3Com Corporation, 1991.  All rights reserved.

This article explains how to determine the order in which names in a 3+Mail
distribution list (on the message To: line) are sent.  The information
applies both to client-side menu-driven mail (MAIL.EXE) and command-line
mail (CMAIL.EXE).

3+ Mail is capable of generating and sending three different types of
information:  messages, attachments, and envelopes.  When 3+Mail sends an
e-mail message, an envelope packet is constructed for each destination Mail
Server, and contains the following information, in order of appearance:

  *  Network number, Ethernet address, well-known Mail socket 0463 and
     3-part name of destination Mail Server

  *  3-part name (sender's 'From:' name)

  *  Network number, Ethernet address, well-known Mail socket 0463 and
     3-part name of sender's Mail Server

  *  3-part name of each user on the destination Mail Server

There will be as many envelope packets as there are destination Mail
Servers.

To make up the envelope packets, 3+Mail groups the To: list recipients by
their assigned Mail Server.  Then the users are sorted alphabetically within
the groups, keying on the first name of each user.  Finally, the groups
themselves are sorted alphabetically, keying on the first name of the first
user within each group.  To show the sorting process, here is a sample e-mail
header:

     From: Bruno Itall:TSO:3Com
       To: John Peterson:FIN, Sue Dackman:MKT, Pam Johnson:DLAB,
           Zachary Talbot:QALAB, Jennifer Smith:FIN, Allen Jones:QALAB,
           Lloyd Shelty:DMA, Sharon Lord:IRQ
     Subj: Distribution of e-mail


The assignment of users to mail servers is as follows:

John Peterson:FIN       Mail Server 1:FIN
Sue Dackman:MKT         Marketing Mail Server:MKT
Pam Johnson:DLAB        Design Lab Mail Server:LABS
Zachary Talbot:QALAB    QA Mail Server:QA
Jennifer Smith:MKT      Marketing Mail Server:MKT
Allen Jones:QALAB       QA Mail Server:QA
Lloyd Shelty:DMA        Mail Server 3:DMA
Sharon Lord:IRQ         QA Mail Server:QA

3+Mail first groups the users to their respective Mail Servers.  In the
example, Zachary Talbot, Allen Jones:QALAB, and Sharon Lord:IRQ share the
same mail server, as do Sue Dackman:MKT and Jennifer Smith:MKT.  Thus, the
initial grouping is as follows:

John Peterson:FIN       Mail Server 1:FIN

Jennifer Smith:MKT      Marketing Mail Server:MKT
Sue Dackman:MKT

Pam Johnson:DLAB        Design Lab Mail Server:LABS

Allen Jones:QALAB       QA Mail Server:QA
Sharon Lord:IRQ
Zachary Talbot:QALAB

Lloyd Shelty:DMA        Mail Server 3:DMA


3+Mail then sorts the To: line distribution as follows:

Allen Jones:QALab
Sharon Lord:IRQ
Zachary Talbot:QALAB
Jennifer Smith:MKT
Sue Dackman:MKT
John Peterson:FIN
Lloyd Shelty:DMA
Pam Johnson:DLAB

The groups are sorted alphabetically, keying on the first name of the first
user within the group.  Within those Mail Server groups, the users
are sorted alphabetically.  This explains the apparent inconsistency of
having Sharon Lord's and Zachary Talbot's name sorted between Allen Jones
and Jennifer Smith.

From this distribution list, 3+Mail will send five envelope packets, in the
following order and including the following names in each packet:

QA Mail Server:QA            Allen Jones:QALAB
                             Sharon Lord:IRQ
                             Zachary Talbot:QALAB
Marketing Mail Server:MKT    Jennifer Smith
                             Sue Dackman:MKT
Mail Server 1:FIN            John Peterson:FIN
Mail Server 3:DMA            Lloyd Shelty:DMA
Design Lab Mail Server:LABS  Pam Jones:DLAB
