Compare commits
	
		
			4 Commits
		
	
	
		
			11_0_0-94_
			...
			11_0_0-98_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8ada3f36e0 | |||
| ab42f986e8 | |||
| 803bfd1cec | |||
| 0f2e2b82aa | 
@@ -37,7 +37,7 @@ use esmith::NavigationDB; # no UTF8 raw is ok for ASCII only flat file
 | 
			
		||||
use SrvMngr_Auth qw(check_admin_access);
 | 
			
		||||
 | 
			
		||||
#this is overwrittrn with the "release" by the spec file - release can be "99.el8.sme"
 | 
			
		||||
our $VERSION = '93.el8.sme'; 
 | 
			
		||||
our $VERSION = '94.el8.sme'; 
 | 
			
		||||
#Extract the release value
 | 
			
		||||
if ($VERSION =~ /^(\d+)/) {
 | 
			
		||||
    $VERSION = $1;  # $1 contains the matched numeric digits
 | 
			
		||||
@@ -328,6 +328,7 @@ sub setup_routing {
 | 
			
		||||
    $if_admin->get('/datetime')->to('datetime#main')->name('datetime');
 | 
			
		||||
    $if_admin->post('/datetimeu')->to('datetime#do_update')->name('datetimeu');
 | 
			
		||||
    $if_admin->get('/datetimed')->to('datetime#do_display')->name('datetimed');
 | 
			
		||||
    $if_admin->post('/datetimet')->to('datetime#do_testntp')->name('datetimet');
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    $if_admin->get('/directory')->to('directory#main')->name('directory');
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,8 @@ use esmith::NetworksDB::UTF8;
 | 
			
		||||
use esmith::HostsDB;
 | 
			
		||||
use esmith::DomainsDB::UTF8;
 | 
			
		||||
 | 
			
		||||
use DateTime;
 | 
			
		||||
 | 
			
		||||
use constant FALSE => 0;
 | 
			
		||||
use constant TRUE  => 1;
 | 
			
		||||
 | 
			
		||||
@@ -79,6 +81,7 @@ my $ddb;
 | 
			
		||||
		my $now_sec     = sprintf('%02d', $today_sec);
 | 
			
		||||
		my $current_year = $today_year;
 | 
			
		||||
		my $ntpserverurl = $cdb->get_prop('ntpd','NTPServer');
 | 
			
		||||
		my $now = DateTime->now( time_zone => 'local' );
 | 
			
		||||
		my %ret = (
 | 
			
		||||
			# fields from Inputs 
 | 
			
		||||
			'time_mode'=>($ntpserverurl eq '' ? 'dat_manually_set' : 'dat_ntp_server'),
 | 
			
		||||
@@ -90,6 +93,8 @@ my $ddb;
 | 
			
		||||
			'minute'=>"$now_min",
 | 
			
		||||
			'second'=>"$now_sec",
 | 
			
		||||
			'ntpstatus' => $cdb->get_prop('ntpd','status') || 'disabled',
 | 
			
		||||
			# and the current time as a full format 
 | 
			
		||||
			'currentdatetime' => $now->strftime('%Y-%m-%dT%H:%M:%S')
 | 
			
		||||
			
 | 
			
		||||
		);
 | 
			
		||||
		return %ret;
 | 
			
		||||
@@ -224,38 +229,12 @@ sub validate_change_datetime {
 | 
			
		||||
        $timezone = "US/Eastern";
 | 
			
		||||
    }
 | 
			
		||||
    my $month = $c->param('month');
 | 
			
		||||
 | 
			
		||||
    if ($month =~ /^(\d{1,2})$/) {
 | 
			
		||||
        $month = $1;
 | 
			
		||||
    } else {
 | 
			
		||||
        $month = "1";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (($month < 1) || ($month > 12)) {
 | 
			
		||||
        return $c->l('dat_INVALID_MONTH') . " $month. " . $c->l('dat_MONTH_BETWEEN_1_AND_12');
 | 
			
		||||
    }
 | 
			
		||||
    my $day = $c->param('day');
 | 
			
		||||
 | 
			
		||||
    if ($day =~ /^(\d{1,2})$/) {
 | 
			
		||||
        $day = $1;
 | 
			
		||||
    } else {
 | 
			
		||||
        $day = "1";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (($day < 1) || ($day > 31)) {
 | 
			
		||||
        return $c->l('dat_INVALID_DAY') . " $day. " . $c->l('dat_BETWEEN_1_AND_31');
 | 
			
		||||
    }
 | 
			
		||||
    my $year = $c->param('year');
 | 
			
		||||
    if (!is_valid_date($year, $month, $day)){
 | 
			
		||||
		return $c->l('dat_Invalid_date')
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    if ($year =~ /^(\d{4})$/) {
 | 
			
		||||
        $year = $1;
 | 
			
		||||
    } else {
 | 
			
		||||
        $year = "2000";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (($year < 1900) || ($year > 2200)) {
 | 
			
		||||
        return $c->l('dat_INVALID_YEAR') . " $year. " . $c->l('dat_FOUR_DIGIT_YEAR');
 | 
			
		||||
    }
 | 
			
		||||
    my $hour = $c->param('hour');
 | 
			
		||||
 | 
			
		||||
    if ($hour =~ /^(\d{1,2})$/) {
 | 
			
		||||
@@ -289,24 +268,6 @@ sub validate_change_datetime {
 | 
			
		||||
    if (($second < 0) || ($second > 59)) {
 | 
			
		||||
        return $c->l('dat_INVALID_SECOND') . " $second. " . $c->l('dat_BETWEEN_0_AND_59');
 | 
			
		||||
    }
 | 
			
		||||
    #my $ampm = $c->param('Ampm');
 | 
			
		||||
 | 
			
		||||
	#Move to 24 hours clock  - not using AM/PM.
 | 
			
		||||
    #if ($ampm =~ /^(AM|PM)$/) {
 | 
			
		||||
        #$ampm = $1;
 | 
			
		||||
    #} else {
 | 
			
		||||
        #$ampm = "AM";
 | 
			
		||||
    #}
 | 
			
		||||
    # force AM so that it actually works on 24hr clock.
 | 
			
		||||
    #$ampm = "AM";
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    # convert to 24 hour time
 | 
			
		||||
    #$hour = $hour % 12;
 | 
			
		||||
 | 
			
		||||
    #if ($ampm eq "PM") {
 | 
			
		||||
    #    $hour = $hour + 12;
 | 
			
		||||
    #}
 | 
			
		||||
 | 
			
		||||
    #--------------------------------------------------
 | 
			
		||||
    # Store time zone in configuration database
 | 
			
		||||
@@ -325,10 +286,27 @@ sub validate_change_datetime {
 | 
			
		||||
    # and hardware clock
 | 
			
		||||
    #--------------------------------------------------
 | 
			
		||||
    my $newdate = sprintf "%02d%02d%02d%02d%04d.%02d", $month, $day, $hour, $minute, $year, $second;
 | 
			
		||||
    esmith::util::backgroundCommand(2, "/sbin/e-smith/signal-event", "timezone-update", $newdate);
 | 
			
		||||
    $c->app->log->info("Changing date manually to $newdate");
 | 
			
		||||
    esmith::util::backgroundCommand(2, "/sbin/e-smith/signal-event", "timezone-update", $newdate); #TEMP!!!
 | 
			
		||||
    return '';
 | 
			
		||||
} ## end sub validate_change_datetime
 | 
			
		||||
 | 
			
		||||
sub is_valid_date {
 | 
			
		||||
  my ($year, $month, $day) = @_;
 | 
			
		||||
 | 
			
		||||
  # Check if all parts are defined and integers
 | 
			
		||||
  return 0 unless defined $year && defined $month && defined $day;
 | 
			
		||||
  return 0 unless $year =~ /^\d+$/ && $month =~ /^\d+$/ && $day =~ /^\d+$/;
 | 
			
		||||
 | 
			
		||||
  # Try to construct a DateTime object
 | 
			
		||||
  eval {
 | 
			
		||||
    DateTime->new(year => $year, month => $month, day => $day);
 | 
			
		||||
    1;
 | 
			
		||||
  } or return 0;
 | 
			
		||||
 | 
			
		||||
  return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub update_ntpserver {
 | 
			
		||||
    my $c         = shift;
 | 
			
		||||
    my $ntpserver = shift;
 | 
			
		||||
@@ -378,6 +356,4 @@ sub disable_ntp {
 | 
			
		||||
    return '';
 | 
			
		||||
} ## end sub disable_ntp
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
1;
 | 
			
		||||
@@ -8,6 +8,9 @@ package SrvMngr::Controller::Datetime;
 | 
			
		||||
# heading     : System
 | 
			
		||||
# description : Date and time
 | 
			
		||||
# navigation  : 4000 300
 | 
			
		||||
#
 | 
			
		||||
# ######name   : datetimet,    method : post,   url : /datetimet,     ctlact : datetime#testntp
 | 
			
		||||
#
 | 
			
		||||
# routes : end
 | 
			
		||||
#
 | 
			
		||||
# Documentation: https://wiki.contribs.org/Datetime
 | 
			
		||||
@@ -115,7 +118,7 @@ sub do_update {
 | 
			
		||||
    my $c = shift;
 | 
			
		||||
    $c->app->log->info($c->log_req);
 | 
			
		||||
    
 | 
			
		||||
    $c->app->log->info($c->param('month'));
 | 
			
		||||
    #$c->app->log->info($c->param('month'));
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
	#The most common ones - you might want to delete some of these if they are not used.
 | 
			
		||||
@@ -173,7 +176,7 @@ sub do_update {
 | 
			
		||||
					$c->render(template => "datetime");	
 | 
			
		||||
					return
 | 
			
		||||
				} else {
 | 
			
		||||
					if ($c->param('time_mode') eq 'data_manually_set') {
 | 
			
		||||
					if ($c->param('time_mode') eq 'dat_manually_set') {
 | 
			
		||||
						$c->stash( success => $c->l('dat_UPDATING_CLOCK')); 
 | 
			
		||||
					} else {
 | 
			
		||||
						$c->stash( success => $c->l('dat_SETTINGS_CHANGED')); 
 | 
			
		||||
@@ -279,5 +282,52 @@ sub do_display {
 | 
			
		||||
		dat_data  => \%dat_data
 | 
			
		||||
	);
 | 
			
		||||
	$c->render(template => "datetime");
 | 
			
		||||
}    
 | 
			
		||||
}  
 | 
			
		||||
 | 
			
		||||
sub do_testntp {
 | 
			
		||||
    my $c = shift;
 | 
			
		||||
    my $server = $c->req->json->{ntpserver} // '';
 | 
			
		||||
 | 
			
		||||
    # Strict validation: hostname or IPv4
 | 
			
		||||
    unless ($server =~ /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*|\d{1,3}(?:\.\d{1,3}){3})$/) {
 | 
			
		||||
        return $c->render(json => { success => 0, error => 'Invalid server name or IP' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    my $timeout = 5;
 | 
			
		||||
    my @cmd = ('timeout', $timeout, 'ntpdate', '-q', $server);
 | 
			
		||||
 | 
			
		||||
    # Run ntpdate and capture output
 | 
			
		||||
    my $output = qx{@cmd 2>&1};
 | 
			
		||||
    $c->app->log->info($output);
 | 
			
		||||
    my $exit_code = $? >> 8;
 | 
			
		||||
 | 
			
		||||
    # Parse for known errors
 | 
			
		||||
    if ($exit_code == 124) {
 | 
			
		||||
        return $c->render(json => { success => 0, error => "Timeout: NTP server did not respond within $timeout seconds" });
 | 
			
		||||
    }
 | 
			
		||||
    if ($output =~ /no server suitable for synchronization found/i) {
 | 
			
		||||
        return $c->render(json => { success => 0, error => "No suitable NTP server found or server unreachable" });
 | 
			
		||||
    }
 | 
			
		||||
    if ($output =~ /Name or service not known|Temporary failure in name resolution/i) {
 | 
			
		||||
        return $c->render(json => { success => 0, error => "DNS resolution failed for $server" });
 | 
			
		||||
    }
 | 
			
		||||
    if ($output =~ /ntpdig: no eligible servers/i) {
 | 
			
		||||
        return $c->render(json => { success => 0, error => "Not a an NTP server" });
 | 
			
		||||
    }
 | 
			
		||||
    if ($output =~ /permission denied/i) {
 | 
			
		||||
        return $c->render(json => { success => 0, error => "Permission denied running ntpdate" });
 | 
			
		||||
    }
 | 
			
		||||
    if ($exit_code != 0) {
 | 
			
		||||
        return $c->render(json => { success => 0, error => "ntpdate failed (exit code $exit_code): $output" });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # Extract date and time down to seconds from adjust line
 | 
			
		||||
	my ($datetime) = $output =~ /^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})/m;
 | 
			
		||||
 | 
			
		||||
	if ($datetime) {
 | 
			
		||||
		return $c->render(json => { success => 1, time => $datetime });
 | 
			
		||||
	} else {
 | 
			
		||||
		return $c->render(json => { success => 0, error => "Could not parse date/time from NTP server response." });}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
1;
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,5 +1,5 @@
 | 
			
		||||
 | 
			
		||||
'dat_FORM_TITLE' => 'Date and time configuration',
 | 
			
		||||
'dat_The_time_is_currently' => 'The time is currently:',
 | 
			
		||||
'dat_INITIAL_DESC' => 'This is where you configure the date and time of this server. You may use an existing network time server or
 | 
			
		||||
manually set the date and time for your time zone.',
 | 
			
		||||
'dat_SET_DATE_TITLE' => 'Set Date and Time',
 | 
			
		||||
@@ -58,4 +58,5 @@ clock, and <b>will not</b> try to synchronize from a time server.',
 | 
			
		||||
'dat_ntp_server' => 'NTP server',
 | 
			
		||||
'dat_manually_set' => 'Set manually',
 | 
			
		||||
'dat_NTP_Server_URL' =>'NTP Server URL:',
 | 
			
		||||
'dat_set_manually' =>'Set Date and Time:',
 | 
			
		||||
'dat_set_manually' =>'Set Date and Time:',
 | 
			
		||||
'dat_Invalid_date' => 'Invalid date',
 | 
			
		||||
@@ -1,6 +1,5 @@
 | 
			
		||||
 | 
			
		||||
'mai_FORM_TITLE' => 'E-mail settings',
 | 
			
		||||
'E-mail' => 'E-mail',
 | 
			
		||||
'mai_E-Mail' => 'E-mail',
 | 
			
		||||
'mai_SUCCESS' => 'The new e-mail settings have been saved.',
 | 
			
		||||
'mai_NEVER' => 'not at all',
 | 
			
		||||
'mai_EVERY5MIN' => 'Every 5 minutes',
 | 
			
		||||
@@ -20,7 +19,7 @@ for dialup connections), or multi-drop (for dialup connections if
 | 
			
		||||
ETRN is not supported by your Internet provider). Note that
 | 
			
		||||
multi-drop mode is the only option available when the server is
 | 
			
		||||
configured in private server and gateway mode.',
 | 
			
		||||
'mai_LABEL_DELEGATE' => 'Address of internal mail server',
 | 
			
		||||
'mai_LABEL_DELEGATE' => 'IP Address of internal mail server',
 | 
			
		||||
'mai_TITLE_DELEGATE' => 'Delegate mail servers',
 | 
			
		||||
'mai_DESC_DELEGATE' => 'Your server includes a complete, full-featured e-mail server. However,
 | 
			
		||||
if for some reason you wish to delegate e-mail processing to
 | 
			
		||||
@@ -79,10 +78,9 @@ destination (recommended in most cases) or can deliver them via
 | 
			
		||||
your Internet provider\'s SMTP server (recommended if you have an
 | 
			
		||||
unreliable Internet connection or are using a residential Internet
 | 
			
		||||
service). If using your Internet provider\'s SMTP server, specify
 | 
			
		||||
its hostname or IP address below. Otherwise leave this field
 | 
			
		||||
blank.',
 | 
			
		||||
'mai_INVALID_SMARTHOST' => 'The smarthost name you entered is not a valid internet domain name
 | 
			
		||||
and is not blank',
 | 
			
		||||
its hostname or IP address below. Otherwise leave this field blank.',
 | 
			
		||||
'mai_INVALID_SMARTHOST' => 'The smarthost name you entered is not a valid internet domain name and is not blank',
 | 
			
		||||
'mai_INVALID_DELEGATE' => 'The delegate host name you entered is not a valid IP Address and is not blank',
 | 
			
		||||
'mai_DESC_POP_ACCESS_CONTROL' => 'You can control POP3 server access. The setting \'Allow access
 | 
			
		||||
only from local networks\' allows POP3 access only from your
 | 
			
		||||
local network(s). The POP3S setting can be used to provide
 | 
			
		||||
@@ -150,5 +148,9 @@ The value for this tag can be defined below.',
 | 
			
		||||
'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS' => 'SMTP Authentication for Internet provider',
 | 
			
		||||
'mai_LABEL_SMARTHOST_SMTPAUTH_USERID' => 'Mail server user id',
 | 
			
		||||
'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD' => 'Mail server password',
 | 
			
		||||
'mai_VALIDATION_SMTPAUTH_NONBLANK' => 'This field cannot be left blank if SMTP Authentication is
 | 
			
		||||
'mai_VALIDATION_SMTPAUTH_NONBLANK' => 'The user id and password fields cannot be left blank if SMTP Authentication is
 | 
			
		||||
enabled.',
 | 
			
		||||
'mai_ACC_panel_action_was_successful' => 'Email access settings saved sucessfully',
 | 
			
		||||
'mai_DEL_panel_action_was_successful' => 'Email delivery settings saved sucessfully',
 | 
			
		||||
'mai_FIL_panel_action_was_successful' => 'Email filtering settings saved sucessfully',
 | 
			
		||||
'mai_REC_panel_action_was_successful' => 'Email receive settings saved sucessfully',
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
.datetime-label-col {
 | 
			
		||||
  background: #e8f3e2; /* light green */
 | 
			
		||||
  padding: 1em 0em 0em 0em;
 | 
			
		||||
  min-width: 192px;
 | 
			
		||||
  min-width: 30%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: flex-start;
 | 
			
		||||
  justify-content: flex-end;
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.datetime-label {
 | 
			
		||||
  display: block;
 | 
			
		||||
	display:inline-flex;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.datetime-fields-col {
 | 
			
		||||
@@ -26,4 +26,26 @@
 | 
			
		||||
  border: 1px solid #ccc;
 | 
			
		||||
  border-left: none;
 | 
			
		||||
  border-radius: 0 4px 4px 0;
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.datetime-clock {
 | 
			
		||||
	min-width: 20em;
 | 
			
		||||
	display:inline-flex;
 | 
			
		||||
	border:0px;
 | 
			
		||||
	padding:5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.datetime-clock-label {
 | 
			
		||||
	background-color:#e8f3e2;
 | 
			
		||||
	display:inline-flex;
 | 
			
		||||
	width:30%;
 | 
			
		||||
	font-weight:bold;
 | 
			
		||||
	text-align:right;
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.ntp-test-result { font-weight: bold; }
 | 
			
		||||
.ntp-test-success { color: green; }
 | 
			
		||||
.ntp-test-error   { color: red; }
 | 
			
		||||
.ntp-test-wait    { color: #333; }
 | 
			
		||||
@@ -0,0 +1,14 @@
 | 
			
		||||
/*
 | 
			
		||||
Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
 | 
			
		||||
*/
 | 
			
		||||
.Emailsettings-panel {}
 | 
			
		||||
.name {}
 | 
			
		||||
.rout {}
 | 
			
		||||
.name {}
 | 
			
		||||
.rout {}
 | 
			
		||||
.name {}
 | 
			
		||||
.rout {}
 | 
			
		||||
.name {}
 | 
			
		||||
.rout {}
 | 
			
		||||
.name {}
 | 
			
		||||
.rout {}
 | 
			
		||||
@@ -15,4 +15,87 @@ document.addEventListener('DOMContentLoaded', function() {
 | 
			
		||||
 | 
			
		||||
  select.addEventListener('change', toggleSections);
 | 
			
		||||
  toggleSections(); // Set initial state
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
document.addEventListener('DOMContentLoaded', function() {
 | 
			
		||||
  // Parse the initial server time from the input value
 | 
			
		||||
  const clockElement = document.getElementById('real-time-clock');
 | 
			
		||||
  if (!clockElement) return;
 | 
			
		||||
 | 
			
		||||
  // Get the initial server time from the input's value
 | 
			
		||||
  let serverTime = new Date(clockElement.value.replace(' ', 'T'));
 | 
			
		||||
 | 
			
		||||
  function updateDateTime() {
 | 
			
		||||
    // Format the date/time string as desired
 | 
			
		||||
    const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
 | 
			
		||||
    const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
 | 
			
		||||
 | 
			
		||||
    const dayOfWeek = daysOfWeek[serverTime.getDay()];
 | 
			
		||||
    const month = months[serverTime.getMonth()];
 | 
			
		||||
    const day = serverTime.getDate();
 | 
			
		||||
    const year = serverTime.getFullYear();
 | 
			
		||||
 | 
			
		||||
    let hours = serverTime.getHours();
 | 
			
		||||
    const ampm = hours >= 12 ? 'PM' : 'AM';
 | 
			
		||||
    hours = hours % 12 || 12;
 | 
			
		||||
 | 
			
		||||
    const minutes = serverTime.getMinutes().toString().padStart(2, '0');
 | 
			
		||||
    const seconds = serverTime.getSeconds().toString().padStart(2, '0');
 | 
			
		||||
 | 
			
		||||
    const dateTimeString = `${dayOfWeek}, ${month} ${day}, ${year} ${hours}:${minutes}:${seconds} ${ampm}`;
 | 
			
		||||
    clockElement.value = dateTimeString;
 | 
			
		||||
 | 
			
		||||
    // Advance serverTime by one second
 | 
			
		||||
    serverTime.setSeconds(serverTime.getSeconds() + 1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  updateDateTime();
 | 
			
		||||
  setInterval(updateDateTime, 1000);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
document.addEventListener('DOMContentLoaded', function() {
 | 
			
		||||
  const btn = document.getElementById('test-ntp-btn');
 | 
			
		||||
  const input = document.getElementById('ntpserver');
 | 
			
		||||
  const result = document.getElementById('ntp-test-result');
 | 
			
		||||
 | 
			
		||||
  btn.addEventListener('click', function() {
 | 
			
		||||
    const server = input.value.trim();
 | 
			
		||||
    result.className = 'ntp-test-result'; // reset
 | 
			
		||||
 | 
			
		||||
    if (!server) {
 | 
			
		||||
      result.textContent = "Please enter a server address.";
 | 
			
		||||
      result.classList.add('ntp-test-error');
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    result.textContent = "Testing...";
 | 
			
		||||
    result.classList.add('ntp-test-wait');
 | 
			
		||||
 | 
			
		||||
    fetch('/smanager/datetimet', {
 | 
			
		||||
      method: 'POST',
 | 
			
		||||
      headers: {'Content-Type': 'application/json'},
 | 
			
		||||
      body: JSON.stringify({ ntpserver: server })
 | 
			
		||||
    })
 | 
			
		||||
    .then(response => {
 | 
			
		||||
      if (!response.ok) {
 | 
			
		||||
        // HTTP error, e.g., 404, 500
 | 
			
		||||
        throw new Error(`HTTP error: ${response.status} ${response.statusText}`);
 | 
			
		||||
      }
 | 
			
		||||
      return response.json();
 | 
			
		||||
    })
 | 
			
		||||
    .then(data => {
 | 
			
		||||
      result.className = 'ntp-test-result'; // reset
 | 
			
		||||
      if (data.success) {
 | 
			
		||||
        result.textContent = `Server time: ${data.time}`;
 | 
			
		||||
        result.classList.add('ntp-test-success');
 | 
			
		||||
      } else {
 | 
			
		||||
        result.textContent = `Error: ${data.error}`;
 | 
			
		||||
        result.classList.add('ntp-test-error');
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
    .catch(error => {
 | 
			
		||||
      // Network error or thrown HTTP error
 | 
			
		||||
      result.className = 'ntp-test-result ntp-test-error';
 | 
			
		||||
      result.textContent = `Request failed: ${error.message}`;
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
@@ -0,0 +1,5 @@
 | 
			
		||||
//
 | 
			
		||||
//Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20
 | 
			
		||||
//
 | 
			
		||||
$(document).ready(function() {
 | 
			
		||||
});
 | 
			
		||||
@@ -27,7 +27,15 @@
 | 
			
		||||
		<h1><%= $title %></h1><br>
 | 
			
		||||
		%= $modul
 | 
			
		||||
		<% my $btn = l('SAVE'); %>
 | 
			
		||||
		<p>
 | 
			
		||||
		<br /><br />
 | 
			
		||||
		<span>
 | 
			
		||||
			%= label_for 'real-time-clock' => $c->l('dat_The_time_is_currently'), class => 'datetime-clock-label'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
<!--
 | 
			
		||||
			<div id="real-time-clock"></div>
 | 
			
		||||
-->
 | 
			
		||||
			%= text_field 'clock', id => 'real-time-clock', readonly => 'readonly', class => 'datetime-clock' , value => $dat_data->{currentdatetime}
 | 
			
		||||
		</span>
 | 
			
		||||
		% if ($dat_data->{ntpstatus} eq 'disabled') {
 | 
			
		||||
			<div class='datetime-set-ntp'>
 | 
			
		||||
				%=l 'dat_NTP_ENABLE_DESC'
 | 
			
		||||
@@ -68,7 +76,9 @@
 | 
			
		||||
						<div class=datetime-fields-col>
 | 
			
		||||
							% my $server_check = '^([a-zA-Z0-9][a-zA-Z0-9\.\-]{0,253}[a-zA-Z0-9]|(\d{1,3}\.){3}\d{1,3})$';
 | 
			
		||||
							% param 'ntpserver' => $dat_data->{ntpserver} unless param 'ntpserver';
 | 
			
		||||
							%= text_field ntpserver => placeholder => 'e.g. smeserver.pool.ntp.org',id => 'ntpserver', pattern => $server_check, title => 'Enter a valid hostname or IPv4 address',required => 'required'
 | 
			
		||||
							%= text_field ntpserver => placeholder => 'e.g. smeserver.pool.ntp.org', id => 'ntpserver', pattern => $server_check, title => 'Enter a valid hostname or IPv4 address', required => 'required'
 | 
			
		||||
							<button type="button" id="test-ntp-btn" class="btn btn-primary ml-2">Test Server</button>
 | 
			
		||||
							<span id="ntp-test-result" class="ntp-test-result ml-2"></span>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,57 +0,0 @@
 | 
			
		||||
% layout 'default', title => "Sme server 2 - emailaccess";
 | 
			
		||||
 | 
			
		||||
% content_for 'module' => begin
 | 
			
		||||
<div id='module' class='module emailaccess-panel'>
 | 
			
		||||
 | 
			
		||||
    % if (config->{debug} == 1) {
 | 
			
		||||
	<p>
 | 
			
		||||
	%= dumper $c->current_route
 | 
			
		||||
	%= dumper $mai_datas
 | 
			
		||||
	</p>
 | 
			
		||||
    % }
 | 
			
		||||
    
 | 
			
		||||
    % if ( stash 'error' ) {
 | 
			
		||||
    	<br><div class=sme-error>
 | 
			
		||||
    	%= $c->render_to_string(inline => stash 'error') 
 | 
			
		||||
	</div>
 | 
			
		||||
    %}
 | 
			
		||||
 | 
			
		||||
    <h1><%= $title%></h1>
 | 
			
		||||
 | 
			
		||||
    %= form_for '/emailsettingd' => (method => 'POST') => begin
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_POP_ACCESS_CONTROL'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_POP_ACCESS_CONTROL'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess';
 | 
			
		||||
	%= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_IMAP_ACCESS_CONTROL'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess';
 | 
			
		||||
	%= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_WEBMAIL'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_WEBMAIL'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail';
 | 
			
		||||
	%= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
    % 	my $btn = l('SAVE');
 | 
			
		||||
	%= submit_button "$btn", class => 'action'
 | 
			
		||||
 | 
			
		||||
	%= hidden_field 'trt' => 'ACC'
 | 
			
		||||
    % end    
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
%end
 | 
			
		||||
@@ -1,92 +0,0 @@
 | 
			
		||||
% layout 'default', title => "Sme server 2 - emaildeliver";
 | 
			
		||||
 | 
			
		||||
% content_for 'module' => begin
 | 
			
		||||
<div id='module' class='module emaildeliver-panel'>
 | 
			
		||||
 | 
			
		||||
    % if (config->{debug} == 1) {
 | 
			
		||||
	<p>
 | 
			
		||||
	%= dumper $c->current_route
 | 
			
		||||
	%= dumper $mai_datas
 | 
			
		||||
	</p>
 | 
			
		||||
    % }
 | 
			
		||||
    
 | 
			
		||||
    % if ( stash 'error' ) {
 | 
			
		||||
    	<br><div class=sme-error>
 | 
			
		||||
    	%= $c->render_to_string(inline => stash 'error') 
 | 
			
		||||
	</div>
 | 
			
		||||
    %}
 | 
			
		||||
 | 
			
		||||
    <h1><%= $title%></h1>
 | 
			
		||||
 | 
			
		||||
    %= form_for '/emailsettingd' => (method => 'POST') => begin
 | 
			
		||||
 | 
			
		||||
	<h2>
 | 
			
		||||
	%=l 'mai_TITLE_UNKNOWN'
 | 
			
		||||
	</h2>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_UNKNOWN'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_UNKNOWN'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'EmailUnknownUser' => $mai_datas->{emailunknownuser} unless param 'EmailUnknownUser';
 | 
			
		||||
	%= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<!--<hr class='menubar' />-->
 | 
			
		||||
	<h2>
 | 
			
		||||
	%=l 'mai_TITLE_DELEGATE'
 | 
			
		||||
	</h2>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_DELEGATE'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_DELEGATE'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'DelegateMailServer' => $mai_datas->{delegatemailserver} unless param 'DelegateMailServer';
 | 
			
		||||
	%= text_field 'DelegateMailServer', class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<!--<hr class='sectionbar' />-->
 | 
			
		||||
	<h2>
 | 
			
		||||
	%=l 'mai_TITLE_SMARTHOST'
 | 
			
		||||
	</h2>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_SMARTHOST'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SMARTHOST'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SMTPSmartHost' => $mai_datas->{smtpsmarthost} unless param 'SMTPSmartHost';
 | 
			
		||||
	%= text_field 'SMTPSmartHost', class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SMTPAUTHPROXY_status' => $mai_datas->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status';
 | 
			
		||||
	%= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SMTPAUTHPROXY_Userid' => $mai_datas->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid';
 | 
			
		||||
	%= text_field 'SMTPAUTHPROXY_Userid', class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SMTPAUTHPROXY_Passwd' => $mai_datas->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd';
 | 
			
		||||
	%= password_field 'SMTPAUTHPROXY_Passwd', class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
    % 	my $btn = l('SAVE');
 | 
			
		||||
	%= submit_button "$btn", class => 'action'
 | 
			
		||||
 | 
			
		||||
	%= hidden_field 'trt' => 'DEL'
 | 
			
		||||
    % end    
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
%end
 | 
			
		||||
@@ -1,101 +0,0 @@
 | 
			
		||||
% layout 'default', title => "Sme server 2 - emailfilter";
 | 
			
		||||
 | 
			
		||||
% content_for 'module' => begin
 | 
			
		||||
<div id='module' class='module emailfilter-panel'>
 | 
			
		||||
 | 
			
		||||
    % if (config->{debug} == 1) {
 | 
			
		||||
	<p>
 | 
			
		||||
	%= dumper $c->current_route
 | 
			
		||||
	%= dumper $mai_datas
 | 
			
		||||
	</p>
 | 
			
		||||
    % }
 | 
			
		||||
 | 
			
		||||
    % if ( stash 'error' ) {
 | 
			
		||||
    	<br><div class=sme-error>
 | 
			
		||||
    	%= $c->render_to_string(inline => stash 'error') 
 | 
			
		||||
	</div>
 | 
			
		||||
    %}
 | 
			
		||||
 | 
			
		||||
    <h1><%= $title%></h1>
 | 
			
		||||
 | 
			
		||||
    %= form_for '/emailsettingd' => (method => 'POST') => begin
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_VIRUS_SCAN'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_VIRUS_SCAN'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'VirusStatus' => $mai_datas->{virusstatus} unless param 'VirusStatus';
 | 
			
		||||
	%= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
	</span><br></p>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_SPAM_SCAN'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SPAM_SCAN'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'Spamstatus' => $mai_datas->{spamstatus} unless param 'Spamstatus';
 | 
			
		||||
	%= select_field 'Spamstatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SPAM_SENSITIVITY'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SpamSensitivity' => $mai_datas->{spamsensitivity} unless param 'SpamSensitivity';
 | 
			
		||||
	%= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SPAM_TAGLEVEL'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SpamTagLevel' => $mai_datas->{spamtaglevel} unless param 'SpamTagLevel';
 | 
			
		||||
	%= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SPAM_REJECTLEVEL'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SpamRejectLevel' => $mai_datas->{spamrejectlevel} unless param 'SpamRejectLevel';
 | 
			
		||||
	%= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SORTSPAM'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SpamSortSpam' => $mai_datas->{spamsortspam} unless param 'SpamSortSpam';
 | 
			
		||||
	%= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_SPAM_SUBJECT'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SPAM_SUBJECTTAG'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SpamSubjectTag' => $mai_datas->{spamsubjecttag} unless param 'SpamSubjectTag';
 | 
			
		||||
	%= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SPAM_SUBJECT'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SpamSubject' => $mai_datas->{spamsubject} unless param 'SpamSubject';
 | 
			
		||||
	%= text_field 'SpamSubject' => class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_CONTENT_TO_BLOCK'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent';
 | 
			
		||||
	%= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1"
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
    % 	my $btn = l('SAVE');
 | 
			
		||||
	%= submit_button "$btn", class => 'action'
 | 
			
		||||
 | 
			
		||||
	%= hidden_field 'trt' => 'FIL'
 | 
			
		||||
    % end
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
%end
 | 
			
		||||
@@ -1,167 +0,0 @@
 | 
			
		||||
% layout 'default', title => "Sme server 2 - emailreceive";
 | 
			
		||||
 | 
			
		||||
% content_for 'module' => begin
 | 
			
		||||
 | 
			
		||||
% use constant FALSE => 0;
 | 
			
		||||
% use constant TRUE  => 1;
 | 
			
		||||
 | 
			
		||||
<div id='module' class='module emailreceive-panel'>
 | 
			
		||||
 | 
			
		||||
    % if (config->{debug} == 1) {
 | 
			
		||||
	<p>
 | 
			
		||||
	%= dumper $c->current_route
 | 
			
		||||
	%= dumper $mai_datas
 | 
			
		||||
	%= dumper $c->param('SMTPAuth')
 | 
			
		||||
	</p>
 | 
			
		||||
    % }
 | 
			
		||||
 | 
			
		||||
    % if ( stash 'error' ) {
 | 
			
		||||
    	<br><div class=sme-error>
 | 
			
		||||
    	%= $c->render_to_string(inline => stash 'error') 
 | 
			
		||||
	</div>
 | 
			
		||||
    %}
 | 
			
		||||
    
 | 
			
		||||
    <h1><%= $title%></h1>
 | 
			
		||||
 | 
			
		||||
    %= form_for '/emailsettingd' => (method => 'POST') => begin
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_MODE'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_MODE'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'FetchmailMethod' => $mai_datas->{fetchmailmethod} unless param 'FetchmailMethod';
 | 
			
		||||
<!--
 | 
			
		||||
	<pre>
 | 
			
		||||
		%= dumper $mai_datas->{fetchmailmethod}
 | 
			
		||||
		%= dumper $c->get_retrieval_opt()
 | 
			
		||||
		%= param 'FetchmailMethod'
 | 
			
		||||
	</pre>
 | 
			
		||||
-->
 | 
			
		||||
	%= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	%#=l 'mai_DESC_SMTP_AUTH_CONTROL'
 | 
			
		||||
	<br />
 | 
			
		||||
	%= l "SMTP port (25) main purpose is to receive emails from another server, STARTTLS is always offered, but auth if offered is only if STARTTLS is also used by client."
 | 
			
		||||
	<br />
 | 
			
		||||
	%= l "SMTPS port (465) will require implicit SSL/TLS then authenticate to send."
 | 
			
		||||
	<br />
 | 
			
		||||
	%= l "SMTP Submission port (587) will require STARTTLS, then authenticate to send."
 | 
			
		||||
	<br />
 | 
			
		||||
 | 
			
		||||
	% my $smtp_mesg=l('SMTP port %u allow client to authenticate:');
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
		%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25)); 
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
    	% param 'SMTPAuth' => $c->get_current_smtp_auth( FALSE ) unless param 'SMTPAuth';
 | 
			
		||||
<!--
 | 
			
		||||
	<pre>
 | 
			
		||||
		%= dumper $c->get_smtp_auth_opt()
 | 
			
		||||
		%= dumper $c->get_current_smtp_auth(FALSE)
 | 
			
		||||
		%= dumper $c->get_db_prop("qpsmtpd","Authentication")
 | 
			
		||||
		%= param 'SMTPAuth'
 | 
			
		||||
	</pre>
 | 
			
		||||
-->
 | 
			
		||||
		%= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	% my $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
		%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465)); 
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
		% param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) unless param 'sSMTPAuth';
 | 
			
		||||
	
 | 
			
		||||
		%= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	%my $smtp_mesg=l('Submission port %u status:');
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
		%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587)); 
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
    	% param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE) unless param 'uSMTPAuth';
 | 
			
		||||
<!--
 | 
			
		||||
	<pre>
 | 
			
		||||
		%= dumper $c->get_smtp_ssl_auth_opt()
 | 
			
		||||
		%= dumper $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE)
 | 
			
		||||
		%= dumper $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE)
 | 
			
		||||
		%= dumper $c->get_db_prop("uqpsmtpd","access")
 | 
			
		||||
		%= param 'uSMTPAuth'
 | 
			
		||||
	</pre>
 | 
			
		||||
-->
 | 
			
		||||
	%= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<!--<hr class="sectionbar" />-->
 | 
			
		||||
	<h2>
 | 
			
		||||
	%=l 'mai_TITLE_SECONDARY'
 | 
			
		||||
	</h2>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_SECONDARY'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SECONDARY'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SecondaryMailServer' => $mai_datas->{secondarymailserver} unless param 'SecondaryMailServer';
 | 
			
		||||
	%= text_field 'SecondaryMailServer', class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	%=l 'mai_DESC_FETCH_PERIOD'
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_FETCH_PERIOD'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'FreqOffice' => $mai_datas->{freqoffice} unless param 'FreqOffice';
 | 
			
		||||
	%= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_FETCH_PERIOD_NIGHTS'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'FreqOutside' => $mai_datas->{freqoutside} unless param 'FreqOutside';
 | 
			
		||||
	%= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'FreqWeekend' => $mai_datas->{freqweekend} unless param 'FreqWeekend';
 | 
			
		||||
	%= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_POP_ACCOUNT'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SecondaryMailAccount' => $mai_datas->{secondarymailaccount} unless param 'SecondaryMailAccount';
 | 
			
		||||
	%= text_field 'SecondaryMailAccount', class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_POP_PASS'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SecondaryMailPassword' => $mai_datas->{secondarymailpassword} unless param 'SecondaryMailPassword';
 | 
			
		||||
	%= password_field 'SecondaryMailPassword', class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SORT_METHOD'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SpecifyHeader' => $mai_datas->{specifyheader} unless param 'SpecifyHeader';
 | 
			
		||||
	%= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SORT_HEADER'
 | 
			
		||||
	</span><span class=input>
 | 
			
		||||
	% param 'SecondaryMailEnvelope' => $mai_datas->{secondarymailenvelope} unless param 'SecondaryMailEnvelope';
 | 
			
		||||
	%= text_field 'SecondaryMailEnvelope', class => 'input'
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
    % 	my $btn = l('SAVE');
 | 
			
		||||
	%= submit_button "$btn", class => 'action'
 | 
			
		||||
 | 
			
		||||
	%= hidden_field 'trt' => 'REC'
 | 
			
		||||
    % end    
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
%end
 | 
			
		||||
@@ -1,155 +1,72 @@
 | 
			
		||||
% layout 'default', title => "Sme server 2 - emailsettings";
 | 
			
		||||
 | 
			
		||||
%#
 | 
			
		||||
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 
 | 
			
		||||
%#
 | 
			
		||||
% layout 'default', title => "Sme server 2 - E-Mail", share_dir => './';
 | 
			
		||||
%# css specific to this panel:
 | 
			
		||||
% content_for 'module' => begin
 | 
			
		||||
%= stylesheet '/css/emailsettings.css'
 | 
			
		||||
%= javascript '/js/emailsettings.js'
 | 
			
		||||
 | 
			
		||||
% use constant FALSE => 0;
 | 
			
		||||
% use constant TRUE  => 1;
 | 
			
		||||
 | 
			
		||||
<div id='module' class='module emailsettings-panel'>
 | 
			
		||||
<div id="module" class="module Emailsettings-panel">
 | 
			
		||||
 | 
			
		||||
    % if (config->{debug} == TRUE) {
 | 
			
		||||
	<p>
 | 
			
		||||
	%= dumper $c->current_route
 | 
			
		||||
	%= dumper $mai_datas
 | 
			
		||||
	</p>
 | 
			
		||||
    % if (config->{debug} == 1) {
 | 
			
		||||
	<pre>
 | 
			
		||||
		%= dumper $c->current_route
 | 
			
		||||
		%= dumper $mai_data->{trt}
 | 
			
		||||
	</pre>
 | 
			
		||||
    % }
 | 
			
		||||
    
 | 
			
		||||
    <h1><%=$title%></h1>
 | 
			
		||||
 | 
			
		||||
    % if ( stash('modul')) {
 | 
			
		||||
	%= $c->render_to_string(inline => stash('modul') );
 | 
			
		||||
    % }
 | 
			
		||||
 | 
			
		||||
    % if ( stash 'error' ) {
 | 
			
		||||
    	<br><div class=sme-error>
 | 
			
		||||
    	%= $c->render_to_string(inline => stash 'error') 
 | 
			
		||||
	</div>
 | 
			
		||||
    %}
 | 
			
		||||
   	%if ($c->stash('first')) {
 | 
			
		||||
	    <br><p>
 | 
			
		||||
		%=$c->render_to_string(inline =>$c->l($c->stash('first')))
 | 
			
		||||
		</p>
 | 
			
		||||
 | 
			
		||||
    <h1><%= $title%></h1>
 | 
			
		||||
	%} elsif ($c->stash('success')) {
 | 
			
		||||
		<div class='success '>
 | 
			
		||||
				%= $c->l($c->stash('success'));
 | 
			
		||||
		</div>
 | 
			
		||||
		<br />
 | 
			
		||||
 | 
			
		||||
    %= form_for 'emailsettings' => (method => 'POST') => begin
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_POP_ACCESS_CONTROL'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_current_pop3_access( TRUE )
 | 
			
		||||
	</span></p>
 | 
			
		||||
	%} elsif ($c->stash('error')) { 
 | 
			
		||||
	   <div class='sme-error'>
 | 
			
		||||
				%= $c->l($c->stash('error'));
 | 
			
		||||
    	</div>
 | 
			
		||||
		<br />
 | 
			
		||||
	%}
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_current_imap_access( TRUE )
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_WEBMAIL'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_current_webmail_status( TRUE )
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
    % 	my $btn = l('mai_DESC_STATE_ACCESS_BUTTON');
 | 
			
		||||
    <div class='center'>
 | 
			
		||||
	%= submit_button "$btn", class => 'action'
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
	%= hidden_field 'trt' => 'ACC'
 | 
			
		||||
    % end   
 | 
			
		||||
    <br> 
 | 
			
		||||
 | 
			
		||||
    <!--<hr class="sectionbar" />-->
 | 
			
		||||
    
 | 
			
		||||
    %= form_for 'emailsettings' => (method => 'POST') => begin
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_VIRUS_SCAN'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_virus_status(TRUE)
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SPAM_SCAN'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_spam_status(TRUE)
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_patterns_status(TRUE)
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
    % 	my $btn = l('mai_DESC_STATE_FILTERING_BUTTON');
 | 
			
		||||
    <div class='center'>
 | 
			
		||||
	%= submit_button "$btn", class => 'action'
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
	%= hidden_field 'trt' => 'FIL'
 | 
			
		||||
    % end  
 | 
			
		||||
    <br>  
 | 
			
		||||
 | 
			
		||||
    <!--<hr class="sectionbar" />-->
 | 
			
		||||
 | 
			
		||||
    %= form_for 'emailsettings' => (method => 'POST') => begin
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_MODE'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $mai_datas->{fetchmailmethod}
 | 
			
		||||
	</span></p>
 | 
			
		||||
	%#Routing to partials according to trt parameter.
 | 
			
		||||
	%#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement'
 | 
			
		||||
	
 | 
			
		||||
	% if ($mai_data->{trt} eq "FRONT") {
 | 
			
		||||
		%= include 'partials/_mai_FRONT'
 | 
			
		||||
	%}
 | 
			
		||||
	
 | 
			
		||||
	% if ($mai_data->{trt} eq "ACC") {
 | 
			
		||||
		%= include 'partials/_mai_ACC'
 | 
			
		||||
	%}
 | 
			
		||||
	
 | 
			
		||||
	% if ($mai_data->{trt} eq "FIL") {
 | 
			
		||||
		%= include 'partials/_mai_FIL'
 | 
			
		||||
	%}
 | 
			
		||||
	
 | 
			
		||||
	% if ($mai_data->{trt} eq "REC") {
 | 
			
		||||
		%= include 'partials/_mai_REC'
 | 
			
		||||
	%}
 | 
			
		||||
	
 | 
			
		||||
	% if ($mai_data->{trt} eq "DEL") {
 | 
			
		||||
		%= include 'partials/_mai_DEL'
 | 
			
		||||
	%}
 | 
			
		||||
	
 | 
			
		||||
	% my $smtp_mesg;
 | 
			
		||||
 | 
			
		||||
	% $smtp_mesg=l('SMTP port %u allow client to authenticate:');
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
		%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25)); 
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_current_smtp_auth( TRUE )
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	% $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
		%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465)); 
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE )
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	% $smtp_mesg=l 'Submission port %u status:';
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
		%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587)); 
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_current_smtp_ssl_auth( TRUE,'u', FALSE )
 | 
			
		||||
	</span></p>
 | 
			
		||||
	<br />
 | 
			
		||||
 | 
			
		||||
    % my $btn = l('mai_DESC_STATE_RECEPTION_BUTTON');
 | 
			
		||||
    <div class='center'>
 | 
			
		||||
	%= submit_button "$btn", class => 'action'
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
	%= hidden_field 'trt' => 'REC'
 | 
			
		||||
    % end    
 | 
			
		||||
    <br>
 | 
			
		||||
 | 
			
		||||
    <!--<hr class="sectionbar" />-->
 | 
			
		||||
 | 
			
		||||
    %= form_for 'emailsettings' => (method => 'POST') => begin
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_UNKNOWN'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_emailunknownuser_status( TRUE )
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_DELEGATE'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_value('DelegateMailServer')
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
	<p><span class=label>
 | 
			
		||||
	%=l 'mai_LABEL_SMARTHOST'
 | 
			
		||||
	</span><span class=data2>
 | 
			
		||||
	%= $c->get_value('SMTPSmartHost')
 | 
			
		||||
	</span></p>
 | 
			
		||||
 | 
			
		||||
    % 	my $btn = l('mai_DESC_STATE_DELIVERY_BUTTON');
 | 
			
		||||
    <div class='center'>
 | 
			
		||||
	%= submit_button "$btn", class => 'action'
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
	%= hidden_field 'trt' => 'DEL'
 | 
			
		||||
    % end    
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
%end
 | 
			
		||||
@@ -0,0 +1,54 @@
 | 
			
		||||
%#
 | 
			
		||||
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 
 | 
			
		||||
%#
 | 
			
		||||
<div id="Emailsettings-ACC" class="partial Emailsettings-ACC">
 | 
			
		||||
%#	<script>
 | 
			
		||||
%#		window.onload = function() {
 | 
			
		||||
%#		SelectInput();
 | 
			
		||||
%#	};
 | 
			
		||||
%#	</script>
 | 
			
		||||
	% if (config->{debug} == 1) {
 | 
			
		||||
		<pre>
 | 
			
		||||
			%= dumper $mai_data
 | 
			
		||||
		</pre>
 | 
			
		||||
	% }
 | 
			
		||||
	% my $btn = l('SAVE');
 | 
			
		||||
	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
 | 
			
		||||
 | 
			
		||||
	<h2><%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %></h2><br>
 | 
			
		||||
	%= form_for "emailsettingsu" => (method => 'POST') => begin
 | 
			
		||||
		% param 'trt' => $mai_data->{trt} unless param 'trt';
 | 
			
		||||
		%= hidden_field 'trt' => $mai_data->{trt}
 | 
			
		||||
		%# Inputs etc in here.
 | 
			
		||||
		%=l 'mai_DESC_POP_ACCESS_CONTROL'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_POP_ACCESS_CONTROL'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess';
 | 
			
		||||
		%= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_IMAP_ACCESS_CONTROL'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess';
 | 
			
		||||
		%= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_WEBMAIL'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_WEBMAIL'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail';
 | 
			
		||||
		%= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%# ....
 | 
			
		||||
		%# Probably finally by a submit.
 | 
			
		||||
		%= submit_button $btn, class => 'action'
 | 
			
		||||
	%end    
 | 
			
		||||
</div>
 | 
			
		||||
@@ -0,0 +1,90 @@
 | 
			
		||||
%#
 | 
			
		||||
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 
 | 
			
		||||
%#
 | 
			
		||||
<div id="Emailsettings-DEL" class="partial Emailsettings-DEL">
 | 
			
		||||
%#	<script>
 | 
			
		||||
%#		window.onload = function() {
 | 
			
		||||
%#		SelectInput();
 | 
			
		||||
%#	};
 | 
			
		||||
%#	</script>
 | 
			
		||||
	% if (config->{debug} == 1) {
 | 
			
		||||
		<pre>
 | 
			
		||||
			%= dumper $mai_data
 | 
			
		||||
		</pre>
 | 
			
		||||
	% }
 | 
			
		||||
	% my $btn = l('SAVE');
 | 
			
		||||
	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
 | 
			
		||||
 | 
			
		||||
	<h2><%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %></h2>
 | 
			
		||||
	%= form_for "emailsettingsu" => (method => 'POST') => begin
 | 
			
		||||
		% param 'trt' => $mai_data->{trt} unless param 'trt';
 | 
			
		||||
		%= hidden_field 'trt' => $mai_data->{trt}
 | 
			
		||||
		%# Inputs etc in here.
 | 
			
		||||
		<h2>
 | 
			
		||||
		%=l 'mai_TITLE_UNKNOWN'
 | 
			
		||||
		</h2>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_UNKNOWN'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_UNKNOWN'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'EmailUnknownUser' => $mai_data->{emailunknownuser} unless param 'EmailUnknownUser';
 | 
			
		||||
		%= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<!--<hr class='menubar' />-->
 | 
			
		||||
		<h2>
 | 
			
		||||
		%=l 'mai_TITLE_DELEGATE'
 | 
			
		||||
		</h2>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_DELEGATE'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_DELEGATE'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'DelegateMailServer' => $mai_data->{delegatemailserver} unless param 'DelegateMailServer';
 | 
			
		||||
		%= text_field 'DelegateMailServer', class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<!--<hr class='sectionbar' />-->
 | 
			
		||||
		<h2>
 | 
			
		||||
		%=l 'mai_TITLE_SMARTHOST'
 | 
			
		||||
		</h2>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_SMARTHOST'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SMARTHOST'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SMTPSmartHost' => $mai_data->{smtpsmarthost} unless param 'SMTPSmartHost';
 | 
			
		||||
		%= text_field 'SMTPSmartHost', class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SMTPAUTHPROXY_status' => $mai_data->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status';
 | 
			
		||||
		%= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SMTPAUTHPROXY_Userid' => $mai_data->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid';
 | 
			
		||||
		%= text_field 'SMTPAUTHPROXY_Userid', class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SMTPAUTHPROXY_Passwd' => $mai_data->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd';
 | 
			
		||||
		%= password_field 'SMTPAUTHPROXY_Passwd', class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		%# ....
 | 
			
		||||
		%# Probably finally by a submit.
 | 
			
		||||
		%= submit_button $btn, class => 'action'
 | 
			
		||||
	%end    
 | 
			
		||||
</div>
 | 
			
		||||
@@ -0,0 +1,98 @@
 | 
			
		||||
%#
 | 
			
		||||
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 
 | 
			
		||||
%#
 | 
			
		||||
<div id="Emailsettings-FIL" class="partial Emailsettings-FIL">
 | 
			
		||||
%#	<script>
 | 
			
		||||
%#		window.onload = function() {
 | 
			
		||||
%#		SelectInput();
 | 
			
		||||
%#	};
 | 
			
		||||
%#	</script>
 | 
			
		||||
	% if (config->{debug} == 1) {
 | 
			
		||||
		<pre>
 | 
			
		||||
			%= dumper $mai_data
 | 
			
		||||
		</pre>
 | 
			
		||||
	% }
 | 
			
		||||
	% my $btn = l('SAVE');
 | 
			
		||||
	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
 | 
			
		||||
 | 
			
		||||
	<h2><%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %></h2><br>
 | 
			
		||||
	%= form_for "emailsettingsu" => (method => 'POST') => begin
 | 
			
		||||
		% param 'trt' => $mai_data->{trt} unless param 'trt';
 | 
			
		||||
		%= hidden_field 'trt' => $mai_data->{trt}
 | 
			
		||||
		%# Inputs etc in here.
 | 
			
		||||
		%=l 'mai_DESC_VIRUS_SCAN'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_VIRUS_SCAN'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'VirusStatus' => $mai_data->{virusstatus} unless param 'VirusStatus';
 | 
			
		||||
		%= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
		</span><br></p>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_SPAM_SCAN'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SPAM_SCAN'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'Spamstatus' => $mai_data->{spamstatus} unless param 'Spamstatus';
 | 
			
		||||
		%= select_field 'Spamstatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SPAM_SENSITIVITY'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SpamSensitivity' => $mai_data->{spamsensitivity} unless param 'SpamSensitivity';
 | 
			
		||||
		%= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SPAM_TAGLEVEL'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SpamTagLevel' => $mai_data->{spamtaglevel} unless param 'SpamTagLevel';
 | 
			
		||||
		%= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SPAM_REJECTLEVEL'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SpamRejectLevel' => $mai_data->{spamrejectlevel} unless param 'SpamRejectLevel';
 | 
			
		||||
		%= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SORTSPAM'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SpamSortSpam' => $mai_data->{spamsortspam} unless param 'SpamSortSpam';
 | 
			
		||||
		%= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_SPAM_SUBJECT'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SPAM_SUBJECTTAG'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SpamSubjectTag' => $mai_data->{spamsubjecttag} unless param 'SpamSubjectTag';
 | 
			
		||||
		%= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SPAM_SUBJECT'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SpamSubject' => $mai_data->{spamsubject} unless param 'SpamSubject';
 | 
			
		||||
		%= text_field 'SpamSubject' => class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_CONTENT_TO_BLOCK'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent';
 | 
			
		||||
		%= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1"
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%# ....
 | 
			
		||||
		%# Probably finally by a submit.
 | 
			
		||||
		%= submit_button $btn, class => 'action'
 | 
			
		||||
	%end    
 | 
			
		||||
</div>
 | 
			
		||||
@@ -0,0 +1,152 @@
 | 
			
		||||
%#
 | 
			
		||||
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 
 | 
			
		||||
%#
 | 
			
		||||
<div id="Emailsettings-FRONT" class="partial Emailsettings-FRONT">
 | 
			
		||||
%#	<script>
 | 
			
		||||
%#		window.onload = function() {
 | 
			
		||||
%#		SelectInput();
 | 
			
		||||
%#	};
 | 
			
		||||
%#	</script>
 | 
			
		||||
	% if (config->{debug} == 1) {
 | 
			
		||||
		<pre>
 | 
			
		||||
			%= dumper $mai_data
 | 
			
		||||
			<br> 
 | 
			
		||||
		</pre>
 | 
			
		||||
	% }
 | 
			
		||||
	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
 | 
			
		||||
	% my $btn = l('Modify');
 | 
			
		||||
	<fieldset>
 | 
			
		||||
		<legend><%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %></legend>
 | 
			
		||||
		%= form_for 'emailsettings' => (method => 'POST') => begin
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_POP_ACCESS_CONTROL'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_current_pop3_access( TRUE )
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_current_imap_access( TRUE )
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_WEBMAIL'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_current_webmail_status( TRUE )
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<br> 
 | 
			
		||||
		<div class='center'>
 | 
			
		||||
		%= submit_button "$btn", class => 'action'
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		%= hidden_field 'trt' => 'ACC'
 | 
			
		||||
		% end   
 | 
			
		||||
		</fieldset>
 | 
			
		||||
		<br> 
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
	<fieldset>
 | 
			
		||||
		<legend><%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %></legend>
 | 
			
		||||
		%= form_for 'emailsettings' => (method => 'POST') => begin
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_VIRUS_SCAN'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_virus_status(TRUE)
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SPAM_SCAN'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_spam_status(TRUE)
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_patterns_status(TRUE)
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<br> 
 | 
			
		||||
		<div class='center'>
 | 
			
		||||
		%= submit_button "$btn", class => 'action'
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		%= hidden_field 'trt' => 'FIL'
 | 
			
		||||
		% end  
 | 
			
		||||
	</fieldset>
 | 
			
		||||
    <br>  
 | 
			
		||||
 | 
			
		||||
	<fieldset>
 | 
			
		||||
		<legend><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></legend>
 | 
			
		||||
		%= form_for 'emailsettings' => (method => 'POST') => begin
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_MODE'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $mai_data->{fetchmailmethod}
 | 
			
		||||
		</span></p>
 | 
			
		||||
		
 | 
			
		||||
		% my $smtp_mesg;
 | 
			
		||||
 | 
			
		||||
		% $smtp_mesg=l('SMTP port %u allow client to authenticate:');
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
			%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25)); 
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_current_smtp_auth( TRUE )
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		% $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
			%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465)); 
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE )
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		% $smtp_mesg=l 'Submission port %u status:';
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
			%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587)); 
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_current_smtp_ssl_auth( TRUE,'u', FALSE )
 | 
			
		||||
		</span></p>
 | 
			
		||||
		<br />
 | 
			
		||||
 | 
			
		||||
		<div class='center'>
 | 
			
		||||
		%= submit_button "$btn", class => 'action'
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		%= hidden_field 'trt' => 'REC'
 | 
			
		||||
		% end    
 | 
			
		||||
	</fieldset>
 | 
			
		||||
    <br>
 | 
			
		||||
 | 
			
		||||
	<fieldset>
 | 
			
		||||
		<legend><%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %></legend>
 | 
			
		||||
		%= form_for 'emailsettings' => (method => 'POST') => begin
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_UNKNOWN'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_emailunknownuser_status( TRUE )
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_DELEGATE'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_value('DelegateMailServer')
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SMARTHOST'
 | 
			
		||||
		</span><span class=data2>
 | 
			
		||||
		%= $c->get_value('SMTPSmartHost')
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<br> 
 | 
			
		||||
		<div class='center'>
 | 
			
		||||
		%= submit_button "$btn", class => 'action'
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
		%= hidden_field 'trt' => 'DEL'
 | 
			
		||||
		% end    
 | 
			
		||||
	</fieldset>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -0,0 +1,159 @@
 | 
			
		||||
%#
 | 
			
		||||
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 
 | 
			
		||||
%#
 | 
			
		||||
<div id="Emailsettings-REC" class="partial Emailsettings-REC">
 | 
			
		||||
%#	<script>
 | 
			
		||||
%#		window.onload = function() {
 | 
			
		||||
%#		SelectInput();
 | 
			
		||||
%#	};
 | 
			
		||||
%#	</script>
 | 
			
		||||
	% if (config->{debug} == 1) {
 | 
			
		||||
		<pre>
 | 
			
		||||
			%= dumper $mai_data
 | 
			
		||||
		</pre>
 | 
			
		||||
	% }
 | 
			
		||||
	% my $btn = l('SAVE');
 | 
			
		||||
	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
 | 
			
		||||
 | 
			
		||||
	<h2><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></h2><br>
 | 
			
		||||
	%= form_for "emailsettingsu" => (method => 'POST') => begin
 | 
			
		||||
		% param 'trt' => $mai_data->{trt} unless param 'trt';
 | 
			
		||||
		%= hidden_field 'trt' => $mai_data->{trt}
 | 
			
		||||
		%# Inputs etc in here.
 | 
			
		||||
		%=l 'mai_DESC_MODE'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_MODE'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'FetchmailMethod' => $mai_data->{fetchmailmethod} unless param 'FetchmailMethod';
 | 
			
		||||
	<!--
 | 
			
		||||
		<pre>
 | 
			
		||||
			%= dumper $mai_data->{fetchmailmethod}
 | 
			
		||||
			%= dumper $c->get_retrieval_opt()
 | 
			
		||||
			%= param 'FetchmailMethod'
 | 
			
		||||
		</pre>
 | 
			
		||||
	-->
 | 
			
		||||
		%= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%#=l 'mai_DESC_SMTP_AUTH_CONTROL'
 | 
			
		||||
		<br />
 | 
			
		||||
		%= l "SMTP port (25) main purpose is to receive emails from another server, STARTTLS is always offered, but auth if offered is only if STARTTLS is also used by client."
 | 
			
		||||
		<br />
 | 
			
		||||
		%= l "SMTPS port (465) will require implicit SSL/TLS then authenticate to send."
 | 
			
		||||
		<br />
 | 
			
		||||
		%= l "SMTP Submission port (587) will require STARTTLS, then authenticate to send."
 | 
			
		||||
		<br />
 | 
			
		||||
 | 
			
		||||
		% my $smtp_mesg=l('SMTP port %u allow client to authenticate:');
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
			%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25)); 
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
			% param 'SMTPAuth' => $c->get_current_smtp_auth( FALSE ) unless param 'SMTPAuth';
 | 
			
		||||
	<!--
 | 
			
		||||
		<pre>
 | 
			
		||||
			%= dumper $c->get_smtp_auth_opt()
 | 
			
		||||
			%= dumper $c->get_current_smtp_auth(FALSE)
 | 
			
		||||
			%= dumper $c->get_db_prop("qpsmtpd","Authentication")
 | 
			
		||||
			%= param 'SMTPAuth'
 | 
			
		||||
		</pre>
 | 
			
		||||
	-->
 | 
			
		||||
			%= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		% my $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
			%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465)); 
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
			% param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) unless param 'sSMTPAuth';
 | 
			
		||||
		
 | 
			
		||||
			%= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%my $smtp_mesg=l('Submission port %u status:');
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
			%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587)); 
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
			% param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE) unless param 'uSMTPAuth';
 | 
			
		||||
	<!--
 | 
			
		||||
		<pre>
 | 
			
		||||
			%= dumper $c->get_smtp_ssl_auth_opt()
 | 
			
		||||
			%= dumper $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE)
 | 
			
		||||
			%= dumper $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE)
 | 
			
		||||
			%= dumper $c->get_db_prop("uqpsmtpd","access")
 | 
			
		||||
			%= param 'uSMTPAuth'
 | 
			
		||||
		</pre>
 | 
			
		||||
	-->
 | 
			
		||||
		%= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<!--<hr class="sectionbar" />-->
 | 
			
		||||
		<h2>
 | 
			
		||||
		%=l 'mai_TITLE_SECONDARY'
 | 
			
		||||
		</h2><br>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_SECONDARY'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SECONDARY'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SecondaryMailServer' => $mai_data->{secondarymailserver} unless param 'SecondaryMailServer';
 | 
			
		||||
		%= text_field 'SecondaryMailServer', class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%=l 'mai_DESC_FETCH_PERIOD'
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_FETCH_PERIOD'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'FreqOffice' => $mai_data->{freqoffice} unless param 'FreqOffice';
 | 
			
		||||
		%= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_FETCH_PERIOD_NIGHTS'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'FreqOutside' => $mai_data->{freqoutside} unless param 'FreqOutside';
 | 
			
		||||
		%= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'FreqWeekend' => $mai_data->{freqweekend} unless param 'FreqWeekend';
 | 
			
		||||
		%= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_POP_ACCOUNT'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SecondaryMailAccount' => $mai_data->{secondarymailaccount} unless param 'SecondaryMailAccount';
 | 
			
		||||
		%= text_field 'SecondaryMailAccount', class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_POP_PASS'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SecondaryMailPassword' => $mai_data->{secondarymailpassword} unless param 'SecondaryMailPassword';
 | 
			
		||||
		%= password_field 'SecondaryMailPassword', class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SORT_METHOD'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SpecifyHeader' => $mai_data->{specifyheader} unless param 'SpecifyHeader';
 | 
			
		||||
		%= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		<p><span class=label>
 | 
			
		||||
		%=l 'mai_LABEL_SORT_HEADER'
 | 
			
		||||
		</span><span class=input>
 | 
			
		||||
		% param 'SecondaryMailEnvelope' => $mai_data->{secondarymailenvelope} unless param 'SecondaryMailEnvelope';
 | 
			
		||||
		%= text_field 'SecondaryMailEnvelope', class => 'input'
 | 
			
		||||
		</span></p>
 | 
			
		||||
 | 
			
		||||
		%# ....
 | 
			
		||||
		%# Probably finally by a submit.
 | 
			
		||||
		%= submit_button $btn, class => 'action'
 | 
			
		||||
	%end    
 | 
			
		||||
</div>
 | 
			
		||||
@@ -2,7 +2,7 @@ Summary: Sme server  navigation module : manager 2
 | 
			
		||||
%define name smeserver-manager
 | 
			
		||||
Name: %{name}
 | 
			
		||||
%define version 11.0.0
 | 
			
		||||
%define release 94
 | 
			
		||||
%define release 98
 | 
			
		||||
Version: %{version}
 | 
			
		||||
Release: %{release}%{?dist}
 | 
			
		||||
License: GPL
 | 
			
		||||
@@ -36,6 +36,7 @@ Requires: perl(Net::Netmask) >= 1.9
 | 
			
		||||
Requires: perl(DBM::Deep) >= 2.0011-1
 | 
			
		||||
Requires: perl(Mojo::JWT) >= 0.08-1
 | 
			
		||||
#Requires: perl(Time::TAI64) >= 2.11
 | 
			
		||||
Requires: perl(Data::Validate::IP)
 | 
			
		||||
Requires: mutt >= 1.5.21
 | 
			
		||||
Requires: smeserver-manager-jsquery >= 1.0
 | 
			
		||||
Requires: smeserver-certificates >= 11.0
 | 
			
		||||
@@ -138,12 +139,27 @@ then
 | 
			
		||||
    [ -h %{dir_mngr}/themes/default/public/js/jquery.min.map ] ||
 | 
			
		||||
	ln -s /usr/share/javascript/jquery/latest/jquery.min.map %{dir_mngr}/themes/default/public/js/jquery.min.map
 | 
			
		||||
fi
 | 
			
		||||
find %{dir_mngr}/lib/SrvMngr/I18N/Modules -type f -name '*.pm' -exec rm '{}' \;
 | 
			
		||||
true
 | 
			
		||||
 | 
			
		||||
%files -f %{name}-%{version}-%{release}-filelist
 | 
			
		||||
%defattr(-,root,root)
 | 
			
		||||
 | 
			
		||||
%changelog
 | 
			
		||||
* Sun Jun 29 2025 Brian Read <brianr@koozali.org> 11.0.0-98.sme
 | 
			
		||||
- Re-factor email settings panel as error handling not working as expected.  [SME: 12973]
 | 
			
		||||
 | 
			
		||||
* Sat Jun 28 2025 Brian Read <brianr@koozali.org> 11.0.0-97.sme
 | 
			
		||||
- fix error handling in emailsettings panel [SME: 12973]
 | 
			
		||||
 | 
			
		||||
* Fri Jun 27 2025 Brian Read <brianr@koozali.org> 11.0.0-96.sme
 | 
			
		||||
- Remove *.en files on install in spec file [SME: 13061]
 | 
			
		||||
 | 
			
		||||
* Tue Jun 24 2025 Brian Read <brianr@koozali.org> 11.0.0-95.sme
 | 
			
		||||
- Add clock ticker to datetime panel [SME: 13054]
 | 
			
		||||
- Add Test Server button for ntp server [SME: 13048]
 | 
			
		||||
- Add checking that date is fully valid [SME: 13055]
 | 
			
		||||
 | 
			
		||||
* Thu Jun 19 2025 Brian Read <brianr@koozali.org> 11.0.0-94.sme
 | 
			
		||||
- re-instate datetime routes in SrvMngr.pm - removed by mistake [SME: 13053]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user