I have this setup:
??? imapsieve_mailbox1_name = *
??? imapsieve_mailbox1_causes = FLAG
??? imapsieve_mailbox1_before = file:~/sieve/learn-flag.sieve
Now if i change the SPAM flag i can see:
Dez 24 14:49:08 server dovecot[219886]:
imap(docmax)<221469><BStCETa3fMzAqAEB>: Debug: imapsieve: mailbox
Junk-E-Mail/dziennik.pl: FLAG event (changed flags: NonJunk)
Dez 24 14:49:08 server dovecot[219886]:
imap(docmax)<221469><BStCETa3fMzAqAEB>: Debug: imapsieve: Matched
static
mailbox rule [1]
Dez 24 14:49:08 server dovecot[219886]:
imap(docmax)<221469><BStCETa3fMzAqAEB>: Debug: imapsieve: mailbox
Junk-E-Mail/dziennik.pl: FLAG event (changed flags: Junk)
Dez 24 14:49:08 server dovecot[219886]:
imap(docmax)<221469><BStCETa3fMzAqAEB>: Debug: imapsieve: Matched
static
mailbox rule [1]
Dez 24 14:49:11 server dovecot[219886]:
imap(docmax)<221469><BStCETa3fMzAqAEB>: Debug: imapsieve: mailbox
Junk-E-Mail/dziennik.pl: FLAG event (changed flags: Junk)
Dez 24 14:49:11 server dovecot[219886]:
imap(docmax)<221469><BStCETa3fMzAqAEB>: Debug: imapsieve: Matched
static
mailbox rule [1]
Dez 24 14:49:11 server dovecot[219886]:
imap(docmax)<221469><BStCETa3fMzAqAEB>: Debug: imapsieve: mailbox
Junk-E-Mail/dziennik.pl: FLAG event (changed flags: NonJunk)
And my script is:
require [ "variables" , "imap4flags", "fileinto",
"vnd.dovecot.pipe",
"copy", "imapsieve", "vnd.dovecot.execute" ];
if hasflag :is "Junk" {
??? pipe :copy "rspam-spam";
??? stop;
}
if hasflag :is "NonJunk" {
??? pipe :copy "rspam-ham";
??? stop;
}
Dez 24 15:05:24 server dovecot[222484]:
imap(docmax)<224089></EW5RDa3UMPAqAEB>: Debug: sieve: action pipe:
running program: rspam-spam
Dez 24 15:05:24 server dovecot[222484]:
imap(docmax)<224089></EW5RDa3UMPAqAEB>: Debug: sieve: action pipe:
running program: rspam-ham
Dez 24 15:05:27 server dovecot[222484]:
imap(docmax)<224089></EW5RDa3UMPAqAEB>: Debug: sieve: action pipe:
running program: rspam-spam
Dez 24 15:05:27 server dovecot[222484]:
imap(docmax)<224089></EW5RDa3UMPAqAEB>: Debug: sieve: action pipe:
running program: rspam-spam
Dez 24 15:05:32 server dovecot[222484]:
imap(docmax)<224089></EW5RDa3UMPAqAEB>: Debug: sieve: action pipe:
running program: rspam-spam
Dez 24 15:05:32 server dovecot[222484]:
imap(docmax)<224089></EW5RDa3UMPAqAEB>: Debug: sieve: action pipe:
running program: rspam-ham
Dez 24 15:05:36 server dovecot[222484]:
imap(docmax)<224089></EW5RDa3UMPAqAEB>: Debug: sieve: action pipe:
running program: rspam-spam
Dez 24 15:05:36 server dovecot[222484]:
imap(docmax)<224089></EW5RDa3UMPAqAEB>: Debug: sieve: action pipe:
running program: rspam-spam
I espected to have only ONE pipe when i change flag (in Thunderbird).
Instead i get multiple calls. Why is that and how can i fix it?
Regards,
DocMAX