From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.240.136 with SMTP id la8cs65172icb; Thu, 3 Feb 2011 16:57:28 -0800 (PST) Received: by 10.150.196.8 with SMTP id t8mr10642936ybf.199.1296781047415; Thu, 03 Feb 2011 16:57:27 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id h18si142226vcr.197.2011.02.03.16.57.27; Thu, 03 Feb 2011 16:57:27 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id D476619783B7; Thu, 3 Feb 2011 19:57:26 -0500 (EST) Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.216.178]) by rubyforge.org (Postfix) with ESMTP id CE20C1858356 for ; Thu, 3 Feb 2011 18:48:56 -0500 (EST) Received: by qyk33 with SMTP id 33so1468947qyk.2 for ; Thu, 03 Feb 2011 15:48:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=51m3/JjjRrSxhHsDgky3tJayPOjP9DdIATSVtKJE3ag=; b=xpkgk1AFMBragZPVsA9Bjg0F4nEVw0VfkzWVrkWXlsrrtJdZNFthlCWh42/2xbieUD e6aqmBTRmct4//WP1BS/EZYqGryhPOv+EdqvLDlLK2UrjouILnR0QQETgJ6UOy00JEkf 9yxu+fAIwW+hUnIrKKaU36wJYvOLJO7T3LwKE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=v3UlvTESVPI6AWzGAuuMEeKNkNNsPcQ11WCVPEfJfLFvqUurOi1rgBQ14SRY9K0/Gw u3aJ6z+lY8/rWUxykeIaBXX4HvwUMmcnK4o3nP61CeKmSfT8XzVYyXc8ITDvHvFCWE2Y j1QWbyJ1Uq9NxE+OyVEV6ItH/5d87nnLJnJDk= MIME-Version: 1.0 Received: by 10.229.187.196 with SMTP id cx4mr7897675qcb.178.1296776936251; Thu, 03 Feb 2011 15:48:56 -0800 (PST) Received: by 10.229.218.79 with HTTP; Thu, 3 Feb 2011 15:48:56 -0800 (PST) In-Reply-To: <1296746458-sup-2021@plc.intranet.plecavalier.com> References: <1296746458-sup-2021@plc.intranet.plecavalier.com> Date: Thu, 3 Feb 2011 23:48:56 +0000 Message-ID: From: Hamish D To: Philippe LeCavalier 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org > 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. Hamish _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk