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.
Thread Tools Display Modes
Old 26th May 2013, 00: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

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...

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

- 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

- 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.

- 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:
yum install dovecot-pigeonhole
Edit /etc/dovecot/dovecot.conf and add sieve support to protocols:
protocols = imap pop3 sieve
Restart dovecot:
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.

$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:

$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 01:12.
Reply With Quote
Sponsored Links
Old 26th May 2013, 15:08
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,001
Thanks: 840
Thanked 5,650 Times in 4,460 Posts

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:

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)
Old 26th May 2013, 15:56
Horfic Horfic is offline
Senior Member
Join Date: Mar 2009
Location: Austria
Posts: 325
Thanks: 55
Thanked 95 Times in 60 Posts
Send a message via Skype™ to Horfic

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)
Old 26th May 2013, 17:29
monkfish monkfish is offline
HowtoForge Supporter
Join Date: Mar 2013
Posts: 106
Thanks: 9
Thanked 15 Times in 14 Posts

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


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 fresh instalation - email tab is empty artur_gib Installation/Configuration 14 28th January 2014 20:02
ISPConfig 3 - Custom Rules question Vilk Installation/Configuration 2 17th April 2010 18:33
Hosting multiple websites and webmail dmwcool Installation/Configuration 8 30th March 2010 04:15
ISPConfig Beta released till General 78 24th December 2008 12:47
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 16:16

All times are GMT +2. The time now is 21:57.

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