1 /* BEGIN INCLUDE FILE ... mlsys_deliver_info.incl.pl1 */
  2 /* Created:  June 1983 by G. Palter */
  3 
  4 /* Options for the mail_system_$deliver_message and mail_system_$redistribute_message entrypoints */
  5 
  6 dcl  1 deliver_options aligned based (deliver_options_ptr),
  7        2 version character (8) unaligned,
  8        2 delivery_mode fixed binary,                        /* deliver as an ordinary/interactive/express message */
  9        2 queueing_mode fixed binary,                        /* when to queue the message */
 10        2 queued_notification_mode fixed binary,             /* when to notify sender about queued mail success/failure */
 11        2 flags,
 12          3 abort bit (1) unaligned,                         /* ON => don't send it if any fatal errors are detected */
 13          3 send_if_empty bit (1) unaligned,                 /* ON => send the message even if its body is empty */
 14          3 recipient_notification bit (1) unaligned,        /* ON => send "You have mail." notification */
 15          3 acknowledge bit (1) unaligned,                   /* ON => request ACK message when recipients read it */
 16          3 queue_mailing_lists bit (1) unaligned,           /* ON => always queue the message for mailing lists */
 17          3 mbz bit (31) unaligned;                          /* must be set to ""b by the caller */
 18 
 19 dcl  DELIVER_OPTIONS_VERSION_2 character (8) static options (constant) initial ("mlsdlo02");
 20 
 21 dcl  deliver_options_ptr pointer;
 22 
 23 /* Defined modes of delivery */
 24 
 25 dcl  (ORDINARY_DELIVERY                 initial (1),        /* send as an ordinary message */
 26       INTERACTIVE_DELIVERY              initial (2),        /* send as an interactive message */
 27       EXPRESS_DELIVERY                  initial (3))        /* send as an express interactive message; ie: deliver the
 28                                                                message only if the user is logged in */
 29           fixed binary static options (constant);
 30 
 31 /* Defined modes for queuing mail on transient errors */
 32 
 33 dcl  (NEVER_QUEUE                       initial (1),        /* never queue: convert into a fatal error */
 34       QUEUE_FOREIGN_WHEN_NEEDED         initial (2),        /* never queue local mail; queue foreign mail on error */
 35       QUEUE_WHEN_NEEDED                 initial (3),        /* queue all mail on any transient error */
 36       ALWAYS_QUEUE_FOREIGN              initial (4),        /* queue local mail on error; always queue foreign mail */
 37       ALWAYS_QUEUE                      initial (5))        /* always queue all mail */
 38           fixed binary static options (constant);
 39 
 40 /* Defined modes of notification of success/failure to deliver queued mail */
 41 
 42 dcl  (NEVER_NOTIFY                      initial (1),        /* never notify the sender */
 43       NOTIFY_ON_ERROR                   initial (2),        /* notify the sender only if it can not be delivered */
 44       ALWAYS_NOTIFY                     initial (3))        /* always notify the sender */
 45           fixed binary static options (constant);
 46 %page;
 47 /* Definition of the recipients of a message and the results of the attempted transmission */
 48 
 49 dcl  1 recipients_info aligned based (recipients_info_ptr),
 50        2 header,
 51          3 version character (8) unaligned,
 52          3 area_ptr pointer,                                /* -> area for following structures; null => system free */
 53          3 expanded_recipients_result_list_ptr pointer,     /* set -> expanded_recipients_result_list (if any) */
 54          3 n_recipients fixed binary,                       /* set to total # of recipients after expanding lists */
 55          3 n_unique_recipients fixed binary,                /* set to total # of unique recipients */
 56          3 n_failed_recipients fixed binary,                /* set to # of recipients that failed or would fail */
 57          3 n_lists fixed binary,                            /* # of address lists of recipients */
 58        2 lists (recipients_info_n_lists refer (recipients_info.n_lists)),
 59          3 address_list_ptr pointer,                        /* -> an address list containing recipients */
 60          3 recipients_result_list_ptr pointer;              /* set -> recipients_result_list for this address list */
 61 
 62 dcl  RECIPIENTS_INFO_VERSION_2 character (8) static options (constant) initial ("mlsrcpt2");
 63 
 64 dcl  (recipients_info_ptr, recipients_result_list_ptr, expanded_recipients_result_list_ptr) pointer;
 65 
 66 dcl  (recipients_info_n_lists, recipients_result_list_n_addresses, expanded_recipients_result_list_n_entries)
 67           fixed binary;                                     /* used to allocate these structures */
 68 
 69 
 70 /* Data structure returned by the mail system recording the results of the mailing for one of the input address lists */
 71 
 72 dcl  1 recipients_result_list aligned based (recipients_result_list_ptr),
 73        2 n_addresses fixed binary,                          /* set to # of address in corresponding address list */
 74        2 pad bit (36),
 75        2 results (recipients_result_list_n_addresses refer (recipients_result_list.n_addresses)),
 76          3 code fixed binary (35),                          /* set to describe results of attempted delivery */
 77          3 expanded_list_info,                              /* set to identify any failing addresses found in the
 78                                                                expansion of this address ... */
 79            4 first_entry_idx fixed binary (18) unaligned unsigned,
 80                                                             /* ... index of first such address in structure below ... */
 81            4 n_entries fixed binary (18) unaligned unsigned,/* ... # of such addresses there for this address */
 82          3 duplicate_info,                                  /* set to identify the prior address (if any) for which this
 83                                                                is a duplicate ... */
 84            4 list_idx fixed binary (18) unaligned unsigned, /* ... in which list ... */
 85            4 address_idx fixed binary (18) unaligned unsigned,   /* ... and which address in that list */
 86          3 explanation character (128) varying;             /* explanation associated with a fatal error or the message
 87                                                                being queued due to a transient error */
 88 
 89 
 90 /* Describes fatal or transient errors for those recipients which are part of mailing lists of named groups in one of the
 91    caller's address lists */
 92 
 93 dcl  1 expanded_recipients_result_list aligned based (expanded_recipients_result_list_ptr),
 94        2 n_entries fixed binary,                            /* set to # of failing expanded recipients */
 95        2 pad bit (36),
 96        2 entries (expanded_recipients_result_list_n_entries refer (expanded_recipients_result_list.n_entries)),
 97          3 address_ptr pointer,                             /* -> the failing address from the list/group */
 98          3 code fixed binary (35),                          /* set to describe why delivery failed */
 99          3 parent_address,                                  /* set to identify the original recipient of whose expansion
100                                                                this address is a part ... */
101            4 list_idx fixed binary (18) unaligned unsigned, /* ... in which list ... */
102            4 address_idx fixed binary (18) unaligned unsigned,   /* ... and which address in that list */
103          3 explanation character (128) varying;             /* explanation associated with a fatal error or the message
104                                                                being queued due to a transient error */
105 
106 /* END INCLUDE FILE ... mlsys_deliver_info.incl.pl1 */