]> code.citadel.org Git - citadel.git/commitdiff
put list-unsubscribe address in angle brackets
authorArt Cancro <ajc@citadel.org>
Tue, 21 May 2024 15:15:44 +0000 (15:15 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 21 May 2024 15:15:44 +0000 (15:15 +0000)
citadel/dumploadtest.sh
citadel/server/modules/autocompletion/serv_autocompletion.c
citadel/server/modules/bio/serv_bio.c
citadel/server/modules/listdeliver/serv_listdeliver.c
citadel/server/modules/smtp/serv_smtpclient.c

index 7179f399180e853ec0f8a55db8c27197b979139c..50488ff8032efe4222de9a3cfab58bab3e18e8f0 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/bash
 
-
 # This script dumps the database, deletes the database, loads the database, dumps it again...
 # ...and then compares the two dumps to see if we have full fidelity between them.
 #
@@ -13,16 +12,18 @@ ps ax | grep citserver | grep -v grep >/dev/null 2>/dev/null && {
        exit 1
 }
 
+echo
+echo
+
 ./ctdldump -y >dump.dat
 first=$(md5sum dump.dat | awk ' { print $1 } ' )
+echo MD5 of initial dump: ${first}
+
 rm -fv data/*
 ./ctdlload -y <dump.dat
 ./ctdldump -y >dump.dat
 second=$(md5sum dump.dat | awk ' { print $1 } ' )
 
-echo
-echo
-echo MD5 of initial dump: ${first}
 echo MD5 of sequent dump: ${second}
 echo
 if [ ${first} == ${second} ] ; then
index 413bf472b739920999baeff92ae7e3768206cecb..822e01aac6ec869e7fa6a478272071f5afb01ca9 100644 (file)
@@ -1,9 +1,6 @@
 // Autocompletion of email recipients, etc.
-//
 // Copyright (c) 1987-2023 by the citadel.org team
-//
-// This program is open source software.  Use, duplication, or disclosure
-// is subject to the terms of the GNU General Public License version 3.
+// This program is open source software.  Use, duplication, or disclosure is subject to the GNU General Public License version 3.
 
 #include "../../ctdl_module.h"
 #include "serv_autocompletion.h"
index 8be817ae687dbcdf7f999b1ad7aee2290347747d..6ff861551dd0cbbba682c10023ea51ec6f30e894 100644 (file)
@@ -3,9 +3,7 @@
 //
 // Copyright (c) 1987-2022 by the citadel.org team
 //
-// This program is open source software.  Use, duplication, or disclosure
-// is subject to the terms of the GNU General Public License, version 3.
-// The program is distributed without any warranty, expressed or implied.
+// This program is open source software.  Use, duplication, or disclosure is subject to the GNU General Public License, version 3.
 
 #include <sys/types.h>
 #include <sys/stat.h>
index fd1356079f104eaa907075af27275336949b8442..a6cb74ad40da811b5bbf406b5e674930e070abb1 100644 (file)
@@ -1,14 +1,6 @@
 // This module delivers messages to mailing lists.
-//
-// Copyright (c) 2002-2024 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.
-//  
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// Copyright (c) 2002-2024 by the citadel.org team (Art Cancro et al.)
+// This program is open source software.  Use, duplication, or disclosure are subject to the GNU General Public License v3.
 
 #include "../../sysdep.h"
 #include <stdlib.h>
@@ -40,7 +32,6 @@
 
 int doing_listdeliver = 0;
 
-
 // data passed back and forth between listdeliver_do_msg() and listdeliver_sweep_room()
 struct lddata {
        long msgnum;            // number of most recent message processed
@@ -48,7 +39,6 @@ struct lddata {
 };
 
 
-
 void listdeliver_do_msg(long msgnum, void *userdata) {
        struct lddata *ld = (struct lddata *) userdata;
        if (!ld) return;
@@ -63,6 +53,8 @@ void listdeliver_do_msg(long msgnum, void *userdata) {
        struct CtdlMessage *TheMessage = CtdlFetchMessage(msgnum, 1);
        if (!TheMessage) return;
 
+       // FIXME add the list unsubscribe instructions directly to the message text.  Do it right here.
+
        // If the subject line does not contain the name of the room, add it now.
        if (!bmstrcasestr(TheMessage->cm_fields[eMsgSubject], CC->room.QRname)) {
                snprintf(buf, sizeof buf, "[%s] %s", CC->room.QRname, TheMessage->cm_fields[eMsgSubject]);
@@ -78,6 +70,13 @@ void listdeliver_do_msg(long msgnum, void *userdata) {
        CM_SetField(TheMessage, erFc822Addr, buf);
        CM_SetField(TheMessage, eReplyTo, buf);
 
+       // To: likewise needs to have something in it, definitely not the name of an actual mailing list member.
+       // Let's use the address and name of the room.
+       strcat(buf, " (");
+       strcat(buf, CC->room.QRname);
+       strcat(buf, " )");
+       CM_SetField(TheMessage, eRecipient, buf);
+
        // With that out of the way, let's figure out who this message needs to be sent to.
        char *recipients = malloc(strlen(ld->netconf));
        if (recipients) {
index 03f54b108b0725c794e0fb2f6c5b8dcbf4bdd5ca..6eedc56d02bb37d3523a6cd1b282c71e077650d0 100644 (file)
@@ -224,15 +224,13 @@ int smtp_attempt_delivery(long msgid, char *recp, char *envelope_from, char *sou
                char unsubscribe_url[SIZ];
                snprintf(base_url, sizeof base_url, "https://%s/listsub", CtdlGetConfigStr("c_fqdn"));
                generate_one_click_url(unsubscribe_url, base_url, "unsubscribe", source_room, recp);
-               cprintf("List-Unsubscribe: %s\r\n", unsubscribe_url);
+               cprintf("List-Unsubscribe: <%s>\r\n", unsubscribe_url);                 // RFC 2369
                cprintf("List-Unsubscribe-Post: List-Unsubscribe=One-Click\r\n");       // RFC 8058
-
        }
 
        CtdlOutputMsg(msgid, MT_RFC822, HEADERS_ALL, 0, 1, NULL, 0, NULL, &fromaddr, NULL);
        s.TheMessage = CC->redirect_buffer;
        CC->redirect_buffer = NULL;
-       syslog(LOG_DEBUG, "fromaddr=<%s>",fromaddr);
 
        // If we have a DKIM key, try to sign the message.
        char *dkim_private_key = CtdlGetConfigStr("dkim_private_key");