Training SpamAssassin, Horde, IMAP, Plesk user configuration
31 comments
Comment from: Sam [Visitor]
Comment from: Paul KPOGNON [Visitor]
This product is exactly what I was looking for since.
Now I can let my users themselves report their spam as well.
That is fantastic
Comment from: Matt Earwicker [Visitor]
Have successfully done this on RHEL4 and FC5 servers, but RHEL5 has no $conf[’spam’] settings in the /usr/share/psa-horde/config/conf.php file. If I add them, it doesn’t complain, but it doesn’t show up either.
I tried adding myself as an administrator, and changing it from there, but it doesn’t manage to save either, but suggests I edit the file manually. If I copy the suggested text into the conf.php file, it still doesn’t appear.
Any thoughts?
Matt
Comment from: davidnewcomb [Member]
It looks like you have not added the options to the correct config file.
You state:
/usr/share/psa-horde/config/conf.php
but the article states the IMP config file:
/usr/share/psa-horde/imp/config/conf.php
Try adding the options to that instead.
Comment from: Matt Earwicker [Visitor]
Comment from: Matt Earwicker [Visitor]
Ideal! Just what we needed.
Means that we can finally get our users to sort out their own spam settings a bit, rather than having to try and do them for them within Plesk (a step too far for many), which requires a bit of guesswork anyway.
Thanks for the walk-through, I had given up trying to sort something out myself.
Comment from: Matt Earwicker [Visitor]
Just to add to Sam’s first post:
First command should be:
$ chown popuser:popuser saver.sh trainer.sh
Matt
Comment from: davidnewcomb [Member]
Comment from: Mini [Visitor]
Hey guys I need your help! I’ve got the Plesk server recently and every time I try to access the webmail of any of the mails created inside it appears this:
A fatal error has occurred Failed to import Horde configuration: Strict Standards: Non-static method Horde::getTempDir() should not be called statically, assuming $this from incompatible context in /etc/psa-horde/horde/conf.php on line 81 Strict Standards: Non-static method Util::getTempDir() should not be called statically, assuming $this from incompatible context in /usr/share/psa-horde/lib/Horde.php on line 987 Strict Standards: Assigning the return value of new by reference is deprecated in /usr/share/psa-pear/PEAR.php on line 563
Where do i find this: /usr/share/psa-horde/ in the Plesk Panel.. I have no clue..Please Help!!
Comment from: davidnewcomb [Member]
Comment from: DeadSet [Visitor]
I did the following:
Edit the configuration file (/usr/share/psa-horde/imp/config/conf.php) to tell Horde how to do the training, and when to show the “Report as Spam” and “Report as Innocent” links.
But where should this “Report as Spam” and “Report as Innocent” links be displayed in Horde?
Comment from: davidnewcomb [Member]
In the message index page:
Delete | Blacklist | Whitelist | Forward | Report as Spam | Report as Innocent | View Messages
and on the view message page:
Delete | Reply | Forward | Redirect | View Thread | Blacklist | Whitelist | Message Source | Save as | Print | Report as Spam | Report as Innocent
Comment from: Mark Foster [Visitor]
Does this work with Plesk 8.6.0?
Thanks,
Mark Foster
Comment from: davidnewcomb [Member]
Comment from: HDi [Visitor]
Have you tried using the SpamAssassin module for Horde (Sam)?…
http://git.horde.org/horde/-/browse/sam/
It’s kind of old, and I’m wondering if it’s still a viable path for Horde-SpamAssassin integration.
Comment from: Daniel Stefanovski [Visitor]
Hi,
thx for this great tutorial, this is exactly what I was looking for.
Now I got some Problems getting this running.
When I try to run the trainer.sh as popuser or root it says:
# sudo -u popuser ./trainer.sh
ls: cannot access /var/qmail/popuser/train/*.done: No such file or directory
How can I test this if it’s working correct?
I already had the “mark as spam” links and everything available in horde so i see no difference compared to before. It just does nothing…
Should’t the mails i mark as spam go the train folder somehow? the filesystem didnt change since creating the folders as described above.
So looks like it’s not working huh?
My Plesk Install is customized to hell. I use procmail to write Messages marked as ***SPAM*** by Spamassassin to a Spam-Folder in each user dir. (Method described on huschi.net). Does this generate any potential problems?
Comment from: davidnewcomb [Member]
If you already had the “mark as spam” links then you better make sure that the spam-program variables in your conf.php are not redefined.
When you check messages and click “mark as spam” the messages are piped into the train folder via saver.sh and given a special filename which records the username/ham/etc. The email is then moved into the Trash folder or deleted depending on your configuration.
The cron runs the trainer.sh program which runs sa-learn for each email and deletes it.
You can tell that it is working because files appear in the train folder then disappear.
If you have customised the installation then you should be able to trace what is happening yourself because you are basically on your own!
Comment from: Daniel Stefanovski [Visitor]
Hi, thx for your quick reply.
It looks like the saver.sh isn’t triggered from horde UI. When I try to run it manually, it creates those encrypted filenames inside the train dir but theyre not processed until the filename gets the .done ending. When I use bash -x it seems to stop at “cat” and then exit. The encrypted files remain without .done at the end.
But after your last reply I understand what should happen and how this should be working so I think I’ll get this working somehow and then report back with what the problem was.
Thanks alot!
Comment from: Daniel Stefanovski [Visitor]
Sorry for spamming your Blog:P
This is what I get from horde.log
Dec 14 13:11:52 HORDE [error] [imp] Error reporting spam: sh: /saver.sh: not found [on line 114 of “/usr/share/psa-horde/imp/lib/Spam.php"] Dec 14 13:15:58 HORDE [error] [imp] Error reporting spam: sh: /saver.sh: not found [on line 114 of “/usr/share/psa-horde/imp/lib/Spam.php"] Dec 14 13:51:55 HORDE [error] [imp] Error reporting spam: sh: /saver.sh: not found [on line 114 of “/usr/share/psa-horde/imp/lib/Spam.php"] Dec 14 13:53:14 HORDE [error] [imp] Error reporting spam: sh: /saver.sh: not found [on line 114 of “/usr/share/psa-horde/imp/lib/Spam.php"]
Comment from: Daniel Stefanovski [Visitor]
Ok, I’m stuck at this point.
No matter what I enter as a external spam program, the horde log always shows that it couldn’t find it.
If I use just ‘ls’ or ‘top’ instead of calling the saver.sh it tells me that ‘/ls’ or ‘/top’ couldn’t be found.
It aways adds a ‘/’ before the script or program. Seems like a bug to me.
When I give it ‘/var/qmail/popuser/bin saver.sh’ the log tells me:
Dec 14 15:15:02 HORDE [error] [imp] Error reporting spam: sh: /bin: Permission denied [on line 114 of “/usr/share/psa-horde/imp/lib/Spam.php"]
Seems there’s something messed up with the ability to launch external programs.
I did a fresh install of imp before so I dindn’t change anything that could cause this.
Any ideas on this?
Comment from: davidnewcomb [Member]
Comment from: Daniel Stefanovski [Visitor]
I got it working now. Workaround is to put saver.sh directly in servers “/"-Directory.
I didn’t find a way to fix the imp action trigger yet and I’m still waiting for an answer in the official support forum regarding this strange behavior.
But after all your solution works great! Thx alot for this!
My next issue is that ingo’s filters do not work. Do you know a good tutorial / howto for configuring any kind of webmail vacation functionality under a plesk / horde setup?
Comment from: davidnewcomb [Member]
Comment from: free hd movies online [Visitor]
Comment from: Rob [Visitor]
Hi,
Thanks for the useful post!
I tried to install this and I did everything, but I can’t see the links “Report as spam” or “Report as innocent". I did edit the file /usr/share/psa-horde/imp/config/conf.php
,
so I’m not sure what’s wrong. Any advice? I’m on Plesk 8.3
Thank you,
Rob
Comment from: Rob [Visitor]
Comment from: bojan [Visitor]
Form is loading...
Great product…I was struggling with the same functionality (or lack there of).
Btw, I run FC6 with IMP and it works great. The only additions I have is to ensure you place the saver.sh and trainer.sh in the bin folder and
$ chmod popuser:popuser saver.sh trainer.sh $ chmod +x saver.sh trainer.sh
Otherwise, fantastic work…you should offer this how-to up to the Horde-IMP folks…