3 #ifndef _RECIPIENT_LIST_H_INCLUDED_
4 #define _RECIPIENT_LIST_H_INCLUDED_
10 /* recipient list structures
12 /* #include <recipient_list.h>
17 * Information about a recipient is kept in this structure. The file offset
18 * tells us the position of the REC_TYPE_RCPT byte in the message queue
19 * file, This byte is replaced by REC_TYPE_DONE when the delivery status to
20 * that recipient is established.
22 * Rather than bothering with subclasses that extend this structure with
23 * application-specific fields we just add them here.
25 typedef struct RECIPIENT
{
26 long offset
; /* REC_TYPE_RCPT byte */
27 const char *dsn_orcpt
; /* DSN original recipient */
28 int dsn_notify
; /* DSN notify flags */
29 const char *orig_addr
; /* null or original recipient */
30 const char *address
; /* complete address */
31 union { /* Application specific. */
32 int status
; /* SMTP client */
33 struct QMGR_QUEUE
*queue
; /* Queue manager */
34 const char *addr_type
; /* DSN */
38 #define RECIPIENT_ASSIGN(rcpt, offs, orcpt, notify, orig, addr) do { \
39 (rcpt)->offset = (offs); \
40 (rcpt)->dsn_orcpt = (orcpt); \
41 (rcpt)->dsn_notify = (notify); \
42 (rcpt)->orig_addr = (orig); \
43 (rcpt)->address = (addr); \
44 (rcpt)->u.status = (0); \
47 #define RECIPIENT_UPDATE(ptr, new) do { \
48 myfree((char *) (ptr)); (ptr) = mystrdup(new); \
51 typedef struct RECIPIENT_LIST
{
58 extern void recipient_list_init(RECIPIENT_LIST
*, int);
59 extern void recipient_list_add(RECIPIENT_LIST
*, long, const char *, int, const char *, const char *);
60 extern void recipient_list_swap(RECIPIENT_LIST
*, RECIPIENT_LIST
*);
61 extern void recipient_list_free(RECIPIENT_LIST
*);
63 #define RCPT_LIST_INIT_STATUS 1
64 #define RCPT_LIST_INIT_QUEUE 2
65 #define RCPT_LIST_INIT_ADDR 3
70 /* The Secure Mailer license must be distributed with this software.
73 /* IBM T.J. Watson Research
75 /* Yorktown Heights, NY 10598, USA