From 265eba372156bdfbde423709d4bac6ce49467920 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Tue, 4 Nov 2025 09:22:26 +0000 Subject: [PATCH] * Tue Nov 04 2025 Brian Read 11.0.0-8.sme - Add defaults for postfix/FilterType and qmail/FilterType [SME: 13267] - Make mailsorting use postfix/FilterType for global filter value [SME: 13267] - Sort out reverting to admin after new rule or apply to inbox [SME: 13255] --- .../e-smith/db/configuration/defaults/postfix/FilterType | 1 + .../e-smith/db/configuration/defaults/qmail/FilterType | 1 + .../smanager/lib/SrvMngr/Controller/Mailsorting-Custom.pm | 4 ++-- .../themes/default/templates/partials/_ms_TABLE.html.ep | 8 ++++---- smeserver-mailsorting.spec | 7 ++++++- 5 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 root/etc/e-smith/db/configuration/defaults/postfix/FilterType create mode 100644 root/etc/e-smith/db/configuration/defaults/qmail/FilterType diff --git a/root/etc/e-smith/db/configuration/defaults/postfix/FilterType b/root/etc/e-smith/db/configuration/defaults/postfix/FilterType new file mode 100644 index 0000000..72d1398 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/postfix/FilterType @@ -0,0 +1 @@ +sieve diff --git a/root/etc/e-smith/db/configuration/defaults/qmail/FilterType b/root/etc/e-smith/db/configuration/defaults/qmail/FilterType new file mode 100644 index 0000000..72d1398 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/qmail/FilterType @@ -0,0 +1 @@ +sieve diff --git a/root/usr/share/smanager/lib/SrvMngr/Controller/Mailsorting-Custom.pm b/root/usr/share/smanager/lib/SrvMngr/Controller/Mailsorting-Custom.pm index ddd01a2..bf69bfb 100644 --- a/root/usr/share/smanager/lib/SrvMngr/Controller/Mailsorting-Custom.pm +++ b/root/usr/share/smanager/lib/SrvMngr/Controller/Mailsorting-Custom.pm @@ -173,7 +173,7 @@ sub get_filtertype{ $cdb = esmith::ConfigDB::UTF8->open(); $adb = esmith::AccountsDB::UTF8->open || die "Couldn't open accounts db"; #Either the filtertype is set per user or it is global - my $globalFilterType = $cdb->get_prop('qmail', "FilterType"); + my $globalFilterType = $cdb->get_prop('postfix', "FilterType"); if (! $globalFilterType) { return $adb->get_prop($PanelUser,'FilterType') || '' } else { @@ -842,4 +842,4 @@ sub nonblankWithSort -1; \ No newline at end of file +1; diff --git a/root/usr/share/smanager/themes/default/templates/partials/_ms_TABLE.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_ms_TABLE.html.ep index fe63527..daa731b 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_ms_TABLE.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_ms_TABLE.html.ep @@ -15,7 +15,7 @@ %= form_for "mailsortingu" => (method => 'POST') => begin % param 'trt' => $ms_data->{trt} unless param 'trt'; %= hidden_field 'trt' => $ms_data->{trt} - %= hidden_field 'account' => $c->{account} + %= hidden_field 'account' => $ms_data->{account} %# Inputs etc in here.

<%=l('ms_Mail_sorting_rules')%>

@@ -89,15 +89,15 @@
- + %= l('ms_Add_new_rule') % if ($filterstr eq "Dovecot Sieve"){ - + %= l('ms_Apply_Sieve'); % } - %# + %# %#= l('ms_Re_Serialise'); %# diff --git a/smeserver-mailsorting.spec b/smeserver-mailsorting.spec index 0856cdf..7d39cef 100644 --- a/smeserver-mailsorting.spec +++ b/smeserver-mailsorting.spec @@ -6,7 +6,7 @@ Summary: Lets users configure procmail or maildrop rules. %define name smeserver-mailsorting Name: %{name} %define version 11.0.0 -%define release 7 +%define release 8 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -32,6 +32,11 @@ SME Server enhancement to enable procmail or maildrop filtering for users. Optionally provides user panels where users can create mail rules for themselves %changelog +* Tue Nov 04 2025 Brian Read 11.0.0-8.sme +- Add defaults for postfix/FilterType and qmail/FilterType [SME: 13267] +- Make mailsorting use postfix/FilterType for global filter value [SME: 13267] +- Sort out reverting to admin after new rule or apply to inbox [SME: 13255] + * Tue Oct 21 2025 Brian Read 11.0.0-7.sme - Typo in REMOVE partial template [SME: 13251] - Update to sievefilter generation for Headers - use whole email address if provided [SME: 13251]