[pmmail-list] Filters

Brandon King pmmail-list@blueprintsoftwareworks.com
Sat, 06 Apr 2002 13:49:28 -0500


On Sat, 06 Apr 2002 10:29:00 -0800, Abel Jeffcoat wrote:

>Is there a way to filter by date??
>
>For example I want all todays mail to go into a named: 4/6/02

Read the help file under Filters and Canned Replies to find out more about how to assemble filters.

here is an excerpt that explains how to assemble a date filter:

An expression that would match if the date was in 2001 or the message was sent during the work day (after 9 am and before 5 pm) would be defined as follows:

(h.date>"2000-12-31" & h.date<"2002-01-01") | h.time>"09:00:00" & h.time<"17:00:00"

Note: Check the parentheses in this expression, they are very important in defining a complex filter.

To define the opposite of the previous expression (one that matches if the message was NOT sent during business hours and NOT sent in 2001) is easy!  Just take the above and place a NOT (!) symbol in front of the whole thing (and wrap the expression in parentheses) as follows:

! ((h.date>"2000-12-31" & h.date<"2002-01-01") | h.time>"09:00:00" & h.time<"17:00:00")

An alternative to that would be to define the filter outright, as follows:

( (header.date>"2001-12-31") | (header.date<"2001-01-01") ) & ((header.time<"09:00:00") | (header.time>"17:00:00") )

Or even more simply as: 

!h.date="2001" & h.time<"09:00:01" | h.time>"16:59:59"

Brandon King
Wilmington, NC

- pmmail-list - The PMMail Dicussion List ---------------------------
To POST to the list, send your message to:
pmmail-list@blueprintsoftwareworks.com

To UNSUBSCRIBE, send a message to mdaemon@bmtmicro.com with the first 
line of the message body being...
UNSUBSCRIBE pmmail-list@blueprintsoftwareworks.com
---------------------------------------------------------------------