From 2cb1563f63386b35a69e460051aa9b4a2851d104 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Wed, 30 May 2012 07:30:44 -0400 Subject: [PATCH] - Added (clickable) placeholders to client messaging function. - Added check so that the client password isn't inserted into the message (for security reasons). --- server/plugins-available/maildeliver_plugin.inc.php | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/maildeliver_plugin.inc.php b/server/plugins-available/maildeliver_plugin.inc.php index 5701799..25e4cf2 100644 --- a/server/plugins-available/maildeliver_plugin.inc.php +++ b/server/plugins-available/maildeliver_plugin.inc.php @@ -101,9 +101,23 @@ if(is_file($sieve_file)) unlink($sieve_file) or $app->log("Unable to delete file: $sieve_file",LOGLEVEL_WARN); $app->load('tpl'); - + + //* Select sieve filter file for dovecot version + exec('dovecot --version',$tmp); + if(substr($tmp[0],0,3) == '1.0') { + $filter_file_template = "sieve_filter.master"; + } elseif(substr($tmp[0],0,3) == '1.2') { + $filter_file_template = "sieve_filter_1.2.master"; + } elseif(substr($tmp[0],0,1) == '2') { + $filter_file_template = "sieve_filter_1.2.master"; + } else { + $filter_file_template = "sieve_filter.master"; + } + unset($tmp); + + //* Create new filter file based on template $tpl = new tpl(); - $tpl->newTemplate("sieve_filter.master"); + $tpl->newTemplate($filter_file_template); // cc Field $tpl->setVar('cc',$data["new"]["cc"]); -- Gitblit v1.9.1