From f86a2278221b47cef60c27bc9bfba6cb8689056c Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 24 Jan 2018 11:20:00 -0500 Subject: [PATCH] whittle whittle --- citadel/citadel.h | 1 - citadel/docs/citadelapi.txt | 2 +- citadel/docs/netconfigs.txt | 17 +------ citadel/internet_addressing.c | 48 +++----------------- citadel/journaling.c | 71 +++++++----------------------- citadel/modules/vcard/serv_vcard.c | 13 +++--- citadel/server.h | 1 - 7 files changed, 28 insertions(+), 125 deletions(-) diff --git a/citadel/citadel.h b/citadel/citadel.h index fea62aaa2..8c209787d 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -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 /****************************************************************************/ diff --git a/citadel/docs/citadelapi.txt b/citadel/docs/citadelapi.txt index 2bac15e62..6c983540e 100644 --- a/citadel/docs/citadelapi.txt +++ b/citadel/docs/citadelapi.txt @@ -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 diff --git a/citadel/docs/netconfigs.txt b/citadel/docs/netconfigs.txt index f120d48a6..8eee888eb 100644 --- a/citadel/docs/netconfigs.txt +++ b/citadel/docs/netconfigs.txt @@ -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 diff --git a/citadel/internet_addressing.c b/citadel/internet_addressing.c index a9c1b6481..02ba8dfe3 100644 --- a/citadel/internet_addressing.c +++ b/citadel/internet_addressing.c @@ -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; ierrormsg = 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); diff --git a/citadel/journaling.c b/citadel/journaling.c index 0d2e74f41..5707faaf0 100644 --- a/citadel/journaling.c +++ b/citadel/journaling.c @@ -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 #include - #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; irecps.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; irecps.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; irecps.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); diff --git a/citadel/modules/vcard/serv_vcard.c b/citadel/modules/vcard/serv_vcard.c index fe77e6ba0..fc169ce05 100644 --- a/citadel/modules/vcard/serv_vcard.c +++ b/citadel/modules/vcard/serv_vcard.c @@ -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); } diff --git a/citadel/server.h b/citadel/server.h index 01d09c693..ec821d91b 100644 --- a/citadel/server.h +++ b/citadel/server.h @@ -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; -- 2.30.2