From: David Presotto <presotto@closedmind.org>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] mail
Date: Mon, 1 Sep 2003 09:54:59 -0400 [thread overview]
Message-ID: <06d2d0989ee04938acc6ac0bfc0a6ecb@plan9.bell-labs.com> (raw)
In-Reply-To: <e7cc89f69bc3f1040625281d317e7d16@sdgm.net>
If you run upas/fs over the mail message in your pipetp, you can get at any of the fields.
For example:
#!/bin/rc
# create a /tmp for here documents
rfork en
bind -c /mail/tmp /tmp
RECIP=$1
MBOX=$2
PF=/mail/box/$USER/_pattern
TMP=/mail/tmp/mine.$pid
BIN=/bin/upas
D=/mail/fs/mbox/1
# save and parse the mail file
{sed '/^$/,$ s/^From / From /'; echo} > $TMP
upas/fs -f $TMP
# accept anything sent to license-discuss
if( grep -si license-discuss@opensource.org $D/to || grep -si license-discuss@opensource.org $D/cc || grep -si license-discuss@opensource.org $D/from )
{
$BIN/deliver $RECIP $D/from $MBOX < $D/raw
rv=$status
rm $TMP
exit $rv
}
# throw out anything from boyd at his non insultant address
if( grep -si 'boyd@(.*\.)?sdgm.net' $D/from )
{
$BIN/deliver $RECIP $D/from $MBOX.bounced < $D/raw
rv=$status
rm $TMP
exit $rv
}
# dump it if the sender is spoofing me
if( grep -si '^x-warning: suspect .* domain$' $D/rawheader && grep $USER $D/from)
{
$BIN/deliver $RECIP $D/from $MBOX.bounced < $D/raw
rv=$status
rm $TMP
exit $rv
}
...
next prev parent reply other threads:[~2003-09-01 13:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-01 3:09 boyd
2003-09-01 13:54 ` David Presotto [this message]
2003-09-01 14:08 [9fans] (no subject) David Presotto
2003-09-01 14:22 ` [9fans] mail boyd, rounin
2003-09-01 14:26 ` David Presotto
2003-09-01 14:37 ` boyd, rounin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06d2d0989ee04938acc6ac0bfc0a6ecb@plan9.bell-labs.com \
--to=presotto@closedmind.org \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).