From: nigel@9fs.org
To: 9fans@cse.psu.edu
Subject: Re: [9fans] upas+scanmail question
Date: Thu, 14 Mar 2002 08:27:35 +0000 [thread overview]
Message-ID: <20020314082735.8925519A7B@mail.cse.psu.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 45 bytes --]
What does /mail/lib/haspercent look like?
[-- Attachment #2: Type: message/rfc822, Size: 4450 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 877 bytes --]
The way bobf did it here was to bind a different rewrite onto
/mail/lib/rewrite into smtp's name space (in /rc/bin/service/tcp25)
that queues everything into a queue for scan mail:
% cat /rc/bin/service.alt/tcp25
#!/bin/rc
#smtp serv net incalldir user
user=`{cat /dev/user}
bind -c /mail/lib/rewrite.in /mail/lib/rewrite
exec upas/smtpd -n $3
% cat /mail/lib/rewrite.in
# reject any address with a % because spammers might try to relay through us using
# it and an internal machine
.*%.* | "/mail/lib/haspercent '&' '\s'"
# everything else gets queued for the spam filter
.* | "/mail/lib/qmail.in '\s' 'net!achille' '&'"
% cat /mail/lib/qmail.in
#!/bin/rc
sender=$1
shift
addr=$1
shift
/bin/upas/vf | upas/scanmail -s -n /mail/queue mail $sender $addr $* || exit 1
upas/runq /mail/queue /mail/lib/remotemail</dev/null>/dev/null >[2=1]
exit 0
[-- Attachment #2.1.2: Type: message/rfc822, Size: 2076 bytes --]
From: Fco.J.Ballesteros <nemo@plan9.escet.urjc.es>
To: 9fans@cse.psu.edu
Subject: [9fans] upas+scanmail question
Date: Wed, 13 Mar 2002 12:10:31 +0100
Message-ID: <20020313111043.EAAD219995@mail.cse.psu.edu>
Hi,
I'm trying to use scanmail to filter spam. If I understand it,
/mail/lib/qmail calls scanmail to filter spam and then runq .
But for incomming mail, smtpd calls upas/send, which uses /mail/lib/rewrite to
see what to do. Now, if my mailhost is plan9.escet.urjc.es, rewrite
translates plan9.escet.urjc.es!nemo to local!nemo, and the entry for
local!nemo tells upas/send to add the mail to /mail/box/nemo/mbox, without
using qmail at all.
So, should I use two different queues to put scanmail in the smtpd
received mail pipeline? (queue local mails using scanmail, the run the
queue to deliver all queued mails)
Or is there any obvious way to make upas/send filter the mail through
scanmail and then add the mails passing the filter to the user mail
box?
thanks in advance
next reply other threads:[~2002-03-14 8:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-14 8:27 nigel [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-03-14 13:55 rob pike
2002-03-13 15:23 presotto
2002-03-13 15:04 presotto
2002-03-13 11:10 Fco.J.Ballesteros
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=20020314082735.8925519A7B@mail.cse.psu.edu \
--to=nigel@9fs.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).