[Tickets #6364] Re: Training SpamAssassin, Horde, IMAP, Plesk user configuration
bugs at horde.org
bugs at horde.org
Tue Mar 4 17:26:51 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/6364
-----------------------------------------------------------------------
Ticket | 6364
Updated By | david.newcomb at bigsoft.co.uk
Summary | Training SpamAssassin, Horde, IMAP, Plesk user configuration
Queue | IMP
Version | HEAD
Type | Enhancement
State | Feedback
Priority | 1. Low
Milestone |
Patch |
Owners |
-----------------------------------------------------------------------
david.newcomb at bigsoft.co.uk (2008-03-04 12:26) wrote:
The problem with Spam.php is that spam programs typically need to know the
user name and domain in order to run properly (this is especially true when
running virtual hosts or co-location).
Horde-IMP supports %u for the whole email address. I have added %l for
user name and %d for domain.
horde/imp/lib/Spam.php:
/* If a (not)spam reporting program has been provided, use
* it. */
if (!empty($GLOBALS['conf'][$action]['program'])) {
$raw_msg = $imp_contents->fullMessageText();
/* Use a pipe to write the message contents. This should
* be secure. */
$email_address = explode("@", Auth::getAuth());
$prog = str_replace('%u', escapeshellarg(Auth::getAuth()),
$GLOBALS['conf'][$action]['program']);
$prog = str_replace('%l', escapeshellarg($email_address[0]), $prog);
$prog = str_replace('%d', escapeshellarg($email_address[1]), $prog);
$proc = proc_open($prog,
So that my command lines are:
SPAM="/usr/bin/sa-learn -u %u --dbpath
/var/qmail/mailnames/%d/%l/.spamassassin -L --spam"
HAM="/usr/bin/sa-learn -u %u --dbpath
/var/qmail/mailnames/%d/%l/.spamassassin -L --ham"
In imp/config/conf.php the only related options are:
$conf['spam']['reporting'] = false;
$conf['notspam']['reporting'] = false;
It took ages hunting through the source code to find that filtering
programs were supported and have config options. Please can you add these
to imp/config/conf.php
$conf['spam']['program'] = '';
$conf['notspam']['program'] = '';
The rest of the article talks about the fact that the web service runs
under a different user to the email subsystem and there are permission
conflicts that need to be resolved so that the web user can submit work to
the spam engine. I think these issues are beyond the scope of Horde.
More information about the bugs
mailing list