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