From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] upas+scanmail question From: nigel@9fs.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-upvzczzvlmgmshdzbzawuughxs" Message-Id: <20020314082735.8925519A7B@mail.cse.psu.edu> Date: Thu, 14 Mar 2002 08:27:35 +0000 Topicbox-Message-UUID: 66e73b44-eaca-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-upvzczzvlmgmshdzbzawuughxs Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit What does /mail/lib/haspercent look like? --upas-upvzczzvlmgmshdzbzawuughxs Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by cpu; Wed Mar 13 14:57:31 GMT 2002 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 BF99619A60; Wed, 13 Mar 2002 10:06:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 7470319A57 for <9fans@cse.psu.edu>; Wed, 13 Mar 2002 10:04:56 -0500 (EST) Message-ID: <0c594c3988ad3eec9435dddc4dd5093a@plan9.bell-labs.com> From: presotto@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] upas+scanmail question MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-twjafhuppckjzdzycvhdsiibwf" Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.8 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Help: List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 13 Mar 2002 10:04:54 -0500 This is a multi-part message in MIME format. --upas-twjafhuppckjzdzycvhdsiibwf Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit 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 >[2=1] exit 0 --upas-twjafhuppckjzdzycvhdsiibwf Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Wed Mar 13 06:11:16 EST 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Wed Mar 13 06:11:15 EST 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 3232B19A29; Wed, 13 Mar 2002 06:11:08 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from nautilus.escet.urjc.es (nautilus.escet.urjc.es [212.128.4.207]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id EAAD219995 for <9fans@cse.psu.edu>; Wed, 13 Mar 2002 06:10:43 -0500 (EST) To: 9fans@cse.psu.edu From: Fco.J.Ballesteros MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20020313111043.EAAD219995@mail.cse.psu.edu> Subject: [9fans] upas+scanmail question Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.8 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Help: List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 13 Mar 2002 12:10:31 +0100 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 --upas-twjafhuppckjzdzycvhdsiibwf-- --upas-upvzczzvlmgmshdzbzawuughxs--