On 2019-03-07 02:52, Michael Goth via dovecot wrote:
require ["fileinto"]; # rule:[SPAM] if header :contains "subject" "SPAMSPAM" { fileinto "SPAM"; } # rule:[SPAMSPAM] if header :contains "subject" "SPAM" { fileinto "MaybeSPAM"; }
But when I receive a message with subject "SPAMSPAM", the message turns up in "SPAM" and "MaybeSPAM". Is this expected behaviour?
You are missing a stop after the fileinto. Otherwise it will not stop, but rather processing the next rule as well.
Change it to:
require ["fileinto"]; # rule:[SPAM] if header :contains "subject" "SPAMSPAM" { fileinto "SPAM"; stop; } # rule:[SPAMSPAM] if header :contains "subject" "SPAM" { fileinto "MaybeSPAM"; stop; }
Cheers, K. C.
-- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944
/* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */