Delivering spam into a folder

David Lee t.d.lee at DURHAM.AC.UK
Thu Oct 3 10:23:04 IST 2002


We have been running MailScanner (MS) for about a year with great success
in virus-blocking (and elementary spam-marking using ORDB).

We now wish to make bigger efforts in spam detection, and it would seem
natural to introduce SpamAssassin (SA) into our sendmail/MS system, as
this combination seems well-known and well-liked on this mailscanner list.

One feature which management is requesting (and it seems reasonable) is
the ability to divert spam (probably above a certain SA 'score') into a
user's folder (of fixed name).  For a user 'userid' whose mail would
normally be delivered via Mlocal to 'userid':
   Mlocal       P=/usr/sbin/tmail ... A=tmail $u

instead deliver it to 'userid+spamfolder':
   Mlocal       P=/usr/sbin/tmail ... A=tmail $u+$h

It is sendmail's ruleset 5 which handles the "+" syntax glue here.


But I'm stuck.  Given a message, which SA (aided by MS) determines to be
spam of high enough score, how can the envelope "userid" be persauded,
under these circumstances, to become "userid+spamfolder" by the time it
reaches sendmail's ruleset 5?

Can SA/MS adjust the envelope before the delivery sendmail is invoked?  Or
can the delivery sendmail somehow detect the SA/MS headers and use that to
adjust the envelope being processed?

--

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :



More information about the MailScanner mailing list