X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fimap%2Fimap_misc.c;h=be350a5721c572294e8b34363bc58927875c4baf;hb=e87452481eae22f861f601fdb082a4fa75567dc4;hp=671c6ce5fdc2f1c1847b3b2b78bbec4054cea25b;hpb=524761fccbda19e54e7cd57e0aa3d0e0f0b05ed8;p=citadel.git diff --git a/citadel/modules/imap/imap_misc.c b/citadel/modules/imap/imap_misc.c index 671c6ce5f..be350a572 100644 --- a/citadel/modules/imap/imap_misc.c +++ b/citadel/modules/imap/imap_misc.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "citadel.h" #include "server.h" #include "sysdep_decls.h" @@ -41,14 +42,13 @@ #include "policy.h" #include "database.h" #include "msgbase.h" -#include "tools.h" #include "internet_addressing.h" #include "serv_imap.h" #include "imap_tools.h" #include "imap_fetch.h" #include "imap_misc.h" #include "genstamp.h" - +#include "ctdl_module.h" @@ -414,7 +414,7 @@ void imap_append(int num_parms, char *parms[]) { client_getln(buf, sizeof buf); /* Convert RFC822 newlines (CRLF) to Unix newlines (LF) */ - lprintf(CTDL_DEBUG, "Converting CRLF to LF\n"); + CtdlLogPrintf(CTDL_DEBUG, "Converting CRLF to LF\n"); stripped_length = 0; for (i=0; itransmitted_message[i], "\r\n", 2)) { @@ -425,7 +425,7 @@ void imap_append(int num_parms, char *parms[]) { literal_length = stripped_length; Imap->transmitted_message[literal_length] = 0; /* reterminate it */ - lprintf(CTDL_DEBUG, "Converting message format\n"); + CtdlLogPrintf(CTDL_DEBUG, "Converting message format\n"); msg = convert_internet_message(Imap->transmitted_message); Imap->transmitted_message = NULL; Imap->transmitted_length = 0; @@ -454,7 +454,7 @@ void imap_append(int num_parms, char *parms[]) { * private mailboxes. */ if (CC->logged_in) { - if ( (CC->room.QRflags & QR_MAILBOX) == 0) { + if ( ((CC->room.QRflags & QR_MAILBOX) == 0) && (config.c_imap_keep_from == 0)) { if (msg->cm_fields['A'] != NULL) free(msg->cm_fields['A']); if (msg->cm_fields['N'] != NULL) free(msg->cm_fields['N']); if (msg->cm_fields['H'] != NULL) free(msg->cm_fields['H']); @@ -467,7 +467,7 @@ void imap_append(int num_parms, char *parms[]) { /* * Can we post here? */ - ret = CtdlDoIHavePermissionToPostInThisRoom(buf, sizeof buf); + ret = CtdlDoIHavePermissionToPostInThisRoom(buf, sizeof buf, NULL, POST_LOGGED_IN); if (ret) { /* Nope ... print an error message */ @@ -477,7 +477,7 @@ void imap_append(int num_parms, char *parms[]) { else { /* Yes ... go ahead and post! */ if (msg != NULL) { - new_msgnum = CtdlSubmitMsg(msg, NULL, ""); + new_msgnum = CtdlSubmitMsg(msg, NULL, "", 0); } if (new_msgnum >= 0L) { cprintf("%s OK [APPENDUID %ld %ld] APPEND completed\r\n",