From mboxrd@z Thu Jan 1 00:00:00 1970 From: marco-oweber@gmx.de (Marc Weber) Date: Wed, 29 Jul 2009 14:54:11 +0200 Subject: [sup-talk] Handling big mailing lists In-Reply-To: References: Message-ID: <1248871866-sup-9988@nixos> You can use hooks to add labels: my "~/.sup/hooks/before-add-message.rb": def matchR(email) not message.recipients.find{ |to| /^#{email}$/i =~ to.email}.nil? end def matchRAddLabel(email, label, inbox = 0) if matchR email then message.add_label label message.remove_label :inbox unless inbox end end def importantFrom(email) message.add_label :Starred if message.from.email == email end importantFrom "info at webkos.de" matchRAddLabel("mod_python at modpython.org","mod-python", 1) matchRAddLabel("mod_python at modpython.org","mod-python", 0) if message.subj =~ /^Project Notification$/ && message.from.email == "info at guru.com" then message.add_label "GURU_PROJECT_NOTIFICATION" message.add_label "delete_after_one_month" end if message.subj =~ /^WEBKOS_/ then message.remove_label :inbox message.add_label "WEBKOS_" end So adding labels onle if a contsraint is met is easy. About deleting mails: There is sup-sync-back. So there must be a way to delete "old" / whatever mails. I haven't used it yet. I'm new to sup myself. Yours Marc Weber