From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/43067 Path: main.gmane.org!not-for-mail From: david.goldberg6@verizon.net (David S. Goldberg) Newsgroups: gmane.emacs.gnus.general Subject: Re: From-header determined from To-header in message I am replying to Date: Tue, 12 Feb 2002 23:22:45 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035178222 15620 80.91.224.250 (21 Oct 2002 05:30:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:30:22 +0000 (UTC) Return-Path: Original-Received: (qmail 523 invoked from network); 13 Feb 2002 04:23:22 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 13 Feb 2002 04:23:22 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16aqwm-0001BJ-00; Tue, 12 Feb 2002 22:23:08 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 12 Feb 2002 22:23:05 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id WAA06719 for ; Tue, 12 Feb 2002 22:22:51 -0600 (CST) Original-Received: (qmail 514 invoked by alias); 13 Feb 2002 04:22:49 -0000 Original-Received: (qmail 509 invoked from network); 13 Feb 2002 04:22:48 -0000 Original-Received: from smtpproxy2.mitre.org (198.76.173.29) by gnus.org with SMTP; 13 Feb 2002 04:22:48 -0000 Original-Received: from avsrv2.mitre.org (avsrv2.mitre.org [128.29.154.4]) by smtpproxy2.mitre.org (8.11.3/8.11.3) with ESMTP id g1D4Mm505895 for ; Tue, 12 Feb 2002 23:22:48 -0500 (EST) Original-Received: from MAILHUB1 (mailhub1.mitre.org [129.83.20.31]) by smtpsrv2.mitre.org (8.11.3/8.11.3) with ESMTP id g1D4Mlp01102 for ; Tue, 12 Feb 2002 23:22:47 -0500 (EST) Original-Received: from linus.mitre.org (129.83.10.1) by mailhub1.mitre.org with SMTP id 9168667; Tue, 12 Feb 2002 23:22:35 -0500 Original-To: The Gnus Mailing List X-Face: GUaHTH@nS>[7,ME@-gYZ4#Wl{z"99k@[[Y8AcP0x1paqu.,z9,XSV1WI>{q3f6^e5(zrit <4fV&VHhmE`uidRqtmG27;si9&r;#KSF~E#$%W8w(xdp)H4tW=\2XOk~3=@oGqqpj;m4xf Ow;y26396&,34@9#~4;@*S;E0cq"LM9N(us4P%F(Nxis'Vvfm9?KufH;:Q$dMa-QWGLR&K d0`LJZE8xb*>^yN>b]_NcU:E=Zn\1=#/(OS2 In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Sat, 09 Feb 2002 19:28:47 +0100") Original-Lines: 126 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.1 (Cuyahoga Valley, sparc-sun-solaris2.7) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:43067 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:43067 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit >>>>> On Sat, 09 Feb 2002 19:28:47 +0100, Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) said: > Tom Koelman writes: >> I have several e-mail-addresses for several purposes, most of them >> using the same smtp-server. I was wondering whether it is possible to, >> when replying to some mail, have user-mail-address and >> default-smtp-server and such set automatically according to the >> To-header from the mail I am replying to. Any insights? > To do it based on the group name, use Posting Styles. There is an > extra package head-action.el by Holger Schauer (I think) which can do > stuff based on the header of the message. Actually, he can use posting styles for setting those things for replys as well. However, while I haven't looked at head-action.el, I understand it's more flexible. Here's how I set address and signature-file for replys in my gnus-posting-styles. Yes, I occasionally have too much time on my hands :-) --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline ([...] (gnus-article-reply (signature-file (let* ((net-from (save-excursion (set-buffer gnus-article-buffer) (car (cdr (mail-extract-address-components (message-fetch-field "From")))))) (net-to (save-excursion (set-buffer gnus-article-buffer) (or (message-fetch-field "to") ""))) (net-cc (save-excursion (set-buffer gnus-article-buffer) (or (message-fetch-field "cc") ""))) (rec (car (bbdb-search (bbdb-records) nil nil net-from nil nil))) (sig (if rec (bbdb-record-getprop rec 'signature)))) (cond ((and (string-match "@.*\\.?mitre\\.org" net-from) (or (string-match "dsg@.*\\.?mitre\\.org" net-to) (string-match "dsg@.*\\.?mitre\\.org" net-cc))) "~/.signature-mitre-i") ((or (string-match "dsg@.*\\.?mitre\\.org" net-to) (string-match "dsg@.*\\.?mitre\\.org" net-cc)) "~/.signature-mitre") (sig sig) ((string-match ".*:.*personal.*" (or gnus-newsgroup-name "")) "~/.signature-personal") ((string-match ".*emacs.*" (or gnus-newsgroup-name "")) "~/.signature-personal") ((string-match ".*fvwm.*" (or gnus-newsgroup-name "")) "~/.signature-personal") (t "~/.signature-mitre")))) (address (let* ((net-from (save-excursion (set-buffer gnus-article-buffer) (car (cdr (mail-extract-address-components (message-fetch-field "From")))))) (net-to (save-excursion (set-buffer gnus-article-buffer) (or (message-fetch-field "to") ""))) (net-cc (save-excursion (set-buffer gnus-article-buffer) (or (message-fetch-field "cc") ""))) (rec (car (bbdb-search (bbdb-records) nil nil net-from nil nil))) (mail-from (if rec (bbdb-record-getprop rec 'mail-from)))) (cond ((or (string-match "dsg@.*\\.?mitre\\.org" net-to) (string-match "dsg@.*\\.?mitre\\.org" net-cc)) "dsg@mitre.org (David S. Goldberg)") (mail-from mail-from) ((string-match ".*:.*personal.*" (or gnus-newsgroup-name "")) "david.goldberg6@verizon.net") ((string-match ".*emacs.*" (or gnus-newsgroup-name "")) "david.goldberg6@verizon.net") ((string-match ".*fvwm.*" (or gnus-newsgroup-name "")) "david.goldberg6@verizon.net") (t "dsg@mitre.org (David S. Goldberg)"))))) [...]) -- Dave Goldberg david.goldberg6@verizon.net --=-=-=--