#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
/****************************************************************************/
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
- 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
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
* 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.
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);
}
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);
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;
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;
}
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);
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);
/*
* 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.
#include <stdio.h>
#include <libcitadel.h>
-
#include "ctdl_module.h"
-
#include "citserver.h"
#include "config.h"
#include "user_ops.h"
if ( (journal_recps->num_local > 0)
|| (journal_recps->num_internet > 0)
- || (journal_recps->num_ignet > 0)
|| (journal_recps->num_room > 0)
) {
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);
* 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.
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);
}
char *errormsg;
char *recp_local;
char *recp_internet;
- char *recp_ignet;
char *recp_room;
char *recp_orgroom;
char *display_recp;