From f8336ea84a904db84a8c7f8191552b4e96c86545 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 15 Nov 2009 23:18:15 +0000 Subject: [PATCH] Support for defaultMailOptions attribute Signed-off-by: Stephen Gran --- debian/changelog | 7 +++++++ html/update.html | 7 +++++++ update.cgi | 14 +++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 165b5a5..d483b6d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +userdir-ldap-cgi (0.3.29) unstable; urgency=low + + * Move html into the cgi + * Support for defaultMailOptions attribute + + -- Stephen Gran Sun, 15 Nov 2009 23:17:15 +0000 + userdir-ldap-cgi (0.3.28) unstable; urgency=low * Add myself to uploaders diff --git a/html/update.html b/html/update.html index 9a1ef87..4334cb4 100644 --- a/html/update.html +++ b/html/update.html @@ -423,6 +423,13 @@ Mail Content Inspection Action: + + Default Mail Handling:
+ (If this option is set, several default anti-spam setings will + be applied to the mail handling for your account) + + + Mail Disable Message:
(Note: if this is set, ALL email to your account will be diff --git a/update.cgi b/update.cgi index c4b84d5..c4ad736 100755 --- a/update.cgi +++ b/update.cgi @@ -108,6 +108,12 @@ if (!($query->param('doupdate'))) { $data{mailcallout} = ""; } + if ($data{maildefaultoptions} eq "TRUE") { + $data{maildefaultoptions} = " checked"; + } else { + $data{maildefaultoptions} = ""; + } + $data{mailcontentinspectionaction} ||= 'reject'; $data{email} = CGI::escapeHTML(join(", ", @{$entry->{emailforward}})); @@ -263,7 +269,7 @@ if (!($query->param('doupdate'))) { my ($lat, $long); ($lat, $long) = &Util::CheckLatLong($query->param('latitude'), $query->param('longitude')); - my ($greylisting, $callout, $mailcontentinspection); + my ($greylisting, $callout, $mailcontentinspection, $defaultoptions); $greylisting = $query->param('mailgreylisting'); if (!$greylisting or $greylisting ne "TRUE") { @@ -280,6 +286,11 @@ if (!($query->param('doupdate'))) { $mailcontentinspection = "reject"; } + $defaultoptions = $query->param('maildefaultoptions'); + if (!$defaultoptions or $defaultoptions ne "TRUE") { + $defaultoptions = "FALSE"; + } + my $newsudo; my $newsudo_hosts; if ($query->param('newsudopass') && $query->param('newsudopassvrfy')) { @@ -347,6 +358,7 @@ if (!($query->param('doupdate'))) { &Util::LDAPUpdate($ldap, $editdn, 'mailCallout', $callout); &Util::LDAPUpdate($ldap, $editdn, 'mailContentInspectionAction', $mailcontentinspection); &Util::LDAPUpdate($ldap, $editdn, 'mailGreylisting', $greylisting); + &Util::LDAPUpdate($ldap, $editdn, 'mailDefaultOptions', $defaultoptions); &Util::LDAPUpdate($ldap, $editdn, 'sudoPassword', \@keepsudo); # when we are done, reload the page with the updated details. -- 2.20.1