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