> We already have SA setup and working with Smartermail.

Well, not really. I'd say part and parcel of any SA-MTA integration is
finding  a way to whitelist messages _before SA is launched_, thus (a)
saving   you   SA's  CPU  and  disk  time  (esp.  since  you're  using
process-based spamassassin and not client/server spamc/spamd), and (b)
eliminating  problems  like  this caused when DNS and/or local content
issues force SA to judge your messages as spammy. SA itself is not the
place for true whitelisting; you really want to do this pre-SA.

Anyway, SmarterMail shells to the external command-line you specify --
you   may   be   calling   SMFilter  (a  tiny  wrapper  for  Clam  and
SpamAssassin),     or    calling    spamassassin.bat    or    compiled
spamassassin.exe  directly  --  passing  the  body  file  name as last
argument. You can thus retrieve the body file name from within a batch
file as %1, if you've ever worked with batch file syntax.

Within  the  first  couple of headers added by SmarterMail, you'll see
whether  the  mail  was  submitted  by an authenticated user or not. I
don't  know  their  exact syntax offhand, but I know that SM does pass
the authentication info to external apps. Ask on the SM forum what the
exact string'll be. Then I'd suggest writing a batch file that, at the
very  top  before  calling  spamassassin,  uses  a text search/replace
utility to search only the first, say, 10 lines for a known string and
skips calling SA if the string is found. Pseudo-batch:

head -10 %1 | find /i /c "string"

if %ERRORLEVEL%==0

     (exit from batch file and return to smartermail, mail was auth'd)

else

     (scan with SA, since authentication string was not found)

This  example uses the unxtools version of head.exe, which you can get
from  http://gnuwin.epfl.ch/apps/unxutils/en/index.html.

While you may not be comfortable with this course of action either, it
does  tap  into a different skill set that may be more familiar to you
than  DNS.  You should have a way going forward of excluding mail from
being even touched by SA.

BTW,  I consider this a SmarterMail issue as much as an SA one, and as
such I hope you have been thorough enough to ask on their forum, or at
least you will now.

--Sandy






Reply via email to