From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.240.136 with SMTP id la8cs112259icb; Fri, 4 Feb 2011 18:41:21 -0800 (PST) Received: by 10.229.81.11 with SMTP id v11mr8939877qck.152.1296873680303; Fri, 04 Feb 2011 18:41:20 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id m11si2851813qcu.117.2011.02.04.18.41.19; Fri, 04 Feb 2011 18:41:20 -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 2C5641D783E1; Fri, 4 Feb 2011 21:41:19 -0500 (EST) Received: from plecavalier.com (plecavalier.com [64.40.149.83]) by rubyforge.org (Postfix) with ESMTP id C7C53185837F for ; Fri, 4 Feb 2011 21:16:01 -0500 (EST) Received: (qmail 28580 invoked from network); 4 Feb 2011 20:16:00 -0600 Received: from xplr-142-46-160-183.xplornet.com (HELO localhost) (142.46.160.183) by plecavalier.com with (DHE-RSA-AES128-SHA encrypted) SMTP; 4 Feb 2011 20:15:59 -0600 From: Philippe LeCavalier To: Hamish D In-reply-to: References: <1296746458-sup-2021@plc.intranet.plecavalier.com> Date: Fri, 04 Feb 2011 21:15:58 -0500 Message-Id: <1296871814-sup-3165@plc.intranet.plecavalier.com> User-Agent: Sup/0.12.1 Cc: sup-talk 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 Hi. Excerpts from Hamish D's message of Thu Feb 03 18:48:56 -0500 2011: > > 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? > > sup -l will list the hooks you can use - it doesn't check what hooks > you've actually created. > > > sample hook: > > #Mark Lists > > addressfile = File.open("/home/plecavalier/.sup/hooks/label.lists","r") > > if ! addressfile.grep(/#{message.list_address}/).empty? > > message.add_label :lists > > end > > You can stick debug statements in - say: > > debug "list address is #{message.list_address.inspect}, type is > #{message.list_address.class.to_s}" > > and then see it in the log (while using sup, press ";" and scroll down > to the log buffer). > > I think that message.list_address is actually of class Person, so you > would want to use message.list_address.email for your case. I've > updated the wiki to correct that - I think I may have written the > wrong information into the wiki to start with :/ so sorry for the > mistake. Thanks for this. And thanks to everyone else who posted suggestions. Suffice it to say, I would have never figured that out on my own. I'm also seeing allot more info now with debugs here there and everywhere and can work from that. One question came to mind while I was fixing my hooks...Does the email address have to be complete or can it be just the domain? (I'm referring to the email address list in the referenced file of course) -- Thanks, Phil _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk