On 17/09/13 22:38, Mark Constable wrote:
>       Sep 17 21:54:49 goldcoast dspam[10326]: Option --user
>       requires special privileges when user does not match current
>       user, e.g.. root or Trusted User [uid=10003(u10003)]
>
> It's squarely a Dspam issue I am dealing with but I was hoping to make contact
> with anyone on this list that may have some courier + dspam clues because 
> there
> is very little assistance via google.

Well not exactly the solution I was hoping for but the easiest workaround is to
simply add each extra system user as a trusted user, from Dspams point of view,
and then either the simple case of using dspam directly from a mailfilter or
via dspamc (when dpsam runs in --daemon mode) works. For future googlers, with
these settings in /etc/dspam/dspam.conf...

TrustedDeliveryAgent  /usr/bin/maildrop
Include /etc/dspam/dspam.d/

I create a file called /etc/dspam/dspam.d/trustedusers.conf with, for example...

Trust u10003
Trust markc

and have to maintain that file in sync with any users with their own system
uid, whereas previously I only had virtual users in a database with one system
wide uid:gid and therefor only required a single extra Trust line in dspam.conf.
I tried every which way not to have to maintain yet another user id file in
sync with regular virtual users but if one is going to also add entries from
/etc/passwd (real system accounts) then one more extra file turns out to be
the simplest solution.

Then, in /etc/courier/maildroprc, if a user has a .Junk.Spam folder this message
will be run through dspam and if it's tagged as spam then it gets dropped into
the Junk folder...

`test -d $HOME/Maildir/.Junk.Spam`
if (!$RETURNCODE)
{
   xfilter "/usr/bin/dspamc --user $RECIPIENT --stdout --deliver=innocent,spam"

   if (/^X-DSPAM-Result: Spam/:h)
   {
     to "./Maildir/.Junk/."
   }
}

Inside that Junk folder I have 2 retraining folders, Junk.Spam and Junk.NotSpam,
where the user drags any mistrained ham or spam accordingly and a script on a
cron job simply looks at those retraining folders and retrains the spam. Very
simple and once Dspam gets even a few 100 messages "under it's belt" then I find
it gets to 90% effectiveness very quickly and on up to 99% in a month or so.

Below is a typical amavisd + spamassassin setup (where admittedly it also deals
with viruses as well) but for the cost of 600+ MB of ram I find Dspam at zero
ram usage (when not run as a daemon) is far more effective. Sure, dspam can
also be called from spamassassin but then that just adds to the used resources.

~ ps -eo vsz,rss,comm --sort=rss | egrep "(ama|spam|clam)"
  44144  2304 freshclam
140376 56204 spamd child
140376 56216 spamd child
140376 58584 /usr/sbin/spamd
220068 96300 /usr/sbin/amavi
304792 105696 /usr/sbin/amavi
305060 105944 /usr/sbin/amavi
506184 234336 clamd

BTW this is one of the few google hits I could find for courier + dpsam and no
permutation of the below recipe would work for me, it's just plain wrong advice.

http://wiki.ledhed.net/index.php?title=DSpam_COURIER_INTEGRATION


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to