Hi,

often here are questions how to run SpamAssassin on Windows in coincidence
with XMail. After some ugly things like writing .NET wrapper and so on I
ended up with very simple solution (intended for SMTP filtering in 1.19, but
can be modified easily for standard filters). Here is it:

1. Install and configure SpamAssassin, see
http://www.openhandhome.com/howtosa.html for HOWTO.
2. Create file named for example "C:\MailRoot\filters\bin\spamcheck.cmd"
with the following contents:

@ECHO OFF
C:\perl\bin\perl.exe -T -w C:\perl\bin\spamassassin -e <%1 >NUL
IF "%ERRORLEVEL%"=="0" GOTO NOSPAM
:SPAM
ECHO 550 Message rejected because looks like spam. Consider reformulating
it. >%1.rej
EXIT 19
:NOSPAM
ECHO %1 is not spam >> C:\spam.log
EXIT 0

3. Modify your filter.post-data.tab to call the filter:

"C:\MailRoot\filters\bin\spamcheck.cmd"[TAB]"@@FILE"[CRLF]

4. Done.

PROs: It's easy, quick and works.
CONs: Rejects all mail which is marked as spam by SpamAssassin withount
further examination, so highly depends on SA configuration and does not
allow any per-user changes.

-- Michal Altair Valasek [EMAIL PROTECTED]
   Altair Communications - web hosting, web design, application development
___________________________________________________________________________
http://www.altaircom.net | PGP 0xC4F3579D | Tel.: +420 603 828 493
When it's inevitable, relax and enjoy it.

-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to