From: Art Cancro Date: Fri, 19 Apr 2024 02:45:52 +0000 (+0000) Subject: Changed how Message-ID RFC2822 field is generated X-Git-Tag: v1000~28 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=605133afb3d87139c657794d647c3a49df8b6a47 Changed how Message-ID RFC2822 field is generated --- diff --git a/citadel/server/msgbase.c b/citadel/server/msgbase.c index b3a8f7071..8582fba30 100644 --- a/citadel/server/msgbase.c +++ b/citadel/server/msgbase.c @@ -2011,12 +2011,13 @@ int CtdlOutputPreLoadedMsg( } if (mode == MT_RFC822) { - // Construct a fun message id - cprintf("Message-ID: <%s", mid); - if (strchr(mid, '@')==NULL) { - cprintf("@%s", snode); - } - cprintf(">%s", nl); + // Make the message ID RFC2822 compliant + cprintf("Message-ID: <%s%s%s>%s", // put it in angle brackets + mid, + (strchr(mid, '@') ? "" : "@"), // if there is no domain part, + (strchr(mid, '@') ? "" : snode), // tack on ours. + nl + ); if (!is_room_aide() && (TheMessage->cm_anon_type == MES_ANONONLY)) { cprintf("From: \"----\" %s", nl); @@ -2320,7 +2321,7 @@ long CtdlSaveThisMessage(struct CtdlMessage *msg, long msgid) { } if (error_count > 0) { - syslog(LOG_ERR, "msgbase: encountered %d errors storing message %ld", error_count, msgid); + syslog(LOG_ERR, "msgbase: encountered %ld errors storing message %ld", error_count, msgid); } // Free the memory we used for the serialized message diff --git a/webcit/bootstrap b/webcit/bootstrap index 43c30e3c2..2942bace5 100755 --- a/webcit/bootstrap +++ b/webcit/bootstrap @@ -6,6 +6,8 @@ # Remove any vestiges of pre-6.05 build environments rm -f .libs modules *.so *.lo *.la 2>/dev/null +grep '^#define CLIENT_VERSION' webcit.h | sed 's/[^0-9]*//g' >package-version.txt + echo ... running aclocal ... aclocal @@ -23,7 +25,6 @@ autoheader echo ... mk_module_init.sh ... ./scripts/mk_module_init.sh - echo echo This script has been tested with autoconf 2.53 and echo automake 1.5. Other versions may work, but I recommend the latest @@ -33,4 +34,3 @@ echo Also note that autoconf and automake should be configured echo with the same prefix. echo -grep '^#define CLIENT_VERSION' webcit.h | sed 's/[^0-9]*//g' >package-version.txt diff --git a/webcit/configure.ac b/webcit/configure.ac index 2ca5796b2..7ffaf142b 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl $Id$ -AC_INIT([WebCit],[m4_esyscmd_s(grep CLIENT_VERSION webcit.h | sed 's/[^0-9]*//g')],[http://uncensored.citadel.org]) +AC_INIT([WebCit],[m4_esyscmd_s(cat package-version.txt)],[http://uncensored.citadel.org]) AC_SUBST(PROG_SUBDIRS) AC_DEFINE(PROG_SUBDIRS, [], [Program dirs])