[imapfilter-devel] Imapfilter sometimes doesn't filter

Ezsra McDonald ezsra_mcdonald at yahoo.com
Mon Jul 26 17:14:24 EEST 2004


David,
I saw a similar problem even in the versions before imapfilter 1.0. My
observation was that if a imapfilter was executed and before it was
complete a message was delivered into INBOX the message might get
filtered by the wrong filter.

Say I have these filters:

1. Filter all mail from friend at yahoo.com to folder friends.
2. Move all remaining mail to Junk folder.

If imapfilter is executed and a message is delivered from
friend at yahoo.com between the after the execution of filter 1 but before
execution of filter 2 it would get filed into the junk folder.

My solution was to move all mail from INBOX to a folder named ztmp. This
way the folder contents would not change during the filtering process. I
then ran all my filters on the contents of the ztmp folder so I would
not have this problem.

--Ezsra

On Sat, 2004-07-24 at 16:42, David DeSimone wrote:
> I have had some good success with imapfilter, but I still occasionally
> see messages not being filtered correctly.  Since it is a very
> occasional problem (perhaps once every day or two), I am not keen to
> leave debug output turned on forever, especially since the behavior I
> see is not repeatable.  I am curious, though, if others see the same.
> 
> In my configuration, my incoming mail is delivered to INBOX of course. 
> However, I want to have my mail sorted into various folders before I
> read it.  That way, messages are prioritized, and I don't have to keep
> figuring out which mail is list-mail, and which is for me personally. 
> My solution is to have imapfilter take all mail in INBOX, filter it into
> various folders, and then put all the remaining unfiltered messages into
> another folder called "Default".  I then tell my IMAP mail client to
> watch this Default folder instead of INBOX.  That way, I never see
> unfiltered mail.
> 
> Here's my config:
> 
> -- Some details ommitted.
> 
>     options.timeout	= 120
>     options.uid		= true
>     options.starttls	= true
> 
>     exists, recent, unseen = check(account, "INBOX")
> 
>     if (exists > 0)
>     then
> 
> -- Filter list-mail to another folder
> 
> 	query =
> 	{
> 	    {
> 		'header "List-Id" "cnet-admin.verio.net"',
> 		'header "List-Id" "firewall-support.verio.net"'
> 	    }
> 	}
> 
> 	results = match(account, "INBOX", query)
> 
> 	if (results ~= nil)
> 	then
> 	    move(account, "INBOX", account, "network", results)
> 	end
> 
> -- Move remaining messages into the default mailbox.
> 
> 	results = match(account, "INBOX", {})
> 
> 	if (results ~= nil)
> 	then
> 	    move(account, "INBOX", account, "Default", results)
> 	end
>     end
> 
> 
> This works nearly every time.  However, occasionally a message for
> cnet-admin will show up in my Default folder.  If I simply move the
> message back to INBOX, the next time imapfilter runs, it will put the
> message into the "network" folder where it should have gone.  Since I
> don't modify the message, I fail to understand how it missed being
> filtered the first time.
-- 
Ezsra McDonald

......................................................................

Linux is like a wigwam -- no Gates, no Windows, and an Apache inside.

CONFIDENTIALITY NOTICE:
This E-mail and any attachments are confidential.  If you are not the
intended recipient, you do not have permission to disclose, copy,
distribute, or open any attachments.  If you have received this E-mail
in error, please notify us immediately by returning it to the sender 
and delete this copy from your system.




More information about the Imapfilter-devel mailing list