managesieve / sieve - append dot prefix on moving mails into folder

Marc Roos M.Roos at f1-outsourcing.eu
Tue Feb 18 14:47:51 EET 2020


 
Hi Andre,

Would you mind sharing this roundcube plugin? I have been looking for 
something similar also as an example to code one for a different 
purpose. 



-----Original Message-----
Sent: 18 February 2020 12:41
To: dovecot at dovecot.org
Subject: managesieve / sieve - append dot prefix on moving mails into 
folder


Hello mailinglist-subscribers,

i have an issue with the managesieve / sieve plugin in dovecot.

We use roundcube as webmailer and if i define a new filter to move 
incoming mails directly into a subfolder i get the following sieve-code:

require ["fileinto","imap4flags"];
# rule:[mail into folder]
if allof (header :contains "from" "sender at domain.org") {
	fileinto "Foldername";
	setflag "\\Seen";
}

So anything seems to be right and there are no errors on creating the 
correct syntax.

But if a mail comes from the named sender, sieve does not put the email 
in the folder "Foldername" but ".Foldername".
It appends a dot (.) in front of the name and i have no idea, why this 
happens. There are no errors in logfile and all mails go into the 
.Folder.

Maybe it is wrong separator for mailbox, at the moment there is no 
separator defined in "10-mail.conf" and we use "Maildir" as 
mail_location.

I have also tried to change the target folder in sieve script an named 
him "INBOX/Monitoring" - as subfolder of INBOX but than i get an error 
in .dovecot.sieve.log with message:

Invalid mailbox name: Name must not have '/' characters.

I edited the new rule with roundcube / managesieve-plugin and maybe this 
needs separate configuration because of separator in foldernames?
Please let me know if i should provide any extra information or dovecot 
configuration etc.

best regards
Andre Hoepner




More information about the dovecot mailing list