[Dovecot] sieve fileinto rule (pigeonhole)
Hello,
i discovered that when a sieve rule "fileinto drawer;" tries to deliver a mail into a non existent drawer, the drawer gets created. This is neat, but is there also a way to automatically subcribe to the created folder ?
Regards, Oliver Eales
Oliver Eales wrote:
Hello,
i discovered that when a sieve rule "fileinto drawer;" tries to deliver a mail into a non existent drawer, the drawer gets created. This is neat, but is there also a way to automatically subcribe to the created folder ?
Yes, but not explicitly through some Sieve command. You must use the -s deliver parameter:
http://wiki.dovecot.org/LDA#Parameters
You can disable the implicit auto-creation with the -n parameter. You can then use Sieve's mailbox extension (http://ietfreport.isoc.org/idref/rfc5490/#page-2) to :create folders explicitly upon fileinto. However, -s is always necessary to subscribe to the newly created folder. Also note that IMAP clients will not instantly notice the newly created and subscribed folder, since IMAP has no (default) means for sending a notification of such an event.
Regards,
Stephan.
Stephan Bosch schrieb:
Yes, but not explicitly through some Sieve command. You must use the -s deliver parameter:
Thanks for the answer, i should have read the wiki more carefully. :-) I tried it with the -s parameter, but it is only working when the mailbox name is given as a parameter via -m When i do
/usr/lib/dovecot/deliver -m "bla2" -s -d 1000000000032 <~/test.eml
the mailbox bla2 gets created and subscribed to. but when i leave out the -m and take the mailbox from the sieve script the subsription isn't done.
require ["fileinto", "mailbox"]; if header :contains ["Subject"] "bla2" { fileinto :create "bla2"; stop; } and then
/usr/lib/dovecot/deliver -s -d 1000000000032 <~/test.eml
the mailbox gets created but not subscribed to. (I didn't make any difference if i use the :create sieve command or leave or it out)
Am i doing something wrong ?
Thanks in advance, Oliver Eales
Oliver Eales wrote:
Thanks for the answer, i should have read the wiki more carefully. :-) I tried it with the -s parameter, but it is only working when the mailbox name is given as a parameter via -m When i do
/usr/lib/dovecot/deliver -m "bla2" -s -d 1000000000032 <~/test.eml
the mailbox bla2 gets created and subscribed to. but when i leave out the -m and take the mailbox from the sieve script the subsription isn't done.
require ["fileinto", "mailbox"]; if header :contains ["Subject"] "bla2" { fileinto :create "bla2"; stop; } and then
/usr/lib/dovecot/deliver -s -d 1000000000032 <~/test.eml
the mailbox gets created but not subscribed to. (I didn't make any difference if i use the :create sieve command or leave or it out)
Am i doing something wrong ?
Not that I can see. I've tested the behavior at my end and all works well. Note that the subscription is only performed when the folder is actually created, not when it already exists. I must say, if this is truly a bug somehow, I am not quite sure how to debug this. You should post your dovecot -n output here so that we can check your config.
Timo, any ideas?
Regards,
Stephan.
Stephan Bosch schrieb:
Oliver Eales wrote:
the mailbox gets created but not subscribed to. (I didn't make any difference if i use the :create sieve command or leave or it out)
Am i doing something wrong ?
Not that I can see. I've tested the behavior at my end and all works well. Note that the subscription is only performed when the folder is actually created, not when it already exists. I must say, if this is truly a bug somehow, I am not quite sure how to debug this. You should post your dovecot -n output here so that we can check your config. Hello Stephan, sorry for the false alarm. I tried to reproduce it today and everything was working. No clue what i messed up last time...
Thanks for your help!
Regards, Oliver Eales
participants (2)
-
Oliver Eales
-
Stephan Bosch