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