Libev / libc-ares Migration
[citadel.git] / citadel / modules / smtp / smtpqueue.h
index a7b97cd90f150404af6abe68636be69cbc353f41..023b479caf285c2c2d2f3796acc58c48675771ee 100644 (file)
@@ -14,6 +14,15 @@ typedef struct _mailq_entry {
        StrBuf *Recipient;
        StrBuf *StatusMessage;
        int Status;
+       /**<
+        * 0 = No delivery has yet been attempted
+        * 2 = Delivery was successful
+        * 4 = A transient error was experienced ... try again later
+        * 5 = Delivery to this address failed permanently.  The error message
+         *     should be placed in the fourth field so that a bounce message may
+        *     be generated.
+        */
+
        int n;
        int Active;
 }MailQEntry;
@@ -21,6 +30,7 @@ typedef struct _mailq_entry {
 typedef struct queueitem {
        long MessageID;
        long QueMsgID;
+       long Submitted;
        int FailNow;
        HashList *MailQEntries;
        MailQEntry *Current; /* copy of the currently parsed item in the MailQEntries list; if null add a new one. */
@@ -35,3 +45,5 @@ int DecreaseQReference(OneQueItem *MyQItem);
 void RemoveQItem(OneQueItem *MyQItem);
 int CountActiveQueueEntries(OneQueItem *MyQItem);
 StrBuf *SerializeQueueItem(OneQueItem *MyQItem);
+
+void smtpq_do_bounce(OneQueItem *MyQItem, StrBuf *OMsgTxt);