<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Training SpamAssassin, Horde, IMAP, Plesk user configuration</title> 
  <pubDate>Thu, 09 Apr 2026 22:56:14 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/6364</link> 
  <atom:link rel="self" type="application/rss+xml" title="Training SpamAssassin, Horde, IMAP, Plesk user configuration" href="https://bugs.horde.org/ticket/6364/rss" /> 
  <description>Training SpamAssassin, Horde, IMAP, Plesk user configuration</description> 
 
   
   
  <item> 
   <title>I wrote an article on how to configure Horde to do user spec</title> 
   <description>I wrote an article on how to configure Horde to do user specific on-demand spam learning under a plesk environment. Had a comment from someone to say they were trying to do this and there was no documentation for it.



It would be nice if you could incorporate some of it into the real application.

In particular it shows how to patch imp/lib/Spam.php so that it correctly obtains the user name to be handled, and gives an example of what $conf[&#039;notspam&#039;][&#039;program&#039;] and $conf[&#039;spam&#039;][&#039;program&#039;] variables may be set to.





Full article at:

http://www.bigsoft.co.uk/blog/index.php/2007/08/30/horde_spamassassin_imap_plesk_user_confi

</description> 
   <pubDate>Mon, 03 Mar 2008 17:21:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6364#t43349</link> 
  </item> 
   
  <item> 
   <title>Can you attach your patch here?</title> 
   <description>Can you attach your patch here?</description> 
   <pubDate>Tue, 04 Mar 2008 16:29:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6364#t43371</link> 
  </item> 
   
  <item> 
   <title>The problem with Spam.php is that spam programs typically ne</title> 
   <description>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[&#039;conf&#039;][$action][&#039;program&#039;])) {

	$raw_msg = $imp_contents-&gt;fullMessageText();

	/* Use a pipe to write the message contents. This should

	* be secure. */

	$email_address = explode(&quot;@&quot;, Auth::getAuth());

	 

	$prog = str_replace(&#039;%u&#039;, escapeshellarg(Auth::getAuth()), $GLOBALS[&#039;conf&#039;][$action][&#039;program&#039;]);

	$prog = str_replace(&#039;%l&#039;, escapeshellarg($email_address[0]), $prog);

	$prog = str_replace(&#039;%d&#039;, escapeshellarg($email_address[1]), $prog);

	$proc = proc_open($prog,



So that my command lines are:



SPAM=&quot;/usr/bin/sa-learn -u %u --dbpath /var/qmail/mailnames/%d/%l/.spamassassin -L --spam&quot;

HAM=&quot;/usr/bin/sa-learn -u %u --dbpath /var/qmail/mailnames/%d/%l/.spamassassin -L --ham&quot;



In imp/config/conf.php the only related options are:



$conf[&#039;spam&#039;][&#039;reporting&#039;] = false;

$conf[&#039;notspam&#039;][&#039;reporting&#039;] = 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[&#039;spam&#039;][&#039;program&#039;] = &#039;&#039;;

$conf[&#039;notspam&#039;][&#039;program&#039;]  = &#039;&#039;;





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.</description> 
   <pubDate>Tue, 04 Mar 2008 17:26:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6364#t43372</link> 
  </item> 
   
  <item> 
   <title>The program parameters are already in conf.xml.  Can you see</title> 
   <description>The program parameters are already in conf.xml.  Can you see if this patch makes things easier for you?</description> 
   <pubDate>Tue, 04 Mar 2008 18:13:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6364#t43373</link> 
  </item> 
   
  <item> 
   <title>Your patch is a far more elegant way of doing it.

Will this</title> 
   <description>Your patch is a far more elegant way of doing it.

Will this go into the main release?



I have been unable to make the contents of conf.xml appear anyway via web interface. I can see that the file contains instructions for the different options in the conf.php file, but how is it supposed to be read.

Nothing in that directory references it.

</description> 
   <pubDate>Wed, 05 Mar 2008 10:59:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6364#t43396</link> 
  </item> 
   
  <item> 
   <title>This will be in the next RC for IMP 4.2.



To see the conf.</title> 
   <description>This will be in the next RC for IMP 4.2.



To see the conf.xml changes, you need to visit http://yoursite/horde/admin/setup/  If you have further questions about using the setup screens, please ask on the mailing list.</description> 
   <pubDate>Wed, 05 Mar 2008 17:57:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6364#t43406</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
