logo       

Re: imap4flags and sieve filter: msg#00077

mail.ims.general

Subject: Re: imap4flags and sieve filter

> Hey folks, I've got a mailstore running:

> Sun Java(tm) System Messaging Server 6.2-6.01 (built Apr 3 2006)
> libimta.so 6.2-6.01 (built 11:15:13, Apr 3 2006)
> SunOS mailstore1 5.10 Generic_125101-10 i86pc i386 i86pc

First, according to RFE 6223716 (Support for setting IMAP flags at message
delivery time using sieve scripts), support for the imap4flags extension wasn't
completed and released until 6.3P1. This may or may not be an issue for you -
if memory serves the reason for this not getting marked as done sooner wasn't
that the code wasn't complete but rather that the underlying specification
hadn't been approved and we were concerned it might change out from under us.
But that didn't happen and the specification has been approved now.

However, since AFAIK QA was never done on this version there could be bugs that
have since been fixed but only in 6.3.

> and I'm trying to enable an MTA sieve filter that files messages that
> are identified as spam into a specific user's folder. That part works
> fine, but I'd also like to flag the message as read rather than unread.
> This part is giving me trouble.

> Here's what the sieve filter looks like:

> require ["fileinto","imap4flags"];

> if allof(header :contains "X-SpamLabel" ["SPAM", "VIRUS"],
> header :contains "X-MailRoute" "InboundMail") {
> fileinto :flags "\Seen" "SPAM";
> }

> This does the appropriate "fileinto" action but doesn't flag the message
> as "read". Am I misunderstanding the functions of the imap4flags
> extensions? Do I have the syntax correct?

The syntax looks fine but the string value is wrong - \ is a literal operator
in Sieve strings so "\Seen" is the same as "Seen". You want "\\Seen" instead.

I'd also suggest that you first try to set some user-defined flag. Only after
you have that working should you try setting a system flag, let alone one
that's fairly "special" in how it operates like \Seen.

Ned



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise