Hello community, here is the log from the commit of package imapfilter checked in at Fri Oct 5 15:57:26 CEST 2007. -------- --- imapfilter/imapfilter.changes 2007-09-28 08:54:17.000000000 +0200 +++ /mounts/work_src_done/STABLE/imapfilter/imapfilter.changes 2007-10-05 11:26:22.000000000 +0200 @@ -1,0 +2,11 @@ +Fri Oct 5 11:25:05 CEST 2007 - mmaher@suse.de + +- update to version 2.0.5 which: + * Bug fix; an error in the sample extensions file. + * Bug fix; typo errors in the manual page. + * The documentation was updated with details and examples on how to + access mailboxes inside folders. + * Examples were added on how to define composite filters that include + multiple searching rules. + +------------------------------------------------------------------- Old: ---- imapfilter-2.0.4.tar.bz2 New: ---- imapfilter-2.0.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ imapfilter.spec ++++++ --- /var/tmp/diff_new_pack.Q26215/_old 2007-10-05 15:57:08.000000000 +0200 +++ /var/tmp/diff_new_pack.Q26215/_new 2007-10-05 15:57:08.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package imapfilter (Version 2.0.4) +# spec file for package imapfilter (Version 2.0.5) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -14,7 +14,7 @@ BuildRequires: lua-devel openssl-devel pcre-devel pkgconfig Requires: lua-libs >= 5.1 Summary: a mail filtering utility -Version: 2.0.4 +Version: 2.0.5 Release: 1 License: X11/MIT Group: Productivity/Networking/Email/Utilities @@ -60,6 +60,14 @@ %{_mandir}/man1/imapfilter.1.gz %{_mandir}/man5/imapfilter_config.5.gz %changelog +* Fri Oct 05 2007 - mmaher@suse.de +- update to version 2.0.5 which: + * Bug fix; an error in the sample extensions file. + * Bug fix; typo errors in the manual page. + * The documentation was updated with details and examples on how to + access mailboxes inside folders. + * Examples were added on how to define composite filters that include + multiple searching rules. * Fri Sep 28 2007 - mskibbe@suse.de - update to version 2.0.4 which * Bug fix; the send_query() method didn't return the special ++++++ imapfilter-2.0.4.tar.bz2 -> imapfilter-2.0.5.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/imapfilter-2.0.4/imapfilter_config.5 new/imapfilter-2.0.5/imapfilter_config.5 --- old/imapfilter-2.0.4/imapfilter_config.5 2007-09-28 00:03:58.000000000 +0200 +++ new/imapfilter-2.0.5/imapfilter_config.5 2007-10-04 21:31:55.000000000 +0200 @@ -1,4 +1,4 @@ -.Dd September 27, 2007 +.Dd Octomber 4, 2007 .Dt IMAPFILTER_CONFIG 5 .Os .Sh NAME @@ -24,7 +24,7 @@ .Pp A brief description of the Lua values and types mentioned hereafter in the manual page follows: -.Bl -item -offset indent +.Bl -item -offset 4n .It The .Vt nil @@ -61,7 +61,7 @@ .Vt table named ``options'' , in the following manner: -.Bd -literal -offset indent +.Bd -literal -offset 4n options.timeout = 120 options.namespace = false .Ed @@ -135,7 +135,7 @@ .Fn IMAP function, and the details of the connection are defined using an account .Vt table : -.Bd -literal -offset indent +.Bd -literal -offset 4n myaccount = IMAP { server = 'imap.mail.server', username = 'me', @@ -262,9 +262,9 @@ .El .Pp Examples: -.Bd -literal -offset indent +.Bd -literal -offset 4n mailboxes, folders = myaccount:list_subscribed('myfolder') -mailboxes, folders = myaccount:list_all('myfolder', '*') +mailboxes, folders = myaccount:list_all('myfolder/mysubfolder', '*') .Ed .Ss MANIPULATING The following methods can be used to manipulate mailboxes in an account: @@ -304,24 +304,31 @@ .El .Pp Examples: -.Bd -literal -offset indent +.Bd -literal -offset 4n myaccount:create_mailbox('mymailbox') myaccount:subscribe_mailbox('mymailbox') +myaccount:unsubscribe_mailbox('myfolder/mymailbox') +myaccount:delete_mailbox('myfolder/mymailbox') .Ed .Sh MAILBOX After an IMAP account has been initialized, mailboxes residing in that account can be accessed simply as elements of the account .Vt table : -.Bd -literal -offset indent +.Bd -literal -offset 4n myaccount.mymailbox .Ed .Pp If mailbox names don't only include letters, digits and underscores, or begin with a digit, an alternative form must be used: -.Bd -literal -offset indent +.Bd -literal -offset 4n myaccount['mymailbox'] .Ed .Pp +A mailbox inside a folder can be only accessed by using the alternative form: +.Bd -literal -offset 4n +myaccount['myfolder/mymailbox'] +.Ed +.Pp The methods that are available for an account (eg. .Fn list_all , .Fn create_mailbox , @@ -340,7 +347,7 @@ .Vt number type: the total number of messages, the number of recent messages and the number of unseen messages in the mailbox. -.Bd -literal -offset indent +.Bd -literal -offset 4n exist, unread, unseen = myaccount.mymailbox:check_status() .Ed .El @@ -356,19 +363,19 @@ logical ``or'', logical ``and'' and logical ``not''. .Pp The logical ``or'' is implemented using the `+' operator: -.Bd -literal -offset indent +.Bd -literal -offset 4n messages = myaccount.mymailbox:is_unseen() + myaccount.mymailbox:is_larger(100000) .Ed .Pp The logical ``and'' is implemented using the `*' operator: -.Bd -literal -offset indent +.Bd -literal -offset 4n messages = myaccount.mymailbox:is_unseen() * myaccount.mymailbox:is_larger(100000) .Ed .Pp The logical ``not'' is implemented using the `-' operator: -.Bd -literal -offset indent +.Bd -literal -offset 4n messages = myaccount.mymailbox:is_unseen() - myaccount.mymailbox:is_larger(100000) .Ed @@ -377,27 +384,49 @@ ``and'' has higher precedence than the logical ``or'' and the logical ``not'', with the latter two having the same precedence, and parentheses may be used to change this behaviour: -.Bd -literal -offset indent +.Bd -literal -offset 4n messages = myaccount.mymailbox:is_unseen() + myaccount.mymailbox:is_larger(100000) * - myaccount.mymailbox:contains_subject('test') + myaccount.mymailbox:contain_subject('test') messages = ( myaccount.mymailbox:is_unseen() + myaccount.mymailbox:is_larger(100000) ) * - myaccount.mymailbox:contains_subject('test') + myaccount.mymailbox:contain_subject('test') .Ed .Pp The returned .Vt tables of the searching methods can also be stored in variables and then further processed: -.Bd -literal -offset indent +.Bd -literal -offset 4n unseen = myaccount.myaccount:is_unseen() larger = myaccount.mymailbox:is_larger(100000) -subject = myaccount.mymailbox:contains_subject('test') +subject = myaccount.mymailbox:contain_subject('test') messages = unseen + larger * subject .Ed .Pp +A composite filter that includes one or more simple rules can be defined: +.Bd -literal -offset 4n +myfilter = function () + return myaccount.mymailbox:is_unseen() + + myaccount.mymailbox:is_larger(100000) * + myaccount.mymailbox:contain_subject('test') + end + +messages = myfilter() +.Ed +.Pp +Composite filters can may be more dynamic by adding arguments: +.Bd -literal -offset 4n +myfilter = function (mailbox, size, subject) + return mailbox:is_unseen() + + mailbox:is_larger(size) * + mailbox:contain_subject(subject) + end + +messages = myfilter(myaccount.mailbox, 100000, 'test') +.Ed +.Pp The following methods can be used to search for messages that are in a specific state: .Pp @@ -697,12 +726,12 @@ .El .Pp Examples: -.Bd -literal -offset indent +.Bd -literal -offset 4n messages = myaccount.mymailbox:is_new() messages = myaccount.mymailbox:is_recent() messages = myaccount.mymailbox:is_larger(100000) messages = myaccount.mymailbox:is_older(10) -messages = mymailbox.mymailbox:has_flag('MyFlag') +messages = myaccount.mymailbox:has_flag('MyFlag') messages = myaccount.mymailbox:arrived_before('01-Jan-2007') messages = myaccount.mymailbox:sent_since('01-Jan-2007') messages = myaccount.mymailbox:contain_subject('test') @@ -712,6 +741,9 @@ messages = myaccount.mymailbox:match_message('^[Hh]ello world!?$') messages = myaccount.mymailbox:select_all() messages = myaccount.mymailbox:send_query('ALL', 'ISO-8859-1') + +messages = myaccount['mymailbox']:is_new() +messages = myaccount['myfolder/mymailbox']:is_recent() .Ed .Ss PROCESSING The following method can be used to delete messages in a mailbox: @@ -848,7 +880,7 @@ .El .Pp Examples: -.Bd -literal -offset indent +.Bd -literal -offset 4n myaccount.mymailbox:delete_messages(messages) myaccount.mymailbox:copy_messages(myaccount.othermailbox, messages) myaccount.mymailbox:move_messages(otheraccount.mymailbox, messages) @@ -856,6 +888,12 @@ myaccount.mymailbox:unmark_flagged(messages) myaccount.mymailbox:add_flags({ 'MyFlag', '\\\\Seen' }, messages) myaccount.mymailbox:remove_flags({ '\\\\Seen' }, messages) + +myaccount['mymailbox']:delete_messages(messages) +myaccount['myfolder/mymailbox']:copy_messages(myaccount.othermailbox, + messages) +myaccount.mymailbox:move_messages(otheraccount['myfolder/mymailbox'], + messages) .Ed .Ss FETCHING .Pp @@ -923,9 +961,12 @@ .El .Pp Examples: -.Bd -literal -offset indent +.Bd -literal -offset 4n myaccount.mymailbox:fetch_message(messages) myaccount.mymailbox:fetch_fields({ 'from', 'subject' }, messages) + +myaccount['mymailbox']:fetch_message(messages) +myaccount['myfolder/mymailbox']:fetch_message(messages) .Ed .Sh FUNCTIONS The following auxiliary functions are also available for convenience: @@ -997,7 +1038,7 @@ .El .Pp Examples: -.Bd -literal -offset indent +.Bd -literal -offset 4n date = form_date(14) password = get_password('Enter password: ') become_daemon(600, myfunction) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/imapfilter-2.0.4/NEWS new/imapfilter-2.0.5/NEWS --- old/imapfilter-2.0.4/NEWS 2007-09-28 00:03:58.000000000 +0200 +++ new/imapfilter-2.0.5/NEWS 2007-10-04 21:31:55.000000000 +0200 @@ -1,3 +1,12 @@ +Version 2.0.5 - 4 October 2007 +------------------------------ +- Bug fix; an error in the sample extensions file. +- Bug fix; typo errors in the manual page. +- The documentation was updated with details and examples on how to access + mailboxes inside folders. +- Examples were added on how to define composite filters that include multiple + searching rules. + Version 2.0.4 - 27 September 2007 --------------------------------- - Bug fix; the send_query() method didn't return the special form of table that diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/imapfilter-2.0.4/README new/imapfilter-2.0.5/README --- old/imapfilter-2.0.4/README 2007-09-28 00:03:58.000000000 +0200 +++ new/imapfilter-2.0.5/README 2007-10-04 21:31:55.000000000 +0200 @@ -1,4 +1,4 @@ -IMAPFilter Version 2.0.4 +IMAPFilter Version 2.0.5 ======================== Requirements diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/imapfilter-2.0.4/sample.config.lua new/imapfilter-2.0.5/sample.config.lua --- old/imapfilter-2.0.4/sample.config.lua 2007-09-28 00:03:58.000000000 +0200 +++ new/imapfilter-2.0.5/sample.config.lua 2007-10-04 21:31:55.000000000 +0200 @@ -80,21 +80,21 @@ -- Delete messages. account1.INBOX:delete_messages(result) --- Get messages with the specified "Subject" header and a size less than --- 50000 octets (bytes). -result = account1.INBOX:contain_subject('[patch]') * - account1.INBOX:is_smaller(50000) - --- Move messages between mailboxes at the same account. -account1.INBOX:move_messages(account1.patch, result) - -- Get messages with the specified "Sender" header, which are older than -- 30 days. -result = account1.INBOX:contain_field('sender', 'owner@mailling-ist') * +result = account1.INBOX:contain_field('sender', 'owner@announce-list') * account1.INBOX:is_older(30) --- Move messages between mailboxes at a different account. -account1.INBOX:move_messages(account2.INBOX, result) +-- Move messages to the "announce" mailbox inside the "lists" folder. +account1.INBOX:move_messages(account1['lists/announce'], result) + +-- Get messages, in the "devel" mailbox inside the "lists" folder, with the +-- specified "Subject" header and a size less than 50000 octets (bytes). +result = account1['lists/devel']:contain_subject('[patch]') * + account1['lists/devel']:is_smaller(50000) + +-- Move messages from the "devel" mailbox inside the "lists" folder. +account1['lists/devel']:move_messages(account2.patch, result) -- Get recent, unseen messages, that have either one of the specified -- "From" headers, but do not have the specified pattern in the body of diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/imapfilter-2.0.4/sample.extend.lua new/imapfilter-2.0.5/sample.extend.lua --- old/imapfilter-2.0.4/sample.extend.lua 2007-09-28 00:03:58.000000000 +0200 +++ new/imapfilter-2.0.5/sample.extend.lua 2007-10-04 21:31:55.000000000 +0200 @@ -36,7 +36,7 @@ result = {} for msgid, msgtxt in pairs(messages) do if (pipe_to('bayesian-spam-filter', msgtxt) == 1) then - table.insert(result, msgid) + result[msgid] = true end end diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/imapfilter-2.0.4/version.h new/imapfilter-2.0.5/version.h --- old/imapfilter-2.0.4/version.h 2007-09-28 00:03:58.000000000 +0200 +++ new/imapfilter-2.0.5/version.h 2007-10-04 21:31:55.000000000 +0200 @@ -3,7 +3,7 @@ /* Program's version number. */ -#define IMAPFILTER_VERSION "2.0.4" +#define IMAPFILTER_VERSION "2.0.5" /* Program's copyright. */ #define IMAPFILTER_COPYRIGHT "Copyright (c) 2001-2007 Lefteris Chatzimparmpas" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org