Honor retry time
authorArt Cancro <ajc@citadel.org>
Fri, 7 Apr 2017 18:41:15 +0000 (14:41 -0400)
committerArt Cancro <ajc@citadel.org>
Fri, 7 Apr 2017 18:41:15 +0000 (14:41 -0400)
citadel/citadel.h
citadel/configure.ac
citadel/modules/smtp/serv_smtpclient.c

index 3c5eb47fa600e91ada9292218170112a04bc0b7e..e7eca47287f95f33fd834f5ff42b9f450b959284 100644 (file)
@@ -45,13 +45,13 @@ extern "C" {
  * usually more strict because you're not really supposed to dump/load and
  * upgrade at the same time.
  */
-#define REV_LEVEL      908             /* This version */
-#define REV_MIN                591             /* Oldest compatible database */
-#define EXPORT_REV_MIN 760             /* Oldest compatible export files */
-#define LIBCITADEL_MIN 903             /* Minimum required version of libcitadel */
+#define REV_LEVEL      909             // This version
+#define REV_MIN                591             // Oldest compatible database
+#define EXPORT_REV_MIN 760             // Oldest compatible export files
+#define LIBCITADEL_MIN 903             // Minimum required version of libcitadel
 
-#define SERVER_TYPE 0                  /* zero for stock Citadel; other developers please
-                                          obtain SERVER_TYPE codes for your implementations */
+#define SERVER_TYPE 0                  // zero for stock Citadel; other developers please
+                                       // obtain SERVER_TYPE codes for your implementations
 
 #ifdef LIBCITADEL_VERSION_NUMBER
 #if LIBCITADEL_VERSION_NUMBER < LIBCITADEL_MIN
index 497ce907aa031f3b5df9be3a46ac044e9c734806..eb757b2753acadbce1a8e48c28b5a91bf7b1b05f 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
-AC_INIT([Citadel], [908], [http://www.citadel.org/])
+AC_INIT([Citadel], [909], [http://www.citadel.org/])
 AC_REVISION([$Revision: 5108 $])
 AC_CONFIG_SRCDIR([citserver.c])
 AC_CONFIG_HEADER(sysdep.h)
index bfe665984698ee69922f2843b03779ad30924c28..6889b02f5f348ec1e9445641f763491bf17ac235 100644 (file)
@@ -238,6 +238,7 @@ int smtp_attempt_delivery(long msgid, char *recp, char *envelope_from)
                        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L);                                           // Time out after 20 seconds
                        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
                        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+                       // curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_error_buffer);
 
                        strcpy(try_this_mx, "smtp://");
                        extract_token(&try_this_mx[7], mxes, i, '|', (sizeof try_this_mx - 7));
@@ -288,11 +289,9 @@ void smtp_process_one_msg(long qmsgnum)
        long deletes[2];
        int delete_this_queue = 0;
 
-       syslog(LOG_DEBUG, "smtpclient: processing queue entry %ld", qmsgnum);
-
        msg = CtdlFetchMessage(qmsgnum, 1, 1);
        if (msg == NULL) {
-               syslog(LOG_WARNING, "smtpclient: queue message %ld does not exist", qmsgnum);
+               syslog(LOG_WARNING, "smtpclient: %ld does not exist", qmsgnum);
                return;
        }
 
@@ -328,7 +327,7 @@ void smtp_process_one_msg(long qmsgnum)
                if (!strncasecmp(cfgline, HKEY("envelope_from|")))      envelope_from = strdup(&cfgline[14]);
        }
 
-       int should_try_now = 1;
+       int should_try_now = 0;
        if (attempted < submitted) {                            // If no attempts have been made yet, try now
                should_try_now = 1;
        }
@@ -344,7 +343,7 @@ void smtp_process_one_msg(long qmsgnum)
        }
 
        if (should_try_now) {
-               syslog(LOG_DEBUG, "smtpclient: attempting delivery now");
+               syslog(LOG_DEBUG, "smtpclient: %ld attempting delivery now", qmsgnum);
                StrBuf *NewInstr = NewStrBuf();
                StrBufAppendPrintf(NewInstr, "Content-type: "SPOOLMIME"\n\n");
                StrBufAppendPrintf(NewInstr, "msgid|%ld\n", msgid);
@@ -414,7 +413,7 @@ void smtp_process_one_msg(long qmsgnum)
                }
        
                if (delete_this_queue) {
-                       syslog(LOG_DEBUG, "smtpclient: deleting this queue entry");
+                       syslog(LOG_DEBUG, "smtpclient: %ld deleting", qmsgnum);
                        deletes[0] = qmsgnum;
                        deletes[1] = msgid;
                        CtdlDeleteMessages(SMTP_SPOOLOUT_ROOM, deletes, 2, "");
@@ -422,7 +421,7 @@ void smtp_process_one_msg(long qmsgnum)
                }
                else {
                        // replace the old queue entry with the new one
-                       syslog(LOG_DEBUG, "smtpclient: rewriting this queue entry");
+                       syslog(LOG_DEBUG, "smtpclient: %ld rewriting", qmsgnum);
                        msg = convert_internet_message_buf(&NewInstr);                  // This function will free NewInstr for us
                        CtdlSubmitMsg(msg, NULL, SMTP_SPOOLOUT_ROOM, 0);
                        CM_Free(msg);
@@ -430,7 +429,7 @@ void smtp_process_one_msg(long qmsgnum)
                }
        }
        else {
-               syslog(LOG_DEBUG, "smtpclient: retry time not reached");
+               syslog(LOG_DEBUG, "smtpclient: %ld retry time not reached", qmsgnum);
        }
 
        if (bounceto != NULL)           free(bounceto);