From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84933 Path: news.gmane.org!not-for-mail From: Hideki Saito Newsgroups: gmane.emacs.gnus.general Subject: Removing Self Address from the CC Date: Sat, 13 Sep 2014 21:38:51 -0700 Message-ID: <87d2ayyfxg.fsf@madoka.hidekisaito.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410669596 4306 80.91.229.3 (14 Sep 2014 04:39:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Sep 2014 04:39:56 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33177@lists.math.uh.edu Sun Sep 14 06:39:51 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 1XT1bI-0007uC-Ve for ding-account@gmane.org; Sun, 14 Sep 2014 06:39:49 +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 1XT1ag-0003Qz-R2; Sat, 13 Sep 2014 23:39:10 -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 1XT1af-0003Qm-5Y for ding@lists.math.uh.edu; Sat, 13 Sep 2014 23:39:09 -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 1XT1ad-0001Jv-Mb for ding@lists.math.uh.edu; Sat, 13 Sep 2014 23:39:08 -0500 Original-Received: from mail-oa0-f48.google.com ([209.85.219.48]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XT1ab-0001hC-LK for ding@gnus.org; Sun, 14 Sep 2014 06:39:05 +0200 Original-Received: by mail-oa0-f48.google.com with SMTP id g18so1641660oah.7 for ; Sat, 13 Sep 2014 21:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=2PQiVMc5v4ZdATlGLBZD4c0D+GHlW5xI52HthDM33TI=; b=ajg74mCB16wXnJmHYFeulnFhonuQ10+ISot67iKNa2bTOmD8ANmFMmwSwd2WR4XbGE RO4J1fqKXIBCQ5BN+ZwiMsocmwzia8uljWwOaxHFqNecl4jWudHCE7wn8LAYS9Iao4uo VcVpLjfLqoPDNGWuiHWZRkyqlEy6V9Ku2wE7O1S5j+AECN6xeAIPRCdjHGT2UwpdL51n O2J0KPa6N1OW/+0RgcEtFQWFcU+i5ZpsH1ruiArmW/u8HitrQHQtx0mR2jNGv6ocqlrJ A00/bVtuvjo8baOQJHiWsTh/4SMADDP8qaKKsnkAGSoUWstyhMgDouLEeQOTm3o/U+Ze sRUA== X-Received: by 10.60.121.33 with SMTP id lh1mr7621oeb.59.1410669538990; Sat, 13 Sep 2014 21:38:58 -0700 (PDT) Original-Received: from madoka (c-98-203-254-26.hsd1.wa.comcast.net. [98.203.254.26]) by mx.google.com with ESMTPSA id c128sm471323oih.21.2014.09.13.21.38.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 13 Sep 2014 21:38:55 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux) X-Spam-Score: -3.0 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84933 Archived-At: Hi, If I can get some recommendation for this, it'll be very helpful. Basically, I'm trying to find the good way of removing self-CC address from the header. Because my SMTP/address switching is fairly complicated with different address and aliases I have to reply from, I'm using the script like following: (defun gnus-hideki-a () (interactive) (message-goto-from) (kill-whole-line) (insert "X-Message-SMTP-Method: smtp smtp.googlemail.com 587 me@a.com\nFrom: Myself \n") (message-goto-signature) (kill-whole-line) (insert "Stuff to add for a.com") (message-goto-body) ) (defun gnus-hideki-a () (interactive) (message-goto-from) (kill-whole-line) (insert "X-Message-SMTP-Method: smtp smtp.googlemail.com 587 me@b.com\nFrom: Myself \nOrganization: B\n") (message-goto-signature) (kill-whole-line) (insert "Stuff to add for b.com") (message-goto-body) ) However, the complication is when I wide reply an E-mail message, it'd often end up in E-mail header, such as: From: someone@a.com To: me@a.com CC: Myself or From: someone@a.com To: me@a.com CC: me@b.com Essentially, what I'm trying to get accomomplished is to remove myself from CC only when it matches with my From address. The complicated part is that gnus won't know my "Myself" address until the moment of sending the message (thus, built-in option to eradicate address with regexp won't work in my case), so I'm thinking about incorporating the code to verify and remove the address when the above switching takes place. If you have any suggestion, that would be very helpful. Thank you. -- Hideki Saito OpenPGP Key: http://hidekisaito.com/aff2e40b.txt 1066 3928 7B0B E7CD A0CB 3686 1FDF D937 AFF2 E40B http://hidekisaito.com