X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=update.cgi;h=c4ad736c5baea0a5c5683b15e7588ae19f7be4b5;hb=f8336ea84a904db84a8c7f8191552b4e96c86545;hp=c4b84d5673af14b90868904a55296cafc1fdba06;hpb=ad9bee268f54054a26cfd016e550e744a7e7d02c;p=mirror%2Fuserdir-ldap-cgi.git 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.