[Dovecot] deliver: select destination folder
Hello,
I wanted a commandline switch within deliver to select the destination
folder within an IMAP account, so I added the -f switch, heres the diff,
the implementation is only "proof of concept" hehe, I didnt checked if
theres any security riscs in doing this. Could we add something like this
to dovecot?
diff deliver.c.orig deliver.c 342c342 < const char *destination, *mail;
const char *destination, *mail, *folder;
355a356
folder = NULL;
364a366,373
} else if (strcmp(argv[i], "-f") == 0) { /* destination folder */ i++; if (i == argc) { i_fatal_status(EX_USAGE, "Missing folder argument"); } folder = argv[i];
378a388,391
if (folder == NULL) { folder = "INBOX"; }
449c462 < if (save_mail(storage, "INBOX", input) < 0)
if (save_mail(storage, folder, input) < 0)
bye! Dominik
On Sun, 2005-10-02 at 12:00 +0200, Dominik Werder wrote:
Hello,
I wanted a commandline switch within deliver to select the destination
folder within an IMAP account, so I added the -f switch, heres the diff,
the implementation is only "proof of concept" hehe, I didnt checked if
theres any security riscs in doing this. Could we add something like this
to dovecot?
I added -m as in "mailbox" instead. It seems to be more common/correct term for it. Added for both Dovecot's deliver and Dovecot-LDA.
participants (2)
-
Dominik Werder
-
Timo Sirainen