[dovecot-cvs] dovecot-lda/src common.h, 1.3, 1.4 deliver.c, 1.38,
1.39 sieve-cmu.c, 1.12, 1.13
cras at dovecot.org
cras at dovecot.org
Wed Feb 8 13:39:31 EET 2006
Update of /var/lib/cvs/dovecot-lda/src
In directory talvi:/tmp/cvs-serv25300/src
Modified Files:
common.h deliver.c sieve-cmu.c
Log Message:
Make -m parameter work even with Sieve scripts enabled
Index: common.h
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/common.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- common.h 7 Oct 2005 09:34:43 -0000 1.3
+++ common.h 8 Feb 2006 11:39:29 -0000 1.4
@@ -12,7 +12,8 @@
extern struct sieve_settings *sieve_set;
int dovecot_sieve_run(struct mail_storage *storage, struct mail *mail,
- const char *script_path, const char *username);
+ const char *script_path, const char *username,
+ const char *mailbox);
int save_mail(struct mail_storage *storage, const char *mailbox,
struct mail *mail, enum mail_flags flags,
Index: deliver.c
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/deliver.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- deliver.c 5 Feb 2006 07:08:36 -0000 1.38
+++ deliver.c 8 Feb 2006 11:39:29 -0000 1.39
@@ -500,7 +500,7 @@
static void print_help(void)
{
- printf("Usage: deliver [-c <config file>] [-d <destination user>]\n");
+ printf("Usage: deliver [-c <config file>] [-d <destination user>] [-m <mailbox>]\n");
}
int main(int argc, char *argv[])
@@ -676,7 +676,8 @@
script_path = get_sieve_path();
- ret = dovecot_sieve_run(storage, mail, script_path, destination);
+ ret = dovecot_sieve_run(storage, mail, script_path, destination,
+ mailbox);
if (ret <= 0) {
/* sieve script didn't handle this. store into inbox. */
i_stream_seek(input, 0);
Index: sieve-cmu.c
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/sieve-cmu.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- sieve-cmu.c 14 Jan 2006 23:25:25 -0000 1.12
+++ sieve-cmu.c 8 Feb 2006 11:39:29 -0000 1.13
@@ -27,6 +27,7 @@
typedef struct {
struct mail *mail;
+ const char *mailbox;
const char *id;
const char *return_path;
const char *authuser;
@@ -252,7 +253,7 @@
get_flags(kc->imapflags, &flags, &keywords);
- if (save_mail(sd->storage, "INBOX", md->mail, flags, keywords) < 0)
+ if (save_mail(sd->storage, md->mailbox, md->mail, flags, keywords) < 0)
return SIEVE_FAIL;
return SIEVE_OK;
@@ -561,7 +562,8 @@
}
int dovecot_sieve_run(struct mail_storage *storage, struct mail *mail,
- const char *script_path, const char *username)
+ const char *script_path, const char *username,
+ const char *mailbox)
{
sieve_interp_t *interp;
sieve_bytecode_t *bytecode;
@@ -592,6 +594,7 @@
memset(&mdata, 0, sizeof(mdata));
mdata.mail = mail;
+ mdata.mailbox = mailbox;
mdata.authuser = username;
mdata.id = mail_get_first_header(mail, "Message-ID");
mdata.return_path = get_return_path(mail);
More information about the dovecot-cvs
mailing list