X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fsmtp%2Fsmtpqueue.h;h=2bd4c2700f4921fbf3a61cb46c89386aee073f1e;hb=9e07e8e851dcb5758feacb349cbb94b15799d632;hp=1b834f9b122a896842501aa78300870b90d7dd16;hpb=9167a0462f67a85ecfb6c46fb96d765e2f2f0b02;p=citadel.git diff --git a/citadel/modules/smtp/smtpqueue.h b/citadel/modules/smtp/smtpqueue.h index 1b834f9b1..2bd4c2700 100644 --- a/citadel/modules/smtp/smtpqueue.h +++ b/citadel/modules/smtp/smtpqueue.h @@ -22,10 +22,12 @@ /*****************************************************************************/ #define MaxAttempts 15 +extern const unsigned short DefaultMXPort; typedef struct _mailq_entry { StrBuf *Recipient; StrBuf *StatusMessage; + StrBuf *AllStatusMessages; int Status; /**< * 0 = No delivery has yet been attempted @@ -39,9 +41,12 @@ typedef struct _mailq_entry { int n; int Active; + int StillActive; + int nAttempt; }MailQEntry; typedef struct queueitem { + long SendBounceMail; long MessageID; long QueMsgID; long Submitted; @@ -55,17 +60,27 @@ typedef struct queueitem { time_t Retry; long ActiveDeliveries; + long NotYetShutdownDeliveries; StrBuf *EnvelopeFrom; StrBuf *BounceTo; StrBuf *SenderRoom; ParsedURL *URL; ParsedURL *FallBackHost; + int HaveRelay; } OneQueItem; typedef void (*QItemHandler)(OneQueItem *Item, StrBuf *Line, const char **Pos); + +typedef struct __QItemHandlerStruct { + QItemHandler H; +} QItemHandlerStruct; 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);