On Thu, 30 Jul 2009 10:38:51 +0200 Stephan Bosch <step...@rename-it.nl> wrote:
> Nikita Koshikov schreef: > > On Thu, 30 Jul 2009 01:29:26 +0200 > > Stephan Bosch <step...@rename-it.nl> wrote: > >> I am not exactly sure what you mean. Why are you providing an explicit > >> keep command when you want to sort the message further? > > Without keep action - mail just redirected to specified mailbox, but it > > doesn't stores into my inbox. > [..] > > This is my current rule list: > > > > require ["fileinto","envelope","copy"]; > > # rule:[redirect] > > if anyof (true) > > { > > redirect :copy "al...@domain.com"; > > } > > # rule:[Cron] > > elsif anyof (header :contains "Subject" "Cron") > > { > > fileinto "INBOX/Cron"; > > } > > > [..] > > But this mail save into INBOX, for user koshiko...@domain.com, (the second > > rule is not working), in logs I have: > > Jul 30 10:29:04 deliver(koshiko...@domain.com): Info: sieve: > > msgid=<4a714b09.9030...@domain.com>: forwarded to <al...@domain.com> > > Jul 30 10:29:04 deliver(koshiko...@domain.com): Info: sieve: > > msgid=<4a714b09.9030...@domain.com>: stored mail into mailbox 'INBOX' > > Jul 30 10:29:04 deliver(al...@domain.com): Info: sieve: > > msgid=<4a714b09.9030...@domain.com>: stored mail into mailbox 'INBOX' > > > > So :copy acting for me like "keep". Do you have any ideas, why this might > > happen ? > > Yes, your second rule is an elsif, meaning that it is only executed when > the first if-condition is not 'true'. Since that first rule has a forced > 'true' result, the second rule is absolutely never executed. You script > should be: > > require ["fileinto","copy"]; > > # rule:[redirect] > if true > { > redirect :copy "al...@domain.com"; > } > > # rule:[Cron] > if header :contains "Subject" "Cron" > { > fileinto "INBOX/Cron"; > } > > Note that the anyof() commands are only necessary when you have multiple > tests per if command. Also, I removed the envelope require, since it is > not used. Thank you, Stephan. Your example rules works like a charm. > > Regards, > > -- > Stephan Bosch > step...@rename-it.nl