[imapfilter-devel]archiving with imapfilter
Lefteris Chatzibarbas
lefcha at hellug.gr
Mon Mar 3 20:12:01 EET 2003
On Mon, Mar 03, 2003 at 02:08:18AM +0100, Martin Kaehmer wrote:
> Hi Lefteris,
>
> I'm using imapfilter for some time now and I'm quite happy with it. But I
> still miss some functionality. Have you ever thought about a real archiving
> function? I'd like to have a move action for something like "for all mail
> older then N days move to folder 'folder.archive.%y.%m'", where %y(ear),
> %m(onth), %w(eek) and %d(ay) are macros for the date of the current mail.
> Likewise the capital macros (%Y,%M..)for the date of today?
>
> What do you think?
A part of the functionality you are describing, exists in the CVS version of
imapfilter, for quite some time now.
Basically, you can use all the date and time (useless?) conversion
specifiers (%d, %m, %y, etc.) as described in strftime(3), when doing a
(r)copy/(r)move. These specifiers are getting replaced according to the
current system time. For example:
filter foo
from qux-mail-list at example.org
move qux-%y_%m
... would append all matching messages to a mailbox "qux-2003_03" (during this
month).
On the other hand, imapfilter sends searching queries, it doesn't process
each message exclusively, so it cannot sort messages to folders the way you
describe (it is not impossible but difficult and inefficient, based on how
the program exploits the IMAP4rev1 protocol's capabilities).
I couldn't come up with a good way to accomplish something like this.
Suggestions anyone?
More information about the Imapfilter-devel
mailing list