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/03 19:47:14 UTC

Re[2]: Hiring for Spam Assassin Troubleshooting

> I have talked to the SM tech support and have searched through their
> forum but they believe this is SA issue.

It  is  and  it  isn't.  The fact that they don't have a simple way of
skipping  their  external test (and they have had many, many bugs over
the  past  few  years  relating  to  incomplete bypassing of auth'd or
whitelist'd  mails) is an essential design flaw. That they are pushing
back  at  you  like  that,  instead of at least saying they'll add the
feature  in  the  future, is typical of their developers... and is the
reason I never adopted SM.

> That  makes  a  lot  of sense. Yes, I am familiar with writing batch
> files. I am not a god at writing them but I can read and write them.

Okay, you should be off to the races.

> Yes  we do use SMFilter but we call the spamassassin.bat from it. (I
> didn't know we could compile an exe file)

No  matter.  How  you're calling SA (bat or exe), when you call it, is
pretty  much  immaterial  now.  What  you need to do is insert a layer
above  everything  else,  so  that  you have SM run _your batch file_,
which in turn _optionally_ runs SMFilter or whatever you want.

> Now, here is the issue I see with the bat file.

> There are millions of key phrases.

Really?

Isn't  the key phrase just the "authenticated..." line? Did you ask SM
about that? _That's_ the only thing you need to search on.

> Is  there  a  way in the bat file to point it to some type of a list
> such  as  the  one  spam  assassin  already  has  or  some type of a
> database.

In a sense, yes, but you don't need to do that.

> If  I  utilize: head -10 %1 | find /I /c "string" then this is going
> to require me to enter each string on a separate line.

I  think  you're confused about what you're searching for. The idea is
to catch the header flag that means "this mail was auth'd."

> Then  that  brings  me to a point of asking, If I can utilize the SA
> Database using that method, then what good is SA?

The answer to that is way off this topic. Using a find command against
a filter file is a tiny subset of what SA does.

--Sandy


Re: Hiring for Spam Assassin Troubleshooting

Posted by WFGB Team <we...@spectacularstuff.com>.
Thanks for setting that  straight.  I was confused on what we were searching
for.  I didn't realize I was searching the header.  I thought I was
searching the body of the document for spamming keywords.
 
Wayne
 
-------Original Message-------
 
From: Sanford Whiteman
Date: 06/03/06 13:47:18
To: WFGB Team; users@spamassassin.apache.org
Subject: Re[2]: Hiring for Spam Assassin Troubleshooting
 
> I have talked to the SM tech support and have searched through their
> forum but they believe this is SA issue.
 
It  is  and  it  isn't.  The fact that they don't have a simple way of
skipping  their  external test (and they have had many, many bugs over
the  past  few  years  relating  to  incomplete bypassing of auth'd or
whitelist'd  mails) is an essential design flaw. That they are pushing
back  at  you  like  that,  instead of at least saying they'll add the
feature  in  the  future, is typical of their developers... and is the
reason I never adopted SM.
 
> That  makes  a  lot  of sense. Yes, I am familiar with writing batch
> files. I am not a god at writing them but I can read and write them.
 
Okay, you should be off to the races.
 
> Yes  we do use SMFilter but we call the spamassassin.bat from it. (I
> didn't know we could compile an exe file)
 
No  matter.  How  you're calling SA (bat or exe), when you call it, is
pretty  much  immaterial  now.  What  you need to do is insert a layer
above  everything  else,  so  that  you have SM run _your batch file_,
which in turn _optionally_ runs SMFilter or whatever you want.
 
> Now, here is the issue I see with the bat file.
 
> There are millions of key phrases.
 
Really?
 
Isn't  the key phrase just the "authenticated..." line? Did you ask SM
about that? _That's_ the only thing you need to search on.
 
> Is  there  a  way in the bat file to point it to some type of a list
> such  as  the  one  spam  assassin  already  has  or  some type of a
> database.
 
In a sense, yes, but you don't need to do that.
 
> If  I  utilize: head -10 %1 | find /I /c "string" then this is going
> to require me to enter each string on a separate line.
 
I  think  you're confused about what you're searching for. The idea is
to catch the header flag that means "this mail was auth'd."
 
> Then  that  brings  me to a point of asking, If I can utilize the SA
> Database using that method, then what good is SA?
 
The answer to that is way off this topic. Using a find command against
a filter file is a tiny subset of what SA does.
 
--Sandy
 
.

Re[3]: Hiring for Spam Assassin Troubleshooting

Posted by Sanford Whiteman <sw...@cypressintegrated.com>.
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