From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.236.177.33 with SMTP id c21cs99983yhm; Fri, 18 Nov 2011 14:28:45 -0800 (PST) Received: by 10.220.209.196 with SMTP id gh4mr387644vcb.100.1321655323542; Fri, 18 Nov 2011 14:28:43 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org. [205.234.109.19]) by mx.google.com with ESMTP id g7si445253vcp.142.2011.11.18.14.28.43; Fri, 18 Nov 2011 14:28:43 -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 41728185834E; Fri, 18 Nov 2011 17:28:43 -0500 (EST) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by rubyforge.org (Postfix) with ESMTP id F03E7185834E for ; Fri, 18 Nov 2011 16:21:47 -0500 (EST) Received: by iadj38 with SMTP id j38so5346739iad.23 for ; Fri, 18 Nov 2011 13:21:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:content-type:cc:subject:from:to:in-reply-to:references:date :message-id:user-agent:content-transfer-encoding; bh=2cN9bvhcCrXGhOiz3UQr7YC6p9LBopEiFhs+uCeKYjk=; b=UJRDAXbOS+5fcU6dgu5lZ4+FGaLSKedZPJSJdWUO9TSLQX2GeuYG031sGCrp1sipCa JVFhsUkvYaOsBoseIQpKkJl406Ye5lP2UX072vpm/hc1fc6tAaOCoYhR5A5KFIwqL213 BGFe/+SHrs5LIN527TzY2eORT/x/TC55LYuQ0= Received: by 10.42.74.74 with SMTP id v10mr4512666icj.33.1321651307545; Fri, 18 Nov 2011 13:21:47 -0800 (PST) Received: from localhost (c-24-128-129-70.hsd1.vt.comcast.net. [24.128.129.70]) by mx.google.com with ESMTPS id bu33sm7323573ibb.11.2011.11.18.13.21.45 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Nov 2011 13:21:46 -0800 (PST) From: Mark Alexander To: Alfredo Palhares In-reply-to: <1321648096-sup-3340@masterkorp.net> References: <1321648096-sup-3340@masterkorp.net> Date: Fri, 18 Nov 2011 16:21:41 -0500 Message-Id: <1321650946-sup-2613@bloovis.org> User-Agent: Sup/git Cc: sup-talk Subject: Re: [sup-talk] Filters doesn't work 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 Excerpts from Alfredo Palhares's message of Fri Nov 18 15:32:20 -0500 2011: > Hello, i made a hook that adds labels, as referenced in the wiki[1] > i created a before-add-message.rb into ~/.sip/hooks. it don't get > anything in the logs, can anyone help me ? Are you sure the file is in ~/.sup/hooks, not ~/.sip/hooks? > As attachement i send the script. The script looks OK to me, except for this line: message.add_label = "texhax" Try removing the '=' character. It might be causing a syntax error that prevents your script from loading. Just as a reference, here is my ~/.sup/hooks/before-add-message.rb, somewhat sanitized: # Label by subject. This is useful for messages # generated automatically by Bugzilla or cron jobs. case message.subj when /\[FDBuilders/ message.add_label :fd when /\[P4 SUBMIT/ message.add_label :p4 when /\[Bug/ message.add_label :bugs end # Label by recipients. This is useful for mailing lists. to_string = message.recipients.map { |t| t.email }.join(" ") case to_string # Personal labels when /\bsup-(devel|talk)@rubyforge.org\b/ message.add_label :sup # WIDGET labels when /pi@widget/ message.add_label :pi when /tipsandtricks/ message.add_label :tips when /git-users/ message.add_label :git when /monitor-list/ message.add_label :mon when /acpi-dudes/ message.add_label :acpi end # Label from from. This is useful for personal emails. case message.from.email when /@amazon/ message.add_label :amazon when /@facebook/ message.add_label :facebook when /@netflix/ message.add_label :netflix end _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk