Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th May 2013, 23:54
monkfish monkfish is offline
HowtoForge Supporter
 
Join Date: Mar 2013
Posts: 106
Thanks: 9
Thanked 15 Times in 14 Posts
Default Use Roundube instead of ISPConfig for SIEVE rules

Hello,
I have put some notes together on what works for me. Userbase aren't really that taken with mailbox filter functionality inside ISPConfig (no disrespect intended, I think ISPConfig is awesome!) and I've tried to make my day a bit quieter by doing this! Here goes...

What
To disable ispconfig from managing SIEVE filters and use Roundcube functionality instead

Why
- better support for multiple statements, eg "match1 AND match2", "match1 OR match2"
- support for filtering on size of email as well as subject, sender, content
- support for multiple actions, eg forward a copy AND move to folder
- users see folder list directly to choose where to filter mail

Drawbacks
- Initial user education/familiarity of using roundcube to manage rules
- haven't found out where to disable mail filter screen for mailboxes inside ISPConfig yet. However, if users do enter rules there they WONT be actioned.
- watch out for subsequent ISPConfig upgrades as a small part of the core code is modified and will have to be reapplied on each update.


Platform
- ISPConfig 3 server running DOVECOT and SIEVE for filter processing
- Roundcube accessible for mailbox users
- Created / tested on CentOS 6.4 x64 (YMMV!)

Changes to dovecot

Install sieve support for dovecot:
Code:
yum install dovecot-pigeonhole
Edit /etc/dovecot/dovecot.conf and add sieve support to protocols:
Code:
protocols = imap pop3 sieve
Restart dovecot:
Code:
service dovecot restart
Changes to ispconfig code

Rewrite ispconfig to NOT write to users .sieve file (Roundcube has multiple rulesets and turns original .sieve filename into a symlink to active ruleset inside a new folder called sieve. We need to stop the filename from being overwritten)

Edit /usr/local/ispconfig/server/plugins-available/maildeliver_plugin.inc.php. Find lines that start "$sieve_file, (currently 100 and 217 could change in later versions of ISPConfig) and change ".sieve" to a different filename. Save the php file.

Code:
..
$sieve_file = $data["new"]["maildir"].'/.sieveispconfig';
..
$sieve_file = $data["old"]["maildir"].'/.sieveispconfig';
..
Changes to Roundcube

The sieve plugin is included by default in Roundcube, we just have to enable it. Edit config/main.inc.php and enable plugin by adding to the array:

Code:
$rcmail_config['plugins'] = array('managesieve');
Log into roundcube as one of the mailbox users and under "settings" you should see a new tab called "filters".
Roundcube uses filter sets - you can have more than one set per user but only one is active at any one time.
You will see an empty filter set called "roundcube" which is now the default. Any previous sets will be greyed out.

NOTE: The syntax created by roundcube seems to be different than the syntax created by ispconfig (both work) so you may not be able to view the old ruleset correctly inside roundcube. It might be trivial for somebody to write a conversion script accordingly.

When creating filters you can choose a variety of attributes and actions for the ruleset. Changes are saved each time the ruleset is saved. Users can also start creating a filter direct from their mailbox - opening an email, selecting the gear icon at the top and "create filter" then following the wizard.

I hope this helps somebody else, please let me know if somethings not clear.

Last edited by monkfish; 26th May 2013 at 00:12.
Reply With Quote
Sponsored Links
  #2  
Old 26th May 2013, 14:08
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

Have you considered to use the roundcube ispconfig plugin instead? It allows to add filter rules as well from within roundcube but its compatible with ispconfig and offers even more functions for ispconfig mailboxes from within roundcube:

https://github.com/w2c/ispconfig3_roundcube
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
monkfish (26th May 2013)
  #3  
Old 26th May 2013, 14:56
Horfic Horfic is offline
Senior Member
 
Join Date: Mar 2009
Location: Austria
Posts: 324
Thanks: 55
Thanked 93 Times in 58 Posts
Send a message via Skype™ to Horfic
Default

beside of using my plugins, you can also create a backend for one of the available sieve plugins for roundcube.
__________________
web wack creations - We create your custom web application
Mailuser interface for ISPConfig 3
Reply With Quote
The Following User Says Thank You to Horfic For This Useful Post:
monkfish (26th May 2013)
  #4  
Old 26th May 2013, 16:29
monkfish monkfish is offline
HowtoForge Supporter
 
Join Date: Mar 2013
Posts: 106
Thanks: 9
Thanked 15 Times in 14 Posts
 
Default

Ta for that, will check it out.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.3.3 fresh instalation - email tab is empty artur_gib Installation/Configuration 14 28th January 2014 19:02
ISPConfig 3 - Custom Rules question Vilk Installation/Configuration 2 17th April 2010 17:33
Hosting multiple websites and webmail dmwcool Installation/Configuration 8 30th March 2010 03:15
ISPConfig 3.0.0.7 Beta released till General 78 24th December 2008 11:47
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 15:16


All times are GMT +2. The time now is 04:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.