Thanks!
I had :create on 90% of the filters but it was missing on a few, added it on the rest and now everything is working perfectly.
Thanks a lot for the help
Regards Isak
2013/4/3 Robert Schetterer rs@sys4.de
Am 03.04.2013 14:59, schrieb Isak Rubin:
# egrep -rn lda_mailbox_autocreate /etc/dovecot/conf.d/ /etc/dovecot/conf.d/15-lda.conf:41:lda_mailbox_autocreate = yes
if header :regex "From" "([a-zA-Z0-9._%+-]+)(@)([a-zA-Z0-9._%+-]+)" { set :lower "person" "${1}"; set :lower "domain" "${3}"; fileinto "INBOX/bydomain/${domain}/${person}"; stop; }
Robert: Autocreate works fine using lda, the issue here is when running sieve filters manually using sieve-filter When receiving mails they are sorted and created and everything works fine, but I need to be able to manually execute sieve scripts on some folders, and that's when it seems unable to autocreate.
But i guess lda_mailbox_autocreate is not used at all when running sieve-filter manually, as i assume it just bypass the lda all together
try fileinto :create .....
http://wiki2.dovecot.org/Pigeonhole/Sieve/Examples
i.e like
require ["variables","date","fileinto","mailbox"];
# Extract date info if currentdate :matches "year" "*" { set "year" "${1}"; } if currentdate :matches "month" "*" { set "month" "${1}"; }
# Archive Dovecot mailing list items by year and month. # Create folder when it does not exist. if header :is "list-id" "dovecot.dovecot.org" { fileinto :create "INBOX.Lists.${year}.${month}.dovecot"; }
Regards Isak
2013/4/3 Robert Schetterer rs@sys4.de
Am 03.04.2013 14:40, schrieb Isak Rubin:
Thanks :) Solved the filtering problem
but got a new problem.
Filtering now works as expected, but only to existing folders.
I tried moving the autocreate plugin to a global level but still does
not
seem to work.
Regards Isak
die you use
fileinto :create in the sieve rule ?
what is lda_mailbox_autocreate set ?
else read i.e
-m <mailbox>: Destination mailbox (default is INBOX). If the mailbox doesn't exist, it will not be created (unless the lda_mailbox_autocreate setting is set to yes). If message couldn't be saved to the mailbox for any reason, it's delivered to INBOX instead.
If Sieve plugin is used, this mailbox is used as the "keep" action's
mailbox. It's also used if there is no Sieve script or if the script fails for some reason.
Deliveries to namespace prefix will result in saving the mail to
INBOX instead. For example if you have "Mail/" namespace, this allows you to specify dovecot-lda -m Mail/$mailbox where mail is stored to Mail/$mailbox or to INBOX if $mailbox is empty.
The mailbox name is specified the same as it's visible in IMAP
client. For example if you've a Maildir with .box.sub/ directory and your namespace configuration is prefix=INBOX/, separator=/, the correct way to deliver mail there is to use -m INBOX/box/sub
2013/4/3 Stephan Bosch stephan@rename-it.nl
Op 4/3/2013 1:56 PM, Isak Rubin schreef:
Here you go
You're using the listescape plugin. Try putting that in the global mail_plugins setting, e.g.:
# usually located in /etc/dovecot/conf.d/10-mail.**conf mail_plugins = listescape
protocol lda { mail_plugins = $mail_plugins sieve autocreate } protocol imap { mail_plugins = $mail_plugins autocreate }
Regards,
Stephan.
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich