From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84962 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.gnus.general Subject: Re: Has anyone created code for reply to author on yahoogroups? Date: Sun, 21 Sep 2014 14:44:19 +0200 Organization: Probably a good idea Message-ID: <871tr5b0t8.fsf@dod.no> References: <87r3znfahl.fsf@dod.no> <87zjebc53x.fsf@yun.yagibdah.de> <87fvg17tbo.fsf@yun.yagibdah.de> <87a969fjw3.fsf@dod.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411303534 25680 80.91.229.3 (21 Sep 2014 12:45:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Sep 2014 12:45:34 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33206@lists.math.uh.edu Sun Sep 21 14:45:27 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XVgW5-00055S-UC for ding-account@gmane.org; Sun, 21 Sep 2014 14:45:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1XVgVM-0002IN-C2; Sun, 21 Sep 2014 07:44:40 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1XVgVK-0002ID-M7 for ding@lists.math.uh.edu; Sun, 21 Sep 2014 07:44:38 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XVgVI-0005nq-CG for ding@lists.math.uh.edu; Sun, 21 Sep 2014 07:44:37 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XVgVG-0003vg-Dt for ding@gnus.org; Sun, 21 Sep 2014 14:44:34 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XVgVF-0004sV-OA for ding@gnus.org; Sun, 21 Sep 2014 14:44:33 +0200 Original-Received: from cm-84.208.248.210.getinternet.no ([84.208.248.210]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Sep 2014 14:44:33 +0200 Original-Received: from sb by cm-84.208.248.210.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Sep 2014 14:44:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 48 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.208.248.210.getinternet.no Mail-Copies-To: never User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:FYqNUKreKRj2jBoMcb/meciIZkM= X-Spam-Score: -3.7 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84962 Archived-At: >>>>> Steinar Bang : >>>>> lee : >> Other than that, you could pipe the mails through a perl script that >> fixes the headers. > That might be an idea... thanks for the heads up. My yahoogroups' > filtering already has subject tag stripping in them. [snip!] > I use dovecot with procmail(*) for mail filtering, so I would just put > the fix in there. Ok, now I've fixed the Yahoogroups. I changed this: :0 * ^TO_my-mailing-list@(intl.)?(e[Gg]roups|yahoogroups).com { :0 Afhw | /bin/sed -e "s/\[my-mailing-list\] //g" } into this: :0 * ^TO_my-mailing-list@(intl.)?(e[Gg]roups|yahoogroups).com { :0 Afhw | /usr/bin/perl -ne "s/(^From: \".+) \[my-mailing-list\]\" .*/\1\"/ig; s/(^From: \")'([^']+)'/\1\2/g;s/ ([A-za-z0-9.]+@[A-za-z0-9.]+)\"/\" <\1>/g;s/(^From: .*)\"([A-za-z0-9.]+@[A-za-z0-9.]+)\"/\1<\2>/g; if (/^Subject: /) {s/\[my-mailing-list\] //ig;} print" } > (*) I know it's old, ancient actually, but it works and setting up mail > filtering is boring... Speaking of ancient, my .procmailrc file also have this recipe, dating back to the late ninties, but last touched in May of 2014, because of the Android email client: # # Fix Subject RE/SV/AW line for MSExchange/MSMail/MSOutlook # Also fix Subject field for Norwegian android mailer ("Vedr"). # No X-Mailer field to rely on, unfortunately! # Remove MSE quotes of type "'Real Name'" # :0 fhw | /usr/bin/perl -ne "s/\?[Ww]indows-1252\?/?iso-8859-1?/g; s/^(Subject:)\s+(S[Vv]:\s*|AW:\s*|Ad:\s*|Vedr:\s*|R[eE](\(\d+\))?:\s*)+/\1 Re: /g;s/^(Subject:)\s+(=\?((iso|ISO)-8859-1|us-ascii)\?Q\?)((S[Vv]|AW|Ad|R[eE](\(\d+\))?)(:|=3[Aa])_*)+/\1 \2Re:_/g; s/\042\'([^\']*)\'\042/\042\1\042/g ; print" (The answer to the question "How many ways are there to break an email header?", seems to be "inifinitly many"...)