whittle whittle
authorArt Cancro <ajc@citadel.org>
Wed, 24 Jan 2018 16:20:00 +0000 (11:20 -0500)
committerArt Cancro <ajc@citadel.org>
Wed, 24 Jan 2018 16:20:00 +0000 (11:20 -0500)
citadel/citadel.h
citadel/docs/citadelapi.txt
citadel/docs/netconfigs.txt
citadel/internet_addressing.c
citadel/journaling.c
citadel/modules/vcard/serv_vcard.c
citadel/server.h

index fea62aaa2909207792589115f9f5f2c1a0bf3114..8c209787dd90a539a8bd6baac9de58a50c74d13a 100644 (file)
@@ -152,7 +152,6 @@ struct ctdlroom {
 #define MES_ERROR      (-1)            // Can't send message due to bad address
 #define MES_LOCAL      0               // Local message, do no network processing
 #define MES_INTERNET   1               // Convert msg and send as Internet mail
-#define MES_IGNET      2               // Process recipient and send via Cit net
 
 /****************************************************************************/
 
index 2bac15e62e414ea14664f03f8156ad928f88144a..6c983540ef947aa32cdf28e6aa0abae116a7daf2 100644 (file)
@@ -191,7 +191,7 @@ it is presented for reading.
 non zero for this event will prevent the message being saved to disk in the
 normal manner.
     EVT_AFTERSAVE    Called after the message is saved to disk but before
-any IGnet spooling is carried out.
+any network spooling is carried out.
     EVT_SMTPSCAN     Called during the SMTP reception of a message after the 
 message is received and before the response is sent to the sender. This is
 intended for spam filters and virus checkers. A positive return code will
index f120d48a6078769cd58a4bbec68d9db67151c18d..8eee888eb4d288baaa0971c1e11abb84f018c607 100644 (file)
@@ -1,5 +1,5 @@
  
-           Description of the files in the "netconfigs" directory
+           Description of "netconfigs" records
 
  These files contain a set of network configurations for a room.  They are
 stored in the directory $CTDLDIR/netconfigs and are named according to each
@@ -38,21 +38,6 @@ sent by the listserver.  The message will appear to be sent by the room's
 e-mail address instead of the sender's e-mail address.
  
  
- INSTRUCTION:  ignet_push_share
- SYNTAX:       ignet_push_share|uncnsrd
-          (or) ignet_push_share|uncnsrd|Foo Bar Baz
- DESCRIPTION:
-    Specifies that the second argument is the name of a neighboring node on an
-IGnet (Citadel networking) network, to which this room should be pushed
-(spooled).  Conceptually, this node will have a corresponding record pushing
-data in the other direction.
-    If the third argument is present, it is the name of the corresponding
-room on the remote node.  This allows a room to be shared even when the room
-name is different on each node.  Such a configuration *must* be configured
-mutually: each node must know the name of the room on the other.
-  
  INSTRUCTION:  subpending
  SYNTAX:       subpending|friko@mumjiboolean.com|listrecp|A234Z|1234567890|http://foo.com/lists
     "Subscription pending" for the specified address.  This means that
index a9c1b6481521b626bb113f4873fb0338710999b1..02ba8dfe3e0987f764334aadb9fdf8ac0709f1b8 100644 (file)
@@ -2,7 +2,7 @@
  * This file contains functions which handle the mapping of Internet addresses
  * to users on the Citadel system.
  *
- * Copyright (c) 1987-2017 by the citadel.org team
+ * Copyright (c) 1987-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.
@@ -482,34 +482,6 @@ int alias(char *name)
                return(MES_INTERNET);
        }
 
-       /* Otherwise we look in the IGnet maps for a valid Citadel node.
-        * Try directly-connected nodes first...
-        */
-       ignetcfg = CtdlGetSysConfig(IGNETCFG);
-       for (i=0; i<num_tokens(ignetcfg, '\n'); ++i) {
-               extract_token(buf, ignetcfg, i, '\n', sizeof buf);
-               extract_token(testnode, buf, 0, '|', sizeof testnode);
-               if (!strcasecmp(node, testnode)) {
-                       free(ignetcfg);
-                       return(MES_IGNET);
-               }
-       }
-       free(ignetcfg);
-
-       /*
-        * Then try nodes that are two or more hops away.
-        */
-       ignetmap = CtdlGetSysConfig(IGNETMAP);
-       for (i=0; i<num_tokens(ignetmap, '\n'); ++i) {
-               extract_token(buf, ignetmap, i, '\n', sizeof buf);
-               extract_token(testnode, buf, 0, '|', sizeof testnode);
-               if (!strcasecmp(node, testnode)) {
-                       free(ignetmap);
-                       return(MES_IGNET);
-               }
-       }
-       free(ignetmap);
-
        /* If we get to this point it's an invalid node name */
        return (MES_ERROR);
 }
@@ -567,7 +539,6 @@ recptypes *validate_recipients(const char *supplied_recipients, const char *Remo
        ret->errormsg = malloc(len);
        ret->recp_local = malloc(len);
        ret->recp_internet = malloc(len);
-       ret->recp_ignet = malloc(len);
        ret->recp_room = malloc(len);
        ret->display_recp = malloc(len);
        ret->recp_orgroom = malloc(len);
@@ -576,7 +547,6 @@ recptypes *validate_recipients(const char *supplied_recipients, const char *Remo
        ret->errormsg[0] = 0;
        ret->recp_local[0] = 0;
        ret->recp_internet[0] = 0;
-       ret->recp_ignet[0] = 0;
        ret->recp_room[0] = 0;
        ret->recp_orgroom[0] = 0;
        ret->display_recp[0] = 0;
@@ -718,13 +688,6 @@ recptypes *validate_recipients(const char *supplied_recipients, const char *Remo
                                strcat(ret->recp_internet, this_recp);
                        }
                        break;
-               case MES_IGNET:
-                       ++ret->num_ignet;
-                       if (!IsEmptyStr(ret->recp_ignet)) {
-                               strcat(ret->recp_ignet, "|");
-                       }
-                       strcat(ret->recp_ignet, this_recp);
-                       break;
                case MES_ERROR:
                        ++ret->num_error;
                        invalid = 1;
@@ -758,14 +721,14 @@ recptypes *validate_recipients(const char *supplied_recipients, const char *Remo
        }
        free(org_recp);
 
-       if ((ret->num_local + ret->num_internet + ret->num_ignet +
-            ret->num_room + ret->num_error) == 0) {
+       if ( (ret->num_local + ret->num_internet + ret->num_room + ret->num_error) == 0)
+       {
                ret->num_error = (-1);
                strcpy(ret->errormsg, "No recipients specified.");
        }
 
-       syslog(LOG_DEBUG, "internet_addressing: validate_recipients() = %d local, %d room, %d SMTP, %d IGnet, %d error",
-               ret->num_local, ret->num_room, ret->num_internet, ret->num_ignet, ret->num_error
+       syslog(LOG_DEBUG, "internet_addressing: validate_recipients() = %d local, %d room, %d SMTP, %d error",
+               ret->num_local, ret->num_room, ret->num_internet, ret->num_error
        );
 
        free(recipients);
@@ -790,7 +753,6 @@ void free_recipients(recptypes *valid) {
        if (valid->errormsg != NULL)            free(valid->errormsg);
        if (valid->recp_local != NULL)          free(valid->recp_local);
        if (valid->recp_internet != NULL)       free(valid->recp_internet);
-       if (valid->recp_ignet != NULL)          free(valid->recp_ignet);
        if (valid->recp_room != NULL)           free(valid->recp_room);
        if (valid->recp_orgroom != NULL)        free(valid->recp_orgroom);
        if (valid->display_recp != NULL)        free(valid->display_recp);
index 0d2e74f4182d2218a042b7a9ea9167de77abbf06..5707faaf0ed1c4d5e71979a2e1015a5f7c468090 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Message journaling functions.
  *
- * Copyright (c) 1987-2015 by the citadel.org team
+ * Copyright (c) 1987-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.
@@ -14,9 +14,7 @@
 
 #include <stdio.h>
 #include <libcitadel.h>
-
 #include "ctdl_module.h"
-
 #include "citserver.h"
 #include "config.h"
 #include "user_ops.h"
@@ -116,7 +114,6 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
 
                if (  (journal_recps->num_local > 0)
                   || (journal_recps->num_internet > 0)
-                  || (journal_recps->num_ignet > 0)
                   || (journal_recps->num_room > 0)
                ) {
 
@@ -202,77 +199,39 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                                                   journal_msg->cm_fields[erFc822Addr]);
                        }
                        else if (!CM_IsEmpty(journal_msg, eNodeName)) {
-                               StrBufAppendPrintf(message_text, " @ %s",
-                                                  journal_msg->cm_fields[eNodeName]);
+                               StrBufAppendPrintf(message_text, " @ %s", journal_msg->cm_fields[eNodeName]);
+                       }
+                       else {
+                               StrBufAppendBufPlain( message_text, HKEY(" "), 0);
                        }
-                       else
-                               StrBufAppendBufPlain(
-                                       message_text, 
-                                       HKEY(" "), 0);
 
-                       StrBufAppendBufPlain(
-                               message_text, 
-                               HKEY("\r\n"
-                                    "Message-ID: <"), 0);
+                       StrBufAppendBufPlain(message_text, HKEY("\r\nMessage-ID: <"), 0);
 
                        StrBufAppendBufPlain(message_text, jmsg->msgn, -1, 0);
-                       StrBufAppendBufPlain(
-                               message_text, 
-                               HKEY(">\r\n"
-                                    "Recipients:\r\n"), 0);
+                       StrBufAppendBufPlain( message_text, HKEY(">\r\nRecipients:\r\n"), 0);
 
                        if (jmsg->recps.num_local > 0) {
                                for (i=0; i<jmsg->recps.num_local; ++i) {
-                                       extract_token(recipient, jmsg->recps.recp_local,
-                                                       i, '|', sizeof recipient);
+                                       extract_token(recipient, jmsg->recps.recp_local, i, '|', sizeof recipient);
                                        local_to_inetemail(inetemail, recipient, sizeof inetemail);
-                                       StrBufAppendPrintf(message_text, 
-                                                          "    %s <%s>\r\n", recipient, inetemail);
-                               }
-                       }
-
-                       if (jmsg->recps.num_ignet > 0) {
-                               for (i=0; i<jmsg->recps.num_ignet; ++i) {
-                                       extract_token(recipient, jmsg->recps.recp_ignet,
-                                                       i, '|', sizeof recipient);
-                                       StrBufAppendPrintf(message_text, 
-                                                          "    %s\r\n", recipient);
+                                       StrBufAppendPrintf(message_text, "      %s <%s>\r\n", recipient, inetemail);
                                }
                        }
 
                        if (jmsg->recps.num_internet > 0) {
                                for (i=0; i<jmsg->recps.num_internet; ++i) {
-                                       extract_token(recipient, jmsg->recps.recp_internet,
-                                                       i, '|', sizeof recipient);
-                                       StrBufAppendPrintf(message_text, 
-                                               "       %s\r\n", recipient);
+                                       extract_token(recipient, jmsg->recps.recp_internet, i, '|', sizeof recipient);
+                                       StrBufAppendPrintf(message_text, "      %s\r\n", recipient);
                                }
                        }
 
-                       StrBufAppendBufPlain(
-                               message_text, 
-                               HKEY("\r\n"
-                                    "--"), 0);
-
+                       StrBufAppendBufPlain(message_text, HKEY("\r\n" "--"), 0);
                        StrBufAppendBufPlain(message_text, mime_boundary, mblen, 0);
-
-                       StrBufAppendBufPlain(
-                               message_text, 
-                               HKEY("\r\n"
-                                    "Content-type: message/rfc822\r\n"
-                                    "\r\n"), 0);
-
+                       StrBufAppendBufPlain(message_text, HKEY("\r\nContent-type: message/rfc822\r\n\r\n"), 0);
                        StrBufAppendBufPlain(message_text, jmsg->rfc822, rfc822len, 0);
-
-                       StrBufAppendBufPlain(
-                               message_text, 
-                               HKEY("--"), 0);
-
+                       StrBufAppendBufPlain(message_text, HKEY("--"), 0);
                        StrBufAppendBufPlain(message_text, mime_boundary, mblen, 0);
-
-                       StrBufAppendBufPlain(
-                               message_text, 
-                               HKEY("--\r\n"), 0);
+                       StrBufAppendBufPlain(message_text, HKEY("--\r\n"), 0);
 
                        CM_SetAsFieldSB(journal_msg, eMesageText, &message_text);
                        free(jmsg->rfc822);
index fe77e6ba00803447e32d6bcf5f00cb4a7791251e..fc169ce05f85732654f3303f964af8f8bb0fb5a9 100644 (file)
@@ -2,7 +2,7 @@
  * A server-side module for Citadel which supports address book information
  * using the standard vCard format.
  * 
- * Copyright (c) 1999-2017 by the citadel.org team
+ * Copyright (c) 1999-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.
@@ -1115,13 +1115,12 @@ void check_get(void) {
                
                extract_token(internet_addr, argbuf, 0, '|', sizeof internet_addr);
                rcpt = validate_recipients(internet_addr, NULL, CHECK_EXISTANCE);
-               if ((rcpt != NULL)&&
+               if (    (rcpt != NULL) &&
                        (
-                        (*rcpt->recp_local != '\0')||
-                        (*rcpt->recp_room != '\0')||
-                        (*rcpt->recp_ignet != '\0')))
-               {
-
+                               (*rcpt->recp_local != '\0') ||
+                               (*rcpt->recp_room != '\0')
+                       )
+               ) {
                        cprintf("200 OK %s\n", internet_addr);
                        syslog(LOG_INFO, "vcard: sending 200 OK for the room %s", rcpt->display_recp);
                }
index 01d09c693ef3c6d030632655d8879a04a436b871..ec821d91b941db2c7121a73dccc76c6a5d83c211 100644 (file)
@@ -54,7 +54,6 @@ typedef struct __recptypes {
        char *errormsg;
        char *recp_local;
        char *recp_internet;
-       char *recp_ignet;
        char *recp_room;
        char *recp_orgroom;
        char *display_recp;