`Spam' folder creation for multiple users
:-)
I've just added pigeonhole and a simple sieve script:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "Spam"; }
If a user has this folder (`Spam') it works fine. If they haven't it results in an error.
- Can I modify the script to create this folder if the need arise?
- If not - what's the most recommended way of adding this folder for all users (~1000)?
Thanks! Best regards, Marek
You can use the "mailbox" extension, and add :create to that rule.
On Sun, Mar 17, 2019 at 1:38 PM Marek Kozlowski via dovecot < dovecot@dovecot.org> wrote:
:-)
I've just added pigeonhole and a simple sieve script:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "Spam"; }
If a user has this folder (`Spam') it works fine. If they haven't it results in an error.
- Can I modify the script to create this folder if the need arise?
- If not - what's the most recommended way of adding this folder for all users (~1000)?
Thanks! Best regards, Marek
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 (c) E-Mail: larryrtx@gmail.com US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106
On 17 March 2019 20:37 Marek Kozlowski via dovecot <dovecot@dovecot.org> wrote:
:-)
I've just added pigeonhole and a simple sieve script:
require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "Spam"; }
If a user has this folder (`Spam') it works fine. If they haven't it results in an error.
- Can I modify the script to create this folder if the need arise?
require ["fileinto","mailbox"]; if header :contains "X-Spam-Flag" "YES" { fileinto :create "Spam"; }
- If not - what's the most recommended way of adding this folder for all users (~1000)?
namespace { inbox = yes
mailbox Spam { special_use = \Spam auto = subscribe }
<other namespace specific options if necessary> }
Thanks! Best regards, Marek
Aki
participants (3)
-
Aki Tuomi
-
Larry Rosenman
-
Marek Kozlowski