* [9fans] mail
@ 2003-09-01 3:09 boyd
2003-09-01 13:54 ` David Presotto
0 siblings, 1 reply; 5+ messages in thread
From: boyd @ 2003-09-01 3:09 UTC (permalink / raw)
To: 9fans
i have this rc script that i want to invoke via pipeto.
problem is that i need to know if the auto generated reply
is going to come right back at me, filling up dan's proc
table.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] mail
2003-09-01 3:09 [9fans] mail boyd
@ 2003-09-01 13:54 ` David Presotto
0 siblings, 0 replies; 5+ messages in thread
From: David Presotto @ 2003-09-01 13:54 UTC (permalink / raw)
To: 9fans
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
}
...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] mail
2003-09-01 14:26 ` David Presotto
@ 2003-09-01 14:37 ` boyd, rounin
0 siblings, 0 replies; 5+ messages in thread
From: boyd, rounin @ 2003-09-01 14:37 UTC (permalink / raw)
To: 9fans
my case is a bit special is that i receive very little mail at sdgm.net
which _isn't_ spam. i don't like the idea of filters, like spamassassin.
oh cool: beavis and butthead.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] mail
2003-09-01 14:22 ` [9fans] mail boyd, rounin
@ 2003-09-01 14:26 ` David Presotto
2003-09-01 14:37 ` boyd, rounin
0 siblings, 1 reply; 5+ messages in thread
From: David Presotto @ 2003-09-01 14:26 UTC (permalink / raw)
To: 9fans
upas/fs is just a tool to pick the headers apart. I started thinking of doing
a special header tool also and then realized that I'ld already written it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] mail
2003-09-01 14:08 [9fans] (no subject) David Presotto
@ 2003-09-01 14:22 ` boyd, rounin
2003-09-01 14:26 ` David Presotto
0 siblings, 1 reply; 5+ messages in thread
From: boyd, rounin @ 2003-09-01 14:22 UTC (permalink / raw)
To: 9fans
> And, by the way, filter looks through the message to get the
> sender address.
i see. i wanted to avoid messages in /tmp and 822 parsing.
i shall have to think about it. perhaps i should write a tool
(i already have the code) to pick the headers apart, although
i'm loathed to do it.
upas/fs looks interesting. thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-01 14:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-01 3:09 [9fans] mail boyd
2003-09-01 13:54 ` David Presotto
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
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).