From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.240.136 with SMTP id la8cs234667icb; Sun, 13 Feb 2011 05:40:59 -0800 (PST) Received: by 10.224.29.8 with SMTP id o8mr27902qac.193.1297604458456; Sun, 13 Feb 2011 05:40:58 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id n7si2778873qcu.134.2011.02.13.05.40.58; Sun, 13 Feb 2011 05:40:58 -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 D1DAE18581B2; Sun, 13 Feb 2011 08:40:57 -0500 (EST) Received: from barfooze.de (barfooze.de [78.46.117.212]) by rubyforge.org (Postfix) with ESMTP id 96A1018581B2 for ; Sun, 13 Feb 2011 08:00:31 -0500 (EST) Received: from moritz by barfooze.de with local (Exim 4.74+ponies) (envelope-from ) id 1PobYx-00006T-NK for sup-talk@rubyforge.org; Sun, 13 Feb 2011 14:00:27 +0100 From: Moritz Wilhelmy To: sup-talk In-reply-to: <1297589599-sup-596@tilus.net> References: <1297346751-sup-70@plc.intranet.plecavalier.com> <1297355619-sup-8657@bloovis.org> <1297356327-sup-9107@plc.intranet.plecavalier.com> <1297357197-sup-5893@bloovis.org> <1297364797-sup-8388@plc.intranet.plecavalier.com> <1297375381-sup-2823@plc.intranet.plecavalier.com> <1297560324-sup-4333@niflheimr> <1297589599-sup-596@tilus.net> Date: Sun, 13 Feb 2011 14:00:27 +0100 Message-Id: <1297600750-sup-2275@niflheimr> User-Agent: Sup/git Subject: Re: [sup-talk] How to treat List-Id headers (Was: best method for before-add-message.rb) 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 Hello, Excerpts from Tero Tilus's message of Sun Feb 13 10:51:02 +0100 2011: > > what would be the best way to match - for instance - the > > List-Id-Header in case it's present? > List-Id is a whole separate kind of beast. My stragy dealing with it > looks like this. Comments in finnish. Go google translate. ;) Ah, well, the problem I have is something like this List-Id: "very long descriptive text on what the list is about" Because the actual List-Id is so long, it's sometimes wrapped into the next line per convention (i.e. when the descriptive text is already very long and the line needs to be wrapped because the actual List-Id would exceed the character limit per line, I think it's around 80 characters). Thus, my regexes don't match in all cases. I want to match the list by the part between the <>, not the descriptive text, which is a bit problematic because of the line-wrapping. However, if I could get the full List-Id line from the parsed headers hashtable, this would eliminate my parsing problems. > > Can I pull arbitrary, parsed headers directly out of the message > > object, or do I have to do my own parsing? > Uh, oh. Looks like no, but it is pretty close, berause > Message#parse_header already builds parsed hash of arbitrary headers > internally. Well, making this publicly accessible to the before-add-message hook would simplify a lot of the stuff I do with my email in order to place the right labels. So maybe, this is a feature request to the sup developers, but maybe I also got everything wrong. ;) Cheers, Moritz _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk