remove unused trace function
[citadel.git] / citadel / modules / smtp / serv_smtp.c
index 756116637a41fdc546810b98b1aafc05eb38ede3..c8cd7017328d3eb017cd52111f8b70441c8d1233 100644 (file)
@@ -20,7 +20,7 @@
  * The VRFY and EXPN commands have been removed from this implementation
  * because nobody uses these commands anymore, except for spammers.
  *
- * Copyright (c) 1998-2015 by the citadel.org team
+ * Copyright (c) 1998-2018 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.
@@ -81,6 +81,7 @@
 #include "ctdl_module.h"
 
 #include "smtp_util.h"
+
 enum {                         /* Command states for login authentication */
        smtp_command,
        smtp_user,
@@ -115,7 +116,9 @@ void registerSmtpCMD(const char *First, long FLen,
        smtp_handler_hook *h;
 
        if (FLen >= MaxSMTPCmdLen)
-               cit_panic_backtrace (0);
+       {
+               abort();
+       }
 
        h = (smtp_handler_hook*) malloc(sizeof(smtp_handler_hook));
        memset(h, 0, sizeof(smtp_handler_hook));
@@ -125,6 +128,7 @@ void registerSmtpCMD(const char *First, long FLen,
        Put(SMTPCmds, First, FLen, h, NULL);
 }
 
+
 void smtp_cleanup(void)
 {
        DeleteHash(&SMTPCmds);
@@ -157,7 +161,7 @@ void smtp_greeting(int is_msa)
         * addresses immediately instead of after they execute a RCPT
         */
        if ( (CtdlGetConfigInt("c_rbl_at_greeting")) && (sSMTP->is_msa == 0) ) {
-               if (rbl_check(message_to_spammer)) {
+               if (rbl_check(CC->cs_addr, message_to_spammer)) {
                        if (server_shutting_down)
                                cprintf("421 %s\r\n", message_to_spammer);
                        else
@@ -737,7 +741,7 @@ void smtp_rcpt(long offset, long flags)
        if ( (!CCC->logged_in)  /* Don't RBL authenticated users */
           && (!sSMTP->is_lmtp) ) {     /* Don't RBL LMTP clients */
                if (CtdlGetConfigInt("c_rbl_at_greeting") == 0) {       /* Don't RBL again if we already did it */
-                       if (rbl_check(message_to_spammer)) {
+                       if (rbl_check(CC->cs_addr, message_to_spammer)) {
                                if (server_shutting_down)
                                        cprintf("421 %s\r\n", message_to_spammer);
                                else
@@ -847,7 +851,7 @@ void smtp_data(long offset, long flags)
                                nowstamp);
                }
        }
-       body = CtdlReadMessageBodyBuf(HKEY("."), CtdlGetConfigLong("c_maxmsglen"), defbody, 1, NULL);
+       body = CtdlReadMessageBodyBuf(HKEY("."), CtdlGetConfigLong("c_maxmsglen"), defbody, 1);
        FreeStrBuf(&defbody);
        if (body == NULL) {
                cprintf("550 Unable to save message: internal error.\r\n");
@@ -896,7 +900,6 @@ void smtp_data(long offset, long flags)
                        return;
                }
 
-               CM_SetField(msg, eNodeName, CtdlGetConfigStr("c_nodename"), strlen(CtdlGetConfigStr("c_nodename")));
                CM_SetField(msg, eHumanNode, CtdlGetConfigStr("c_humannode"), strlen(CtdlGetConfigStr("c_humannode")));
                CM_SetField(msg, eOriginalRoom, HKEY(MAILROOM));
                if (sSMTP->preferred_sender_name != NULL)
@@ -1021,7 +1024,7 @@ void smtp_command_loop(void)
 
        if (sSMTP == NULL) {
                syslog(LOG_EMERG, "Session SMTP data is null.  WTF?  We will crash now.");
-               return cit_panic_backtrace (0);
+               abort();
        }
 
        time(&CCC->lastcmd);