Andre Hoepner - i.based: Systemhaus GmbH + Co. KG
2020-Feb-18 11:40 UTC
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3404 bytes Desc: S/MIME Cryptographic Signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20200218/e83d4dc4/attachment.p7s>
Marc Roos
2020-Feb-18 12:47 UTC
managesieve / sieve - append dot prefix on moving mails into folder
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
Martin Johannes Dauser
2020-Feb-18 13:19 UTC
managesieve / sieve - append dot prefix on moving mails into folder
Hallo! If you didn't define a separator it's default is "." . So you would need to change "INBOX/Monitoring" to "INBOX.Monitoring" to be accepted. And 10-mail.conf needs a "prefix=INBOX." --note the dot as a separator at the end. Hope this helps Martin On Tue, 2020-02-18 at 12:40 +0100, Andre Hoepner - i.based: Systemhaus GmbH + Co. KG wrote:> 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 >
Martin Johannes Dauser
2020-Feb-18 13:29 UTC
managesieve / sieve - append dot prefix on moving mails into folder
On Tue, 2020-02-18 at 14:19 +0100, Martin Johannes Dauser wrote:> Hallo! > > If you didn't define a separator it's default is "." . So you would need > to change "INBOX/Monitoring" to "INBOX.Monitoring" to be accepted. > > And 10-mail.conf needs a "prefix=INBOX." --note the dot as a separator > at the end.It might be, that prefix is empty, which should be valid too. But then you need to modify your sieve rule. Not 100% sure but I guess: fileinto "INBOX.Foldername";> > > Hope this helps > Martin > > On Tue, 2020-02-18 at 12:40 +0100, Andre Hoepner - i.based: Systemhaus > GmbH + Co. KG wrote: > > 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 > >