From: Ben Schmidt Date: Tue, 3 Jan 2012 17:10:31 +0000 (+1100) Subject: Allow a space in $originalmail N$ substitution. X-Git-Tag: RELEASE_1_2_18a1~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9651233e69c0f1ca95b84bc4d535356adb44520f;p=thirdparty%2Fmlmmj.git Allow a space in $originalmail N$ substitution. --- diff --git a/ChangeLog b/ChangeLog index 7a702c82..c0f4ab5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + o Allow a space in $originalmail N$ substitution o Add $text T$ substitution o Add $$ substitution o Allow list texts to include real UTF-8 characters, as documented diff --git a/src/prepstdreply.c b/src/prepstdreply.c index 8821b6d6..36c50b22 100644 --- a/src/prepstdreply.c +++ b/src/prepstdreply.c @@ -484,6 +484,10 @@ char *prepstdreply(const char *listdir, const char *purpose, const char *action, *tmp = '\0'; tmp += 13; str = tmp; + if (*tmp == ' ') { + tmp++; + str = tmp; + } while (*tmp >= '0' && *tmp <= '9') tmp++; if (*tmp == '$') { @@ -513,10 +517,10 @@ char *prepstdreply(const char *listdir, const char *purpose, const char *action, } close(mailfd); } else { - log_error(LOG_ARGS, "Could not substitute $originalmail%d$ (mailname == %s)",len,mailname); + log_error(LOG_ARGS, "Could not substitute $originalmail %d$ (mailname == %s)",len,mailname); } } else { - log_error(LOG_ARGS, "Bad $originalmailNNN$ substitution"); + log_error(LOG_ARGS, "Bad $originalmail N$ substitution"); } myfree(utfline); } else {