From b5b7645ebc11167d1389ee58e515cb1226cc7a90 Mon Sep 17 00:00:00 2001 From: John Crisp Date: Sun, 6 Jul 2025 13:35:27 +0200 Subject: [PATCH] add email setting partials --- .../templates/partials/_mai_ACC.html.ep | 97 +++++++ .../templates/partials/_mai_DEL.html.ep | 153 ++++++++++ .../templates/partials/_mai_FIL.html.ep | 177 ++++++++++++ .../templates/partials/_mai_FRONT.html.ep | 206 +++++++++++++ .../templates/partials/_mai_REC.html.ep | 272 ++++++++++++++++++ 5 files changed, 905 insertions(+) create mode 100644 root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_ACC.html.ep create mode 100644 root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_DEL.html.ep create mode 100644 root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_FIL.html.ep create mode 100644 root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_FRONT.html.ep create mode 100644 root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_REC.html.ep diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_ACC.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_ACC.html.ep new file mode 100644 index 0000000..d29449e --- /dev/null +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_ACC.html.ep @@ -0,0 +1,97 @@ +%# layout 'AdminLTE', title => "Sme server 2 - emailaccess"; + +%# content_for 'module' => begin + + + + % if (config->{debug} == 1) { +
+        <%= dumper $c->current_route %>
+        <%= dumper $mai_data %>
+    
+ % } + + % if ( stash 'error' ) { +
+
+ <%= $c->render_to_string(inline => stash 'error') %> +
+ % } + + +

<%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %>

+ +
+ +
+ +
+ <%= l 'mai_DESC_POP_ACCESS_CONTROL' %> +
+ +
+ +
+
+ <%=l 'mai_LABEL_POP_ACCESS_CONTROL' %> +
+
+ % param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess'; + <%= select_field 'POPAccess' => $c->get_pop_opt(), class => "form-select" %> +
+
+ +
+ +
+ <%=l 'mai_DESC_IMAP_ACCESS_CONTROL' %> +
+ +
+ +
+
+ <%=l 'mai_LABEL_IMAP_ACCESS_CONTROL' %> +
+
+ % param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess'; + <%= select_field 'IMAPAccess' => $c->get_imap_opt(), class => "form-select" %> +
+
+ +
+ +
+ <%= l 'mai_DESC_WEBMAIL' %> +
+ +
+ +
+
+ <%=l 'mai_LABEL_WEBMAIL' %> +
+
+ % param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail'; + <%= select_field 'WebMail' => $c->get_webmail_opt(), class => "form-select" %> +
+
+ +
+ + % my $btn = l('SAVE'); + <%= hidden_field 'trt' => 'ACC' %> + +
+
+ +
+
+ + + +
+ +
+ +%#end diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_DEL.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_DEL.html.ep new file mode 100644 index 0000000..d540d09 --- /dev/null +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_DEL.html.ep @@ -0,0 +1,153 @@ +%# layout 'AdminLTE', title => "Sme server 2 - emaildeliver"; + +%# content_for 'module' => begin + + + + % if (config->{debug} == 1) { +
+            <%= dumper $c->current_route %>
+            <%= dumper $mai_data %>
+        
+ % } + + + % if ( stash 'error' ) { +
+
+ <%= $c->render_to_string(inline => stash 'error') %> +
+ % } + + +

<%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %>

+ +
+ +
+ +

<%= l 'mai_TITLE_UNKNOWN' %>

+ +
+ +
+ <%= l 'mai_DESC_UNKNOWN' %> +
+ +
+ +
+
+ <%= l 'mai_LABEL_UNKNOWN' %> +
+
+ % param 'EmailUnknownUser' => $mai_data->{emailunknownuser} unless param 'EmailUnknownUser'; + <%= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => "form-select" %> +
+
+ +
+ + +

<%= l 'mai_TITLE_DELEGATE' %>

+ +
+ +
+ <%= l 'mai_DESC_DELEGATE' %> +
+ +
+ + % param 'DelegateMailServer' => $mai_data->{delegatemailserver} unless param 'DelegateMailServer'; + +
+
+ +
+
+ +
+
+ +
+ + +

<%= l 'mai_TITLE_SMARTHOST' %>

+ +
+ +
+ <%= l 'mai_DESC_SMARTHOST' %> +
+ +
+ + % param 'SMTPSmartHost' => $mai_data->{smtpsmarthost} unless param 'SMTPSmartHost'; + +
+
+ +
+
+ +
+
+ +
+ + % param 'SMTPAUTHPROXY_status' => $mai_data->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status'; + +
+
+ <%= l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS' %> +
+
+ <%= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => "form-select" %> +
+
+ +
+ + % param 'SMTPAUTHPROXY_Userid' => $mai_data->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid'; + +
+
+ +
+
+ +
+
+ +
+ + % param 'SMTPAUTHPROXY_Passwd' => $mai_data->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd'; + +
+
+ +
+
+ +
+
+ +
+
+ +
+ + % my $btn = l('SAVE'); + <%= hidden_field 'trt' => 'DEL' %> + +
+
+ +
+
+ +
+
+ +%#end \ No newline at end of file diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_FIL.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_FIL.html.ep new file mode 100644 index 0000000..d3a0c06 --- /dev/null +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_FIL.html.ep @@ -0,0 +1,177 @@ +%# layout 'AdminLTE', title => "Sme server 2 - emailfilter"; + +%# content_for 'module' => begin + + + + % if (config->{debug} == 1) { +
+            <%= dumper $c->current_route %>
+            <%= dumper $mai_data %>
+        
+ % } + + % if ( stash 'error' ) { +
+
+ <%= $c->render_to_string(inline => stash 'error') %> +
+ % } + + +

<%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %>

+ +
+ +
+ +
+ <%= l 'mai_DESC_VIRUS_SCAN' %> +
+ +
+ +
+
+ <%= l 'mai_LABEL_VIRUS_SCAN' %> +
+
+ % param 'VirusStatus' => $mai_data->{virusstatus} unless param 'VirusStatus'; + <%= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" %> +
+
+ +
+ +
+ <%= l 'mai_DESC_SPAM_SCAN' %> +
+ +
+ +
+
+ <%= l 'mai_LABEL_SPAM_SCAN' %> +
+
+ % param 'Spamstatus' => $mai_data->{spamstatus} unless param 'Spamstatus'; + <%= select_field 'Spamstatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" %> +
+
+ +
+ +
+
+ <%= l 'mai_LABEL_SPAM_SENSITIVITY' %> +
+
+ % param 'SpamSensitivity' => $mai_data->{spamsensitivity} unless param 'SpamSensitivity'; + <%= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => "form-select" %> +
+
+ +
+ +
+
+ <%= l 'mai_LABEL_SPAM_TAGLEVEL' %> +
+
+ % param 'SpamTagLevel' => $mai_data->{spamtaglevel} unless param 'SpamTagLevel'; + <%= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => "form-select" %> +
+
+ +
+ +
+
+ <%= l 'mai_LABEL_SPAM_REJECTLEVEL' %> +
+
+ % param 'SpamRejectLevel' => $mai_data->{spamrejectlevel} unless param 'SpamRejectLevel'; + <%= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => "form-select" %> +
+
+ +
+ +
+
+ <%= l 'mai_LABEL_SORTSPAM' %> +
+
+ % param 'SpamSortSpam' => $mai_data->{spamsortspam} unless param 'SpamSortSpam'; + <%= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" %> +
+
+ +
+ +
+ <%= l 'mai_DESC_SPAM_SUBJECT' %> +
+ +
+ +
+
+ <%= l 'mai_LABEL_SPAM_SUBJECTTAG' %> +
+
+ % param 'SpamSubjectTag' => $mai_data->{spamsubjecttag} unless param 'SpamSubjectTag'; + <%= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" %> +
+
+ +
+ + % param 'SpamSubject' => $mai_data->{spamsubject} unless param 'SpamSubject'; + +
+
+ +
+
+ + +
+
+ + + +
+ +
+ <%= l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT' %> +
+ +
+ +
+
+ <%= l 'mai_LABEL_CONTENT_TO_BLOCK' %> +
+
+ % param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent'; + <%= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => "form-select", multiple => "1" %> +
+
+ +
+ + % my $btn = l('SAVE'); + <%= hidden_field 'trt' => 'FIL' %> + +
+
+ +
+
+ +
+ + + +%#end \ No newline at end of file diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_FRONT.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_FRONT.html.ep new file mode 100644 index 0000000..68f4903 --- /dev/null +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_FRONT.html.ep @@ -0,0 +1,206 @@ + + % if (config->{debug} == 1) { +
+            <%= dumper $mai_data %>
+            
+
+ % } + +

<%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %>

+ +
+ +
+
+ <%= l 'mai_LABEL_POP_ACCESS_CONTROL' %> +
+
+ <%= $c->get_current_pop3_access( TRUE ) %> +
+
+ +
+
+ <%= l 'mai_LABEL_IMAP_ACCESS_CONTROL' %> +
+
+ <%= $c->get_current_imap_access( TRUE ) %> +
+
+ +
+
+ <%= l 'mai_LABEL_WEBMAIL' %> +
+
+ <%= $c->get_current_webmail_status( TRUE ) %> +
+
+ +
+ + % my $btn = l('mai_DESC_STATE_ACCESS_BUTTON'); + <%= hidden_field 'trt' => 'ACC' %> + +
+
+ +
+
+ +
+ +

+ + + +
+ +
+
+ <%= l 'mai_LABEL_VIRUS_SCAN' %> +
+
+ <%= $c->get_virus_status(TRUE) %> +
+
+ +
+
+ <%= l 'mai_LABEL_SPAM_SCAN' %> +
+
+ <%= $c->get_spam_status(TRUE) %> +
+
+ +
+
+ <%= l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT' %> +
+
+ <%= $c->get_patterns_status(TRUE) %> +
+
+ +
+ + % $btn = l('mai_DESC_STATE_FILTERING_BUTTON'); + <%= hidden_field 'trt' => 'FIL' %> + +
+
+ +
+
+ +
+ +

+ + + +
+
+
+ <%= l 'mai_LABEL_MODE' %> +
+
+ <%= $mai_data->{fetchmailmethod} %> +
+
+ + % my $smtp_mesg; + + % $smtp_mesg=l('SMTP port %u allow client to authenticate:'); + +
+
+ <%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25)); %> +
+
+ <%= $c->get_current_smtp_auth( TRUE ) %> +
+
+ + % $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:'); + +
+
+ <%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465)); %> +
+
+ <%= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE ) %> +
+
+ + % $smtp_mesg=l 'Submission port %u status:'; + +
+
+ <%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587)); %> +
+
+ <%= $c->get_current_smtp_ssl_auth( TRUE,'u', FALSE ) %> +
+
+ +
+ + % $btn = l('mai_DESC_STATE_RECEPTION_BUTTON'); + <%= hidden_field 'trt' => 'REC' %> + +
+
+ +
+
+
+ +

+ + + +
+
+
+ <%= l 'mai_LABEL_UNKNOWN' %> +
+
+ <%= $c->get_emailunknownuser_status( TRUE ) %> +
+
+ +
+
+ <%= l 'mai_LABEL_DELEGATE' %> +
+
+ <%= $c->get_value('DelegateMailServer') %> +
+
+ +
+
+ <%= l 'mai_LABEL_SMARTHOST' %> +
+
+ <%= $c->get_value('SMTPSmartHost') %> +
+
+ +
+ + + % $btn = l('mai_DESC_STATE_DELIVERY_BUTTON'); + <%= hidden_field 'trt' => 'DEL' %> + +
+
+ +
+
+ +
+ +
\ No newline at end of file diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_REC.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_REC.html.ep new file mode 100644 index 0000000..08b81d0 --- /dev/null +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_mai_REC.html.ep @@ -0,0 +1,272 @@ +%# layout 'AdminLTE', title => "Sme server 2 - emailreceive"; + +%# content_for 'module' => begin + +%# use constant FALSE => 0; +%# use constant TRUE => 1; + + + + % if (config->{debug} == 1) { +
+            <<%=  dumper $c->current_route %>
+            <<%=  dumper $mai_data %>
+            <<%=  dumper $c->param('SMTPAuth') %>
+        
+ % } + + % if ( stash 'error' ) { +
+
+ <<%= $c->render_to_string(inline => stash 'error') %> +
+ % } + + + +

<%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %>

+ +
+ +
+ +
+ <%= l 'mai_DESC_MODE' %> +
+ +
+ +
+
+ <%= l 'mai_LABEL_MODE' %> +
+
+ % param 'FetchmailMethod' => $mai_data->{fetchmailmethod} unless param 'FetchmailMethod'; + <%= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class =>"form-select" %> +
+
+ +
+ + +
+
+ Note - this first line was disabled? + +
+ <%= l 'mai_DESC_SMTP_AUTH_CONTROL' %> +
+ /end +
+ +
+ +
+ <%= 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." %> +
+ +
+ +
+ <%= l "SMTPS port (465) will require implicit SSL/TLS then authenticate to send." %> +
+ +
+ +
+ <%= l "SMTP Submission port (587) will require STARTTLS, then authenticate to send." %> +
+ +
+ +
+ + % my $smtp_mesg=l('SMTP port %u allow client to authenticate:'); + % param 'SMTPAuth' => $c->get_current_smtp_auth( FALSE ) unless param 'SMTPAuth'; + +
+
+ <%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25)); %> +
+
+ <%= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => "form-select" %> +
+
+ +
+ + % my $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:'); + % param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) unless param 'sSMTPAuth'; + +
+
+ <%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465)); %> +
+
+ <%= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => "form-select" %> +
+
+ +
+ + % my $smtp_mesg=l('Submission port %u status:'); + % param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE) unless param 'uSMTPAuth'; + +
+
+ <%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587)); %> +
+
+ + <%= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => "form-select" %> +
+
+ +
+ +

<%= l 'mai_TITLE_SECONDARY' %>

+ +
+ +
+ <%= l 'mai_DESC_SECONDARY' %> +
+ +
+ + % param 'SecondaryMailServer' => $mai_data->{secondarymailserver} unless param 'SecondaryMailServer'; + +
+
+ +
+
+ +
+
+ +
+ +
+ <%= l 'mai_DESC_FETCH_PERIOD' %> +
+ + % param 'FreqOffice' => $mai_data->{freqoffice} unless param 'FreqOffice'; + +
+
+ <%= l 'mai_LABEL_FETCH_PERIOD' %> +
+
+ <%= select_field 'FreqOffice' => $c->fetchmail_freq(), class => "form-select" %> +
+
+ +
+ + % param 'FreqOutside' => $mai_data->{freqoutside} unless param 'FreqOutside'; + +
+
+ <%= l 'mai_LABEL_FETCH_PERIOD_NIGHTS' %> +
+
+ <%= select_field 'FreqOutside' => $c->fetchmail_freq(), class => "form-select" %> +
+
+ +
+ + % param 'FreqWeekend' => $mai_data->{freqweekend} unless param 'FreqWeekend'; + +
+
+ <%= l 'mai_LABEL_FETCH_PERIOD_WEEKENDS' %> +
+
+ <%= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => "form-select" %> +
+
+ +
+ + % param 'SecondaryMailAccount' => $mai_data->{secondarymailaccount} unless param 'SecondaryMailAccount'; + +
+
+ +
+
+ +
+
+ +
+ + % param 'SecondaryMailPassword' => $mai_data->{secondarymailpassword} unless param 'SecondaryMailPassword'; + +
+
+ +
+
+ +
+
+ +
+
+ + +
+ + % param 'SpecifyHeader' => $mai_data->{specifyheader} unless param 'SpecifyHeader'; + +
+
+ <%= l 'mai_LABEL_SORT_METHOD' %> +
+
+ <%= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => "form-select" %> +
+
+ +
+ + % param 'SecondaryMailEnvelope' => $mai_data->{secondarymailenvelope} unless param 'SecondaryMailEnvelope'; + +
+
+ +
+
+ +
+
+ +
+ + % my $btn = l('SAVE'); + % param 'trt' => $mai_data->{trt} unless param 'trt'; + <%= hidden_field 'trt' => 'REC' %> + +
+
+ +
+
+ +
+ + + +%#end +