1 /*****************************************************************************/
2 /* SMTP CLIENT (Queue Management) STUFF */
3 /*****************************************************************************/
5 typedef struct ParsedURL ParsedURL;
12 const char *LocalPart;
22 #define MaxAttempts 15
23 typedef struct _delivery_attempt {
28 typedef struct _mailq_entry {
29 DeliveryAttempt Attempts[MaxAttempts];
32 StrBuf *StatusMessage;
35 * 0 = No delivery has yet been attempted
36 * 2 = Delivery was successful
37 * 4 = A transient error was experienced ... try again later
38 * 5 = Delivery to this address failed permanently. The error message
39 * should be placed in the fourth field so that a bounce message may
47 typedef struct queueitem {
52 HashList *MailQEntries;
53 MailQEntry *Current; /* copy of the currently parsed item in the MailQEntries list; if null add a new one. */
54 DeliveryAttempt LastAttempt;
55 long ActiveDeliveries;
59 ParsedURL *FallBackHost;
61 typedef void (*QItemHandler)(OneQueItem *Item, StrBuf *Line, const char **Pos);
63 int DecreaseQReference(OneQueItem *MyQItem);
64 void RemoveQItem(OneQueItem *MyQItem);
65 int CountActiveQueueEntries(OneQueItem *MyQItem);
66 StrBuf *SerializeQueueItem(OneQueItem *MyQItem);
68 void smtpq_do_bounce(OneQueItem *MyQItem, StrBuf *OMsgTxt);