From: Art Cancro Date: Wed, 13 Jul 2011 21:27:28 +0000 (-0400) Subject: Extracting the 'To:' header from the replying_to message now works. X-Git-Tag: v8.11~587 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=6a38faea03a78f287bc248dd6ae405d7f1e579f4 Extracting the 'To:' header from the replying_to message now works. --- diff --git a/webcit/README.txt b/webcit/README.txt index 2bc50943d..7d6bd8593 100644 --- a/webcit/README.txt +++ b/webcit/README.txt @@ -254,7 +254,7 @@ virtual host through to WebCit. The alternative way, which does work but is not quite as robust, is to "mount" the WebCit paths as directory aliases to your main document root. -Here is how to configure the NameVirtualHost method: +Here is how to configure the NameVirtualHost method (recommended) : #here some of your config stuff like logging, serveradmin... @@ -269,7 +269,7 @@ Here is how to configure the NameVirtualHost method: alias /static /var/lib/citadel/www/static -Here is how to configure the "subdirectory" method: +Here is how to configure the "subdirectory" method (not recommended) : #here some of your config stuff like logging, serveradmin... @@ -295,9 +295,6 @@ Here is how to configure the "subdirectory" method: ProxyPassReverse /groupdav/ http://127.0.0.1:2000/groupdav/ ProxyPass /who_inner_html http://127.0.0.1:2000/who_inner_html ProxyPassReverse /who_inner_html http://127.0.0.1:2000/who_inner_html -# The following line is optional. It allows WebCit's static content -# such as images to be served directly by Apache. - alias /static /var/lib/citadel/www/static @@ -328,5 +325,5 @@ bin: the binaries. ---------- That's all you need to know to get started. If you have any questions or -comments, please visit UNCENSORED! BBS, the home of Citadel, at -http://uncensored.citadel.org - and go to the "Citadel Support" room. +comments, visit the Citadel Support room on UNCENSORED! BBS, the home of Citadel: +http://uncensored.citadel.org/dotgoto?room=Citadel%20Support diff --git a/webcit/messages.c b/webcit/messages.c index 049b1f10f..6e9b08729 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1289,6 +1289,7 @@ void display_enter(void) int recipient_bad = 0; int is_anonymous = 0; wcsession *WCC = WC; + int i = 0; now = time(NULL); @@ -1355,15 +1356,25 @@ void display_enter(void) long replying_to = lbstr("replying_to"); if (replying_to > 0) { char wefw[1024] = ""; - char msgn[1024] = ""; + char msgn[256] = ""; + char from[256] = ""; + char node[256] = ""; + char rfca[256] = ""; serv_printf("MSG0 %ld|1", replying_to); serv_getln(buf, sizeof buf); if (buf[0] == '1') while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { if ( (!strncasecmp(buf, "subj=", 5)) && (strlen(buf) > 5) ) { StrBuf *subj = NewStrBuf(); - if (strncasecmp(&buf[5], "Re:", 3)) { - StrBufAppendBufPlain(subj, HKEY("Re: "), 0); + if (!strcasecmp(bstr("replying_mode"), "forward")) { + if (strncasecmp(&buf[5], "Fw:", 3)) { + StrBufAppendBufPlain(subj, HKEY("Fw: "), 0); + } + } + else { + if (strncasecmp(&buf[5], "Re:", 3)) { + StrBufAppendBufPlain(subj, HKEY("Re: "), 0); + } } StrBufAppendBufPlain(subj, &buf[5], -1, 0); PutBstr(HKEY("subject"), subj); @@ -1386,6 +1397,21 @@ void display_enter(void) safestrncpy(msgn, &buf[5], sizeof msgn); } + else if (!strncasecmp(buf, "from=", 5)) { + safestrncpy(from, &buf[5], sizeof from); + for (i=0; i", from, rfca); + } + else { + StrBufAppendPrintf(to_rcpt, "%s", from); + if ( (!IsEmptyStr(node)) + && (strcasecmp(node, ChrPtr(WC->serv_info->serv_nodename))) + ) { + StrBufAppendPrintf(to_rcpt, " @ %s", node); + } + } + PutBstr(HKEY("recp"), to_rcpt); + } } /* diff --git a/webcit/static/t/view_message.html b/webcit/static/t/view_message.html index 82c32275c..cbe7fc967 100644 --- a/webcit/static/t/view_message.html +++ b/webcit/static/t/view_message.html @@ -15,20 +15,13 @@

?cc=?subject=?force_room=_MAIL_">[] - [] - [] + [] + [] - - %7C?replyquote=?recp=%22%22%3C%3E?subject='));">[] - %7C?replyquote=?recp=%22%22%3C%3E%2C?subject='));">[] - %7C?fwdquote=&subject=">[] - - - %7C?replyquote=?recp=&references=%3C%3E&subject='));">[] - %7C?replyquote=?recp=%2C&references=%3C%3E&subject='));">[] - %7C?fwdquote=&subject=">[] - + [] + [] + [] []