From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.240.136 with SMTP id la8cs64178icb; Thu, 3 Feb 2011 16:09:07 -0800 (PST) Received: by 10.150.51.14 with SMTP id y14mr3768679yby.96.1296778146697; Thu, 03 Feb 2011 16:09:06 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id k19si119617vcr.157.2011.02.03.16.09.06; Thu, 03 Feb 2011 16:09:06 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 2BEBB18581F3; Thu, 3 Feb 2011 19:09:06 -0500 (EST) Received: from kuovi.tilus.net (kuovi.tilus.net [80.68.89.168]) by rubyforge.org (Postfix) with ESMTP id DE1C61858354 for ; Thu, 3 Feb 2011 18:01:40 -0500 (EST) Received: by kuovi.tilus.net (Postfix, from userid 1000) id 034181F4E3; Fri, 4 Feb 2011 01:01:39 +0200 (EET) From: Tero Tilus To: Sup users In-reply-to: <1296746458-sup-2021@plc.intranet.plecavalier.com> References: <1296746458-sup-2021@plc.intranet.plecavalier.com> Date: Fri, 04 Feb 2011 01:01:39 +0200 Message-Id: <1296771606-sup-3188@tilus.net> User-Agent: Sup/git Subject: Re: [sup-talk] New User Hooks Details X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org Philippe LeCavalier, 2011-02-03 17:58: > One bit of info that seems odd to me is when I issue 'sup -l' the > hooks listed are nowhere to be found in the hooks folder yet they > appear to be working. Is that normal? The `sup -l` lists all the hooks sup looks for upon start. If a hook file exists, sup loads it and calls the ruby code in the file the way documented in `sup -l`. > # Mark Lists > addressfile = File.open("/home/plecavalier/.sup/hooks/label.lists","r") > if ! addressfile.grep(/#{message.list_address}/).empty? > message.add_label :lists > end Looks sound on the surface. This is your ~/.sup/hooks/before-add-message.rb? New mails coming from mailinglists listed in label.lists don't get lists-tag? You could add some logging and see whats going on. debug "before-add-message" File.open("/home/plecavalier/.sup/hooks/label.lists") do |addressfile| unless addressfile.grep(/#{message.list_address}/).empty? debug "list message #{message.id.inspect}" message.add_label :lists else debug "non-list message #{message.id.inspect}" end end Then $ SUP_LOG_LEVEL=debug sup and wait for incoming mail or temporarily use another SUP_BASE (than $HOME/.sup) with a sources.yaml pointing to a test corpus of mails. Debug output goes to log buffer. -- Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/ _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk