# HG changeset patch # User Ben Schmidt # Date 1284913554 -36000 # Node ID 926f184eec44d2892c3fc87e3ad2e8e7b5559927 # Parent c2ffbdcf3be55cc003cb2dd34bef55b4776efa30 Add a $subject$ substitution for list texts diff -r c2ffbdcf3be5 -r 926f184eec44 ChangeLog --- a/ChangeLog Mon Sep 20 02:07:42 2010 +1000 +++ b/ChangeLog Mon Sep 20 02:25:54 2010 +1000 @@ -1,3 +1,4 @@ + o Add a $subject$ substitution for list texts o Changes to how $originalmail$ works -- existing installations will change behaviour due to this; prepending a space to the lines currently containing $originalmail$ in the listtexts will generally retain current behaviour diff -r c2ffbdcf3be5 -r 926f184eec44 README.listtexts --- a/README.listtexts Mon Sep 20 02:07:42 2010 +1000 +++ b/README.listtexts Mon Sep 20 02:25:54 2010 +1000 @@ -237,13 +237,19 @@ number like 1000000000. - $posteraddr$ - (available only in subonlypost) + (available only in access, notintocc, moderation, moderation-poster and + subonlypost) the from address of the message that was received as determined by Mlmmj - $subaddr$ (available only in submod-moderator and [un]sub-confirm[-digest|-nomail]) the address requested to be (un-)subscribed +- $subject$ + (available only in access, notintocc, moderation, moderation-poster and + subonlypost) + the subject line of the message in question + - \uNNNN (NNNN are hex digits) a Unicode character diff -r c2ffbdcf3be5 -r 926f184eec44 src/mlmmj-process.c --- a/src/mlmmj-process.c Mon Sep 20 02:07:42 2010 +1000 +++ b/src/mlmmj-process.c Mon Sep 20 02:25:54 2010 +1000 @@ -52,6 +52,7 @@ #include "memory.h" #include "log_oper.h" #include "chomp.h" +#include "unistr.h" enum action { ALLOW, @@ -71,14 +72,16 @@ void newmoderated(const char *listdir, const char *mailfilename, - const char *mlmmjsend, const char *efromsender) + const char *mlmmjsend, const char *efromsender, + size_t tokencount, char **data) { + size_t i; char *from, *listfqdn, *listname, *moderators = NULL; char *buf, *replyto, *listaddr = getlistaddr(listdir), *listdelim; char *queuefilename = NULL, *moderatorsfilename, *efromismod = NULL; char *mailbasename = mybasename(mailfilename), *tmp, *to; int moderatorsfd, foundaddr = 0, notifymod = 0, status; - char *maildata[4] = { "moderateaddr", NULL, "moderators", NULL }; + char *maildata[10] = { "moderateaddr", NULL, "moderators", NULL }; pid_t childpid, pid; #if 0 printf("mailfilename = [%s], mailbasename = [%s]\n", mailfilename, @@ -87,6 +90,13 @@ listfqdn = genlistfqdn(listaddr); listname = genlistname(listaddr); + MY_ASSERT(tokencount<=3) + for (i=0; i