* Stuff
authorArt Cancro <ajc@citadel.org>
Mon, 24 Jan 2000 04:52:26 +0000 (04:52 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 24 Jan 2000 04:52:26 +0000 (04:52 +0000)
citadel/msgbase.c
citadel/serv_smtp.c
citadel/sysconfig.h
citadel/sysdep.c

index 755743d19313e7a25af36fb95cce813317281754..dca9cbb0cd10282829d7322112a218c7bb70641f 100644 (file)
@@ -289,7 +289,9 @@ void CtdlForEachMessage(int mode, long ref,
                if (content_type != NULL)
                        if (strlen(content_type) > 0)
                                for (a = 0; a < num_msgs; ++a) {
+                                       lprintf(9, "Trying %ld\n", msglist[a]);
                                        GetSuppMsgInfo(&smi, msglist[a]);
+                                       lprintf(9, "ct is %s\n", smi.smi_content_type);
                                        if (strcasecmp(smi.smi_content_type, content_type)) {
                                                msglist[a] = 0L;
                                        }
@@ -1533,7 +1535,6 @@ long CtdlSaveMsg(struct CtdlMessage *msg, /* message to save */
        static int seqnum = 1;
        struct CtdlMessage *imsg;
        char *instr;
-       long imsgid;
 
        lprintf(9, "CtdlSaveMsg() called\n");
        if (is_valid_message(msg) == 0) return(-1);     /* self check */
@@ -1728,13 +1729,9 @@ long CtdlSaveMsg(struct CtdlMessage *msg,        /* message to save */
                imsg->cm_magic = CTDLMESSAGE_MAGIC;
                imsg->cm_anon_type = MES_NORMAL;
                imsg->cm_format_type = FMT_RFC822;
+               imsg->cm_fields['A'] = strdoop("Citadel");
                imsg->cm_fields['M'] = instr;
-               imsgid = send_message(imsg, 1, NULL);
-               if (imsgid >= 0L) {
-                       CtdlSaveMsgPointerInRoom(SMTP_SPOOLOUT_ROOM,
-                                               imsgid,
-                                               SM_DONT_BUMP_REF);
-               }
+               CtdlSaveMsg(imsg, "", SMTP_SPOOLOUT_ROOM, MES_LOCAL, 1);
                CtdlFreeMessage(imsg);
        }
 
index 4c694c342b534ed86c117365256898483682ebdc..cffda13022c518dba91f1c04a0374ee94105509d 100644 (file)
@@ -810,6 +810,11 @@ void smtp_do_queue(void) {
 }
 
 
+/**** FIX  temporary hack to run the queue *****/
+void cmd_qqqq(char *argbuf) {
+       smtp_do_queue();
+       cprintf("%d ok\n", OK);
+}
 
 
 
@@ -825,6 +830,10 @@ char *Dynamic_Module_Init(void)
        CtdlRegisterServiceHook(SMTP_PORT,
                                smtp_greeting,
                                smtp_command_loop);
+
+       /****  FIX ... temporary hack to run the queue ******/
+       CtdlRegisterProtoHook(cmd_qqqq, "QQQQ", "run the queue");  
+
        create_room(SMTP_SPOOLOUT_ROOM, 3, "", 0);
        return "$Id$";
 }
index 198f7e557144b00ffd2536dd8a8d17742de1fcee..3ce4597f87e514ffb5fca948d6931d33a2f09ebd 100644 (file)
@@ -83,8 +83,8 @@
  * These define what port to listen on for various services.
  * FIX ... put this in a programmable config somewhere
  */
-#define POP3_PORT              110
-#define SMTP_PORT              25
+#define POP3_PORT              1110
+#define SMTP_PORT              2525
 
 
 /*
index 6bde9f3961d93b173dd2d96490dd4630a8f9f4a8..35a3d8f43797bd95671f9b60d92fa0a075efa258 100644 (file)
@@ -285,16 +285,7 @@ int ig_tcp_server(int port_number, int queue_len)
 
        if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
                lprintf(1, "citserver: Can't bind: %s\n", strerror(errno));
-               sin.sin_port = 0;
-               if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
-                       lprintf(1, "citserver: Can't bind: %s\n",
-                               strerror(errno));
-                       return(-1);
-               }
-               else {
-                       lprintf(1, "bind to alternate port %d ok\n",
-                               htons(sin.sin_port) );
-               }
+               return(-1);
        }
 
        if (listen(s, queue_len) < 0) {