You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Sanford Whiteman <sw...@cypressintegrated.com> on 2006/06/04 09:41:27 UTC

Re[3]: Hiring for Spam Assassin Troubleshooting

Wayne,

Pro bono, here's the way to get SmarterMail to bypass SpamAssassin for
authenticated users.

BACKGROUND after playing around with SM for a few minutes
----------

Like  many/most  MTAs, SM writes two spool files for every e-mail. One
is  the  message  header/body,  the  other is the message envelope. In
naming  the former, SM uses a message number + the extension .EML. THe
latter uses the same message number + the extension .HDR. So for every
message, there will be two files in the spool like so:

     1234545.EML
     1234345.HDR

In  the  HDR file for SMTP AUTH-enticated e-mails -- and only in those
e-mails -- there's a line that begins with the string 'auth'. What you
need  is thus for your SpamAssassin caller to quick-check the contents
of  the  HDR  file  before  deciding  whether  or  not  it should call
SpamAssassin.


HOWTO
-----

(1) Go to SM Admin and choose Settings-General Settings-Spool tab.

(2)  Check  the  value  in 'Command-line file to run on new mail.' You
will see a value like

     c:\progra~1\spamassassin\spamassassin.bat %filepath

or maybe

     c:\smfilter\smfilter.exe %filepath

or similar.

(3)  Copy the string to the left of '%filepath' to the clipboard. That
is, just the 'c:\smfilter\smfilter.exe' part in the second example.

(4)  Open  a new batch file. Here are the first two lines of the batch
file:

     for /f %%I in ('echo %1') do find /i /c "auth" %%~dI%%~pI%%~nI.hdr
     if %ERRORLEVEL%==0 exit

You must copy-and-paste or retype these lines exactly as shown.

(5)  The  third and final line of the batch file will be the value you
copied out in step (3) followed by the string '%1' (no quotes). If you
copied  out  'c:\smfilter\smfilter.exe'  in (3) then the third line of
the batch will be

     c:\smfilter\smfilter.exe %1

(6) Save the three-line batch file as WLAUTH.CMD in a path you choose.
You can put it wherever SM was installed. For example, say you save it
to c:\progra~1\spamassassin\wlauth.cmd.

(7)  Go  back  into the SM Admin page. Now replace the contents of the
'Command-line  file...' box with your batch file name, followed by the
string  '%filepath'  (no  quotes).  If  you  saved  the  batch file as
c:\progra~1\spamassassin\wlauth.cmd, the value will be:

     c:\progra~1\spamassassin\wlauth.cmd %filepath

(8) Save changes in SM Admin.

You  now have a system that prechecks for auth'd users and doesn't run
SpamAssassin against their mail. QED.

That'll be $4500. LOL. Contact me off-list if you have probs.

--Sandy