From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.228.136 with SMTP id je8cs62088icb; Tue, 8 Mar 2011 18:44:29 -0800 (PST) Received: by 10.42.221.67 with SMTP id ib3mr7137791icb.447.1299638668510; Tue, 08 Mar 2011 18:44:28 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id we8si3527709icb.115.2011.03.08.18.44.27; Tue, 08 Mar 2011 18:44: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 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 16D0418582EE; Tue, 8 Mar 2011 21:44:27 -0500 (EST) Received: from plecavalier.com (plecavalier.com [64.40.149.83]) by rubyforge.org (Postfix) with ESMTP id 1BFB018581B2 for ; Tue, 8 Mar 2011 21:13:28 -0500 (EST) Received: (qmail 17648 invoked from network); 8 Mar 2011 20:13:28 -0600 Received: from xplr-142-46-160-183.xplornet.com (HELO localhost) (142.46.160.183) by thelittlecloset.ca with (DHE-RSA-AES128-SHA encrypted) SMTP; 8 Mar 2011 20:13:27 -0600 From: Philippe LeCavalier To: David J. Hamilton In-reply-to: <1299618530-sup-9754@nyx.local> References: <1299158755-sup-5116@plc.intranet.plecavalier.com> <1299173352-sup-4428@nyx.local> <1299179513-sup-1090@plc.intranet.plecavalier.com> <1299247526-sup-7848@plc.intranet.plecavalier.com> <1299618530-sup-9754@nyx.local> Date: Tue, 08 Mar 2011 21:13:26 -0500 Message-Id: <1299636520-sup-7694@plc.intranet.plecavalier.com> User-Agent: Sup/0.12.1 Cc: sup-talk@rubyforge.org Subject: Re: [sup-talk] hook with external file ref 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 David. Excerpts from David J. Hamilton's message of Tue Mar 08 16:16:00 -0500 2011: > Hi Philippe, > > Excerpts from Philippe LeCavalier's message of Fri Mar 04 06:06:17 -0800 2011: > > Hi David. > > I'm getting "undetermined quoted string" with the above code. Any ideas? > > Sorry for the late reply. I don't see what in the above code would give you > that error. It's quite possible it's something unrelated to that hook. > Could you please post your complete before-add-message.rb file? Since I have yet to settle on a "style" of code for this hook I'm only playing around with different options. As such, I only apply them 1 at a time. At the moment I only have your example in there. > Your addressfile is just a list of domains right? Something like: > > gmail.com > somewhereelse.net > example.org Yup. Exactly. > > One more thing: the code I originally posted does contain an error: you want to > use /#{pattern.chomp}/ rather than /#{pattern}/. So, for example, if your > addressfile was in /tmp/addressfile you would have: > > patterns = File.readlines "/tmp/addressfile" > patterns.each do |pattern| > if message.from.email =~ /#{pattern.chomp}/ > message.add_label :somelabel > end > end I'll try the above. Perhaps that will "settle" things. Back in a bit once I have a chance to test that. Thanks again David. -- Thanks, Phil _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk