]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/smtp_util.c
Removed the register/callback stuff from serv_smtp.c , it added more complexity than...
[citadel.git] / citadel / modules / smtp / smtp_util.c
index 01b3bed3557e6d3d342d224dc0e595cf8694e51c..440084454d9e779ba947b3883bfadfb19e354be0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Utility functions for the Citadel SMTP implementation
  *
- * Copyright (c) 1998-2018 by the citadel.org team
+ * Copyright (c) 1998-2020 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 version 3.
 #include <errno.h>
 #include <sys/types.h>
 #include <syslog.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
+#include <time.h>
 #include <sys/wait.h>
 #include <ctype.h>
 #include <string.h>
@@ -63,7 +52,7 @@
 
 const char *smtp_get_Recipients(void)
 {
-       citsmtp *sSMTP = SMTP;
+       struct citsmtp *sSMTP = SMTP;
 
        if (sSMTP == NULL)
                return NULL;
@@ -95,7 +84,7 @@ void smtp_do_bounce(const char *instr, int is_final)
        int num_bounces = 0;
        int bounce_this = 0;
        struct CtdlMessage *bmsg = NULL;
-       recptypes *valid;
+       struct recptypes *valid;
        int successful_bounce = 0;
        static int seq = 0;
        StrBuf *BounceMB;
@@ -247,14 +236,14 @@ void smtp_do_bounce(const char *instr, int is_final)
                valid = validate_recipients(bounceto, smtp_get_Recipients (), 0);
                if (valid != NULL) {
                        if (valid->num_error == 0) {
-                               CtdlSubmitMsg(bmsg, valid, "", QP_EADDR);
+                               CtdlSubmitMsg(bmsg, valid, "");
                                successful_bounce = 1;
                        }
                }
 
                /* If not, post it in the Aide> room */
                if (successful_bounce == 0) {
-                       CtdlSubmitMsg(bmsg, NULL, CtdlGetConfigStr("c_aideroom"), QP_EADDR);
+                       CtdlSubmitMsg(bmsg, NULL, CtdlGetConfigStr("c_aideroom"));
                }
 
                /* Free up the memory we used */