1 /*****************************************************************************/
2 /* SMTP CLIENT (Queue Management) STUFF */
3 /*****************************************************************************/
6 typedef struct _delivery_attempt {
11 typedef struct _mailq_entry {
12 DeliveryAttempt Attempts[MaxAttempts];
15 StrBuf *StatusMessage;
18 * 0 = No delivery has yet been attempted
19 * 2 = Delivery was successful
20 * 4 = A transient error was experienced ... try again later
21 * 5 = Delivery to this address failed permanently. The error message
22 * should be placed in the fourth field so that a bounce message may
30 typedef struct queueitem {
35 HashList *MailQEntries;
36 MailQEntry *Current; /* copy of the currently parsed item in the MailQEntries list; if null add a new one. */
37 DeliveryAttempt LastAttempt;
38 long ActiveDeliveries;
42 typedef void (*QItemHandler)(OneQueItem *Item, StrBuf *Line, const char **Pos);
44 int DecreaseQReference(OneQueItem *MyQItem);
45 void RemoveQItem(OneQueItem *MyQItem);
46 int CountActiveQueueEntries(OneQueItem *MyQItem);
47 StrBuf *SerializeQueueItem(OneQueItem *MyQItem);
49 void smtpq_do_bounce(OneQueItem *MyQItem, StrBuf *OMsgTxt);