#include "euidindex.h"
#include "journaling.h"
#include "citadel_dirs.h"
+#include "serv_network.h"
+
+#ifdef HAVE_LIBSIEVE
+# include "serv_sieve.h"
+#endif /* HAVE_LIBSIEVE */
long config_msgnum;
struct addresses_to_be_filed *atbf = NULL;
for (i=0; i<orig_num_msgs; ++i) {
for (j=0; j<num_search_msgs; ++j) {
if (msglist[i] == search_msgs[j]) {
- msglist[num_msgs++] = msglist[j];
+ msglist[num_msgs++] = msglist[i];
}
}
}
else if (i == 'Y') {
cprintf("CC: %s%s", mptr, nl);
}
+ else if (i == 'P') {
+ cprintf("Return-Path: %s%s", mptr, nl);
+ }
+ else if (i == 'V') {
+ cprintf("Envelope-To: %s%s", mptr, nl);
+ }
else if (i == 'U') {
cprintf("Subject: %s%s", mptr, nl);
subject_found = 1;
lprintf(CTDL_DEBUG, "CtdlSaveMsgPointerInRoom() skips repl checks\n");
}
+ /* Submit this room for net processing */
+ network_queue_room(&CC->room, NULL);
+
+#ifdef HAVE_LIBSIEVE
+ /* If this is someone's inbox, submit the room for sieve processing */
+ if (!strcasecmp(&CC->room.QRname[11], MAILROOM)) {
+ sieve_queue_room(&CC->room);
+ }
+#endif /* HAVE_LIBSIEVE */
+
/* Go back to the room we were in before we wandered here... */
getroom(&CC->room, hold_rm);
char *m;
int flushing = 0;
int finished = 0;
+ int dotdot = 0;
if (exist == NULL) {
m = malloc(4096);
}
}
+ /* Do we need to change leading ".." to "." for SMTP escaping? */
+ if (!strcmp(terminator, ".")) {
+ dotdot = 1;
+ }
+
/* flush the input if we have nowhere to store it */
if (m == NULL) {
flushing = 1;
strcat(buf, "\n");
}
+ /* Unescape SMTP-style input of two dots at the beginning of the line */
+ if (dotdot) {
+ if (!strncmp(buf, "..", 2)) {
+ strcpy(buf, &buf[1]);
+ }
+ }
+
if ( (!flushing) && (!finished) ) {
/* Measure the line */
linelen = strlen(buf);