$Log$
+ Revision 571.6 2000/05/15 00:05:19 ajc
+ * Double the retry interval for SMTP deliveries after each failed attempt.
+
Revision 571.5 2000/05/11 03:08:47 ajc
* serv_smtp.c: clear the relevant state buffers after an SMTP DATA command
completes, allowing multiple messages in one session. Closes bug #58.
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
-
int incomplete_deliveries_remaining;
time_t attempted = 0L;
time_t last_attempted = 0L;
+ time_t retry = SMTP_RETRY_INTERVAL;
msg = CtdlFetchMessage(msgnum);
if (msg == NULL) {
if (!strcasecmp(key, "msgid")) {
text_msgid = extract_long(buf, 1);
}
+ if (!strcasecmp(key, "retry")) {
+ /* double the retry interval after each attempt */
+ retry = extract_long(buf, 1) * 2L;
+ remove_token(instr, i, '\n');
+ }
if (!strcasecmp(key, "attempted")) {
attempted = extract_long(buf, 1);
if (attempted > last_attempted)
/*
* Postpone delivery if we've already tried recently.
*/
- if ( (time(NULL) - last_attempted) < SMTP_RETRY_INTERVAL) {
+ if ( (time(NULL) - last_attempted) < retry) {
lprintf(7, "Retry time not yet reached.\n");
phree(instr);
return;
msg->cm_fields['M'] = malloc(strlen(instr)+256);
snprintf(msg->cm_fields['M'],
strlen(instr)+256,
- "Content-type: %s\n\n%s\nattempted|%ld\n",
- SPOOLMIME, instr, time(NULL) );
+ "Content-type: %s\n\n%s\n"
+ "attempted|%ld\n"
+ "retry|%ld\n",
+ SPOOLMIME, instr, time(NULL), retry );
phree(instr);
CtdlSaveMsg(msg, "", SMTP_SPOOLOUT_ROOM, MES_LOCAL);
CtdlFreeMessage(msg);
attempt.
+ INSTRUCTION: retry
+ SYNTAX: retry|9999999
+ DESCRIPTION:
+ Citadel does not retry SMTP delivery at a fixed interval. Instead, it
+starts at a nominal interval (15 minutes by default) and then doubles the
+interval after each failed attempt. This instruction contains the interval
+which should currently be followed (and doubled again, if the next delivery
+fails).
+
+
INSTRUCTION: bounceto
SYNTAX: bounceto|Big Bad Sender[@host]
DESCRIPTION: