* Blank out the Envelope-to: header when reading messages via POP or IMAP. Resolves...
[citadel.git] / citadel / modules / pop3 / serv_pop3.c
index 79a6b592ba30f746002eae1c939a632cabd43f77..da6bda885262e383a765b55a2231df4c72b853e1 100644 (file)
@@ -159,7 +159,7 @@ void pop3_add_message(long msgnum, void *userdata) {
                CC->redirect_buffer = malloc(SIZ);
                CC->redirect_len = 0;
                CC->redirect_alloc = SIZ;
-               CtdlOutputMsg(msgnum, MT_RFC822, HEADERS_ALL, 0, 1, NULL, 0);
+               CtdlOutputMsg(msgnum, MT_RFC822, HEADERS_ALL, 0, 1, NULL, SUPPRESS_ENV_TO);
                smi.meta_rfc822_length = CC->redirect_len;
                free(CC->redirect_buffer);
                CC->redirect_buffer = NULL;
@@ -373,7 +373,10 @@ void pop3_retr(char *argbuf) {
        }
 
        cprintf("+OK Message %d:\r\n", which_one);
-       CtdlOutputMsg(POP3->msgs[which_one - 1].msgnum, MT_RFC822, HEADERS_ALL, 0, 1, NULL, ESC_DOT);
+       CtdlOutputMsg(POP3->msgs[which_one - 1].msgnum,
+               MT_RFC822, HEADERS_ALL, 0, 1, NULL,
+               (ESC_DOT|SUPPRESS_ENV_TO)
+       );
        cprintf(".\r\n");
 }
 
@@ -405,8 +408,7 @@ void pop3_top(char *argbuf) {
        CC->redirect_buffer = malloc(SIZ);
        CC->redirect_len = 0;
        CC->redirect_alloc = SIZ;
-       CtdlOutputMsg(POP3->msgs[which_one - 1].msgnum,
-                     MT_RFC822, HEADERS_ALL, 0, 1, NULL, 0);
+       CtdlOutputMsg(POP3->msgs[which_one - 1].msgnum, MT_RFC822, HEADERS_ALL, 0, 1, NULL, SUPPRESS_ENV_TO);
        msgtext = CC->redirect_buffer;
        CC->redirect_buffer = NULL;
        CC->redirect_len = 0;