X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fsmtp%2Fsmtpqueue.h;fp=citadel%2Fmodules%2Fsmtp%2Fsmtpqueue.h;h=0000000000000000000000000000000000000000;hb=da0b049809b9ad1459a4ac0467e79bfb5c5d2719;hp=2bd4c2700f4921fbf3a61cb46c89386aee073f1e;hpb=3cfd3d25e0b77093cc49277929e795efe9593f7f;p=citadel.git diff --git a/citadel/modules/smtp/smtpqueue.h b/citadel/modules/smtp/smtpqueue.h deleted file mode 100644 index 2bd4c2700..000000000 --- a/citadel/modules/smtp/smtpqueue.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 1998-2012 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/*****************************************************************************/ -/* SMTP CLIENT (Queue Management) STUFF */ -/*****************************************************************************/ - -#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 - * 2 = Delivery was successful - * 3 = Transient error like connection problem. Try next remote if available. - * 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; - int StillActive; - int nAttempt; -}MailQEntry; - -typedef struct queueitem { - long SendBounceMail; - long MessageID; - long QueMsgID; - long Submitted; - int FailNow; - HashList *MailQEntries; -/* copy of the currently parsed item in the MailQEntries list; - * if null add a new one. - */ - MailQEntry *Current; - time_t ReattemptWhen; - 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 before); -StrBuf *SerializeQueueItem(OneQueItem *MyQItem); -void smtpq_do_bounce(OneQueItem *MyQItem, StrBuf *OMsgTxt, ParsedURL *Relay); - -int CheckQEntryIsBounce(MailQEntry *ThisItem);