* serv_smtp.c: instead of doubling delivery retry times unbounded, set a
authorArt Cancro <ajc@citadel.org>
Sun, 16 Sep 2001 05:44:52 +0000 (05:44 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 16 Sep 2001 05:44:52 +0000 (05:44 +0000)
  maximum retry time of SMTP_RETRY_MAX (currently set to 12 hours)

citadel/ChangeLog
citadel/serv_smtp.c
citadel/sysconfig.h

index 329542eac6b742cfafe4e142ad5dd38a279bf47d..663d75a1cfb756ba6837e55c7ddace04d86da3fa 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 580.42  2001/09/16 05:44:51  ajc
+ * serv_smtp.c: instead of doubling delivery retry times unbounded, set a
+   maximum retry time of SMTP_RETRY_MAX (currently set to 12 hours)
+
  Revision 580.41  2001/09/09 16:19:29  error
  * Updated PAM configuration file citadel.pam for Red Hat 7.x.
 
@@ -2741,3 +2745,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index f10de741f2190dc18be17d15e1433f16e6b2d5c0..7cd291824dcf4fd63dd988b5d2bb7aa47cfa6e6f 100644 (file)
@@ -1314,6 +1314,9 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
                if (!strcasecmp(key, "retry")) {
                        /* double the retry interval after each attempt */
                        retry = extract_long(buf, 1) * 2L;
+                       if (retry > SMTP_RETRY_MAX) {
+                               retry = SMTP_RETRY_MAX;
+                       }
                        remove_token(instr, i, '\n');
                }
                if (!strcasecmp(key, "attempted")) {
index 745f9ca7ef8e9e4214edc0cf649104fbb5d85276..312b1f93abce6ab1ae520c8e6b3890acf2203960 100644 (file)
 #define SIZ            4096
 
 /*
- * SMTP delivery retry and give-up times
+ * SMTP delivery retry rules (all values are in seconds)
+ *
+ * If delivery of a message via SMTP is unsuccessful, Citadel will try again
+ * after SMTP_RETRY_INTERVAL seconds.  This interval will double after each
+ * unsuccessful delivery, up to a maximum of SMTP_RETRY_MAX seconds.  If no
+ * successful delivery has been accomplished after SMTP_GIVE_UP seconds, the
+ * message will be returned to its sender.
  */
-#define        SMTP_RETRY_INTERVAL     900     /* retry sends every 15 minutes */
-#define SMTP_GIVE_UP           432000  /* give up after 5 days */
+#define        SMTP_RETRY_INTERVAL     900     /* 15 minutes */
+#define SMTP_RETRY_MAX         43200   /* 12 hours */
+#define SMTP_GIVE_UP           432000  /* 5 days */
 
 /*
  * How often to run the networker