From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: David Presotto To: 9fans@cse.psu.edu Subject: Re: [9fans] Set reply-to in pipefrom In-Reply-To: <211a519bb9639f5e5329dfb0ad4359ef@mteege.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-angjrktkpiepxpnkwfmhbhsrki" Date: Fri, 30 Jan 2004 08:08:11 -0500 Topicbox-Message-UUID: c7d6a41a-eacc-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-angjrktkpiepxpnkwfmhbhsrki Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit That's the real reason I did pipefrom. The following is probably more complicated than you need. I just have lots of roles. #!/bin/rc TMP=/tmp/pipefrom.$pid # collect upas/send options options=() while (! ~ $#* 0 && ~ $1 -*) { options=($options $1); shift } # collect destination addresses and add them to my patterns dests=() while (! ~ $#* 0) { dests=($dests $1); shift } echo $dests > $TMP /bin/upas/list add /mail/box/$user/_pattern $TMP >[2] /dev/null rm $TMP # default return address is outside one myaddr=presotto@closedmind.org # use destination address in message we're replying to # if its none of mine if(test $replymsg){ x=`{cat $replymsg/to $replymsg/cc $replymsg/bcc} switch($x){ case *gridmaster@plan9.bell-labs.com* myaddr=gridmaster@plan9.bell-labs.com case *postmaster@plan9.bell-labs.com* myaddr=postmaster@plan9.bell-labs.com case *webmaster@plan9.bell-labs.com* myaddr=webmaster@plan9.bell-labs.com case *presotto@plan9.bell-labs.com* myaddr=presotto@plan9.bell-labs.com case *presotto@closemind.org* myaddr=presotto@closedmind.org case *p.150th@closemind.org* myaddr=p.150th@closedmind.org } } # if we're sending to lucent, override with a lucent address for(i in `{cat /env/dests}){ switch($i){ case *lucent.com* *bell-labs.com* *nslocum* # explicitly in house myaddr=presotto@plan9.bell-labs.com case *!* *@* ; case * # implicitly in house myaddr=presotto@plan9.bell-labs.com } } # change From: and send message sed 's/^From: presotto$/From: David Presotto <'$myaddr'>/' | tee $mail/sent |/bin/upas/send $options $dests --upas-angjrktkpiepxpnkwfmhbhsrki Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Fri Jan 30 04:41:37 EST 2004 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Fri Jan 30 04:41:35 EST 2004 Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 52FD619C84; Fri, 30 Jan 2004 04:41:26 -0500 (EST) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 4967019C6B; Fri, 30 Jan 2004 04:41:13 -0500 (EST) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 00BBB19BF8; Fri, 30 Jan 2004 04:40:28 -0500 (EST) Received: from one.mteege.de (one.mteege.de [81.2.131.61]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 38A6219C1A for <9fans@cse.psu.edu>; Fri, 30 Jan 2004 04:40:17 -0500 (EST) Received: (qmail 76586 invoked by uid 66); 30 Jan 2004 09:40:38 -0000 Received: (qmail 43203 invoked from network); 30 Jan 2004 09:40:18 -0000 Received: from gic.mteege.de (HELO mteege.de) (192.168.153.10) by 0 with SMTP; 30 Jan 2004 09:40:18 -0000 Received: (qmail 52727 invoked from network); 30 Jan 2004 09:40:18 -0000 Received: from loco.mteege.de (HELO loco) (192.168.153.22) by 0 with SMTP; 30 Jan 2004 09:40:18 -0000 Message-ID: <211a519bb9639f5e5329dfb0ad4359ef@mteege.de> From: Matthias Teege To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] Set reply-to in pipefrom Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu X-Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 30 Jan 2004 09:39:32 0000 X-Spam-Status: No, hits=0.6 required=5.0 tests=INVALID_DATE version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Moin, I have another question about pipefrom. I want to set/add the Reply-To Header based on the To field in the email. Is this also a task for pipefrom or is there a better place? Matthias --upas-angjrktkpiepxpnkwfmhbhsrki--