Imapsieve FLAG cause executes a pipe call twice
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
On 24/12/2020 15:06, DocMAX wrote:
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?
I don't think this is just one event causing several conflicting actions to be performed. I'd say Thunderbird is doing this. You should obtain a rawlog for the IMAP session to see what Thunderbird is doing.
Regards,
Stephan.
On 2021-01-06 12:57, Stephan Bosch wrote:
On 24/12/2020 15:06, DocMAX wrote:
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
I expected 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?
I don't think this is just one event causing several conflicting actions to be performed. I'd say Thunderbird is doing this. You should obtain a rawlog for the IMAP session to see what Thunderbird is doing.
is Thunderbird running with trust spamassassin headers ?, if so turn it off :=)
scenario i think happen above that users says its spam, but Thunderbird reload msg again and set it to not spam, based on spamassassin headers
sorry only a guess
participants (3)
-
Benny Pedersen
-
DocMAX
-
Stephan Bosch