SMTP-Client: add the stati of all delivery attempts to the status messages.
[citadel.git] / citadel / modules / smtp / smtpqueue.h
index 288e8b2e9b97bd5d0d5c3b54a2d7cb0a48061653..2bd4c2700f4921fbf3a61cb46c89386aee073f1e 100644 (file)
@@ -27,6 +27,7 @@ extern const unsigned short DefaultMXPort;
 typedef struct _mailq_entry {
        StrBuf *Recipient;
        StrBuf *StatusMessage;
+       StrBuf *AllStatusMessages;
        int Status;
        /**<
         * 0 = No delivery has yet been attempted
@@ -40,6 +41,8 @@ typedef struct _mailq_entry {
 
        int n;
        int Active;
+       int StillActive;
+       int nAttempt;
 }MailQEntry;
 
 typedef struct queueitem {
@@ -63,6 +66,7 @@ typedef struct queueitem {
        StrBuf *SenderRoom;
        ParsedURL *URL;
        ParsedURL *FallBackHost;
+       int HaveRelay;
 } OneQueItem;
 
 typedef void (*QItemHandler)(OneQueItem *Item, StrBuf *Line, const char **Pos);
@@ -75,8 +79,8 @@ int     DecreaseQReference(OneQueItem *MyQItem);
 void DecreaseShutdownDeliveries(OneQueItem *MyQItem);
 int GetShutdownDeliveries(OneQueItem *MyQItem);
 void    RemoveQItem(OneQueItem *MyQItem);
-int     CountActiveQueueEntries(OneQueItem *MyQItem);
+int     CountActiveQueueEntries(OneQueItem *MyQItem, int before);
 StrBuf *SerializeQueueItem(OneQueItem *MyQItem);
-void    smtpq_do_bounce(OneQueItem *MyQItem, StrBuf *OMsgTxt);
+void    smtpq_do_bounce(OneQueItem *MyQItem, StrBuf *OMsgTxt, ParsedURL *Relay);
 
 int CheckQEntryIsBounce(MailQEntry *ThisItem);