Author Topic: markasjunk2 + dspam: permissions  (Read 6348 times)

Offline cbrace

  • Full Member
  • ***
  • Posts: 75
markasjunk2 + dspam: permissions
« on: May 08, 2011, 12:25:03 PM »
I just got markasjunk2 and dspam working together on my FreeBSD server. As a reference for others doing the same, here are the changes in permissions needed so that the webserver running RC can access dspam, where "www" is the user ID of the webserver:

Make dspam executable by the webserver:
Code: [Select]
# chmod go+x /usr/bin/dspam
Make the conf file readable:
Code: [Select]
# chmod go+r /usr/local/etc/dspam.conf
Add the webserver to the 'mail" group so it can access /var/db/dspam/..
Code: [Select]
# pw usermod www -G mail

You also need to add "Trust www" to dspam.conf

Reference: Integrating DSPAM with Roundcube's markasjunk2


FWIW, these are the two commands I am using in ../roundcube/plugins/markasjunk2/config.inc.php
Code: [Select]
$rcmail_config['markasjunk2_spam_cmd'] = "/usr/local/bin/dspam --user %i  --class=spam --source=error --signature=%xds";
$rcmail_config['markasjunk2_ham_cmd'] = "/usr/local/bin/dspam --user %i --class=ham --source=error --signature=%xds";

Offline cbrace

  • Full Member
  • ***
  • Posts: 75
Own followup
« Reply #1 on: May 18, 2011, 04:49:21 AM »
I have found that the "%xds" parameter doesn't seem to work on my installation and using it confuses dspam.

AFAICT, this parameter is superfluous anyway, since dspam writes the signature to the message body or header, and when retraining a message it finds this information and uses it. It isn't necessary to pass the signature on the command line.

Hence, I am now using this:
Code: [Select]
$rcmail_config['markasjunk2_spam_cmd'] = "/usr/local/bin/dspam --user %i  --class=spam --source=error";
$rcmail_config['markasjunk2_ham_cmd'] = "/usr/local/bin/dspam --user %i --class=ham --source=error ";