For anyone who's interested in using Spamass-Milter on a relay server:

Spamass-Milter (I'll just call it SM from now) is a Sendmail Mail
Filter (Milter) which processes each message that sendmail receives
through a spam checking program (SpamAssassin).  By default, if the
mail is considered spam, it is marked as such and sent onto the
intended recipient.

If you're running SM on a mail relay for paying customers this may not
be the ideal behaviour -- you'd prefer that all mail from your
customers which is tagged spam gets redirected to a spammaster who
determines whether it actually is spam or not.  If it is, the
spammaster can invite the offending user to his private torture
chamber and figure out interesting ways of keeping him (the user)
alive in agony for as long as possible.  If the mail ISN'T spam, the
spammaster should have the option of editing out the comments and
headers added by SpamAssassin and resending the mail onto the original
recipients.

Raju's Hack For Spamass-Milter (henceforth known as the `I don't know
C++ but WTH, it's C under a new name after all, isn't it?' patch)
makes SM do exactly this.  In detail, the Hack causes SM to behave in
the following manner:

- Receive a message and envelope RCPT TO information from sendmail.

- Save the RCPT TO values.

- Send the message to SpamAssassin (i.e. spamd).

- Get the message back, with an indication of whether it's spam or
  not.

- If it's not spam, alles ist kool, let sendmail go about it's normal
  obstretician and gynaecologist business (deliveries ;-) .

- If it IS spam,

  - replace all the RCPT TO envelope headers with a single RCPT TO to
    spammaster
  - Convert the original RCPT TO's (remember, we saved them) into
    X-Spam-RCPT headers.
  - Do whatever else is done by SpamAssassin to the mail.

SM has been modified to accept an additional argument (the e-mail
address of the spammaster) on the command-line.

I have tested this fleetingly on a relay server (testing is for wimps
who don't trust their 'l33t coding skillz) and it seemeth to worketh.
If you think anyone would be interested in this patch give me a shout
at [EMAIL PROTECTED] and I'll try to make a patch and send it over.
Eventually (i.e. by 2038, when I've got up the energy to clean up my
code) I'll make it into a proper patch which can be sent to the author
of Spamass-Milter.  In the meantime, you'll just have to be another
'l33t coder to apply the patch and recompile the source.

DISCLAIMER: Raju Mathur (henceforth known as the 'l33t c0d3r) makes no
representations or warranties of any kind with regard to this software
patch.  If using this patch causes loss of clients or hair, higher
incidence of haemorroids in your family or global warming, you can
just blame Gill Bates.

Regards,

-- Raju
-- 
Raju Mathur          [EMAIL PROTECTED]           http://kandalaya.org/
                     It is the mind that moves

          ================================================
To subscribe, send email to [EMAIL PROTECTED] with subscribe in subject header
To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject header
Archives are available at http://www.mail-archive.com/ilugd%40wpaa.org
          =================================================

Reply via email to