浏览代码

Adding options for different IMAP and SMTP configurations

dpeca 9 年之前
父节点
当前提交
22b6ab4e2f

+ 14 - 7
web/inc/i18n/ar.php

@@ -730,13 +730,6 @@ $LANG['ar'] = array(
     'webalizer' => 'محلل الويب webalizer',
     'awstats' => 'احصائيات الويب awstats',
 
-
-// Texts below doesn't exist in en.php
-    '%s rule' => 'قواعد %s',
-    'MainDomain' => 'النطاق الرئيسي',
-    'SubDomain' => 'النطاق الفرعي (الجزء الاول الذي يضاف إلى النطاق الرئيسي)',
-    'Add Sub Domain' => 'إضافة نطاق فرعي'
-
     'Vesta SSL' => 'Vesta SSL',
     'SUBJECT' => 'SUBJECT',
     'ALIASES' => 'ALIASES',
@@ -745,4 +738,18 @@ $LANG['ar'] = array(
     'SIGNATURE' => 'SIGNATURE',
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
+
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
+// Texts below doesn't exist in en.php
+    '%s rule' => 'قواعد %s',
+    'MainDomain' => 'النطاق الرئيسي',
+    'SubDomain' => 'النطاق الفرعي (الجزء الاول الذي يضاف إلى النطاق الرئيسي)',
+    'Add Sub Domain' => 'إضافة نطاق فرعي'
+
 );

+ 7 - 0
web/inc/i18n/bs.php

@@ -738,4 +738,11 @@ $LANG['bs'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Koristi server hostname',
+    'Use domain hostname' => 'Koristi hostname domena',
+    'Use STARTTLS' => 'Koristi STARTTLS',
+    'Use SSL' => 'Koristi SSL',
+    'No encryption' => 'Bez enkripcije',
+    'Do not use encryption' => 'Nemoj koristiti enkripciju',
+
 );

+ 8 - 0
web/inc/i18n/cn.php

@@ -738,4 +738,12 @@ $LANG['cn'] = array(
     'SIGNATURE' => 'SIGNATURE',
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
+
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/cz.php

@@ -740,4 +740,11 @@ $LANG['cz'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/da.php

@@ -741,4 +741,11 @@ $LANG['da'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 8 - 0
web/inc/i18n/de.php

@@ -738,4 +738,12 @@ $LANG['de'] = array(
     'SIGNATURE' => 'SIGNATURE',
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
+
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/el.php

@@ -740,4 +740,11 @@ $LANG['el'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/en.php

@@ -740,4 +740,11 @@ $LANG['en'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/es.php

@@ -737,4 +737,11 @@ $LANG['es'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/fa.php

@@ -742,6 +742,13 @@ $LANG['fa'] = [
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 // Texts below doesn't exist in en.php
     '70 خط اخر  %s.%s.log' => 'هفتاد خط انتهايي از %s.%s.log',
 ];

+ 6 - 0
web/inc/i18n/fi.php

@@ -741,6 +741,12 @@ $LANG['fi'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
 
 // Texts below doesn't exist in en.php
     'traffic' => 'tiedonsiirto',

+ 6 - 0
web/inc/i18n/fr.php

@@ -739,6 +739,12 @@ $LANG['fr'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
 
 // Texts below doesn't exist in en.php
     'disk' => 'disque',

+ 7 - 0
web/inc/i18n/hu.php

@@ -743,6 +743,13 @@ $LANG['hu'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 // Texts below doesn't exist in en.php
     'Bandwidth Usage eth1' => 'eth1 sávszélesség használat',
 );

+ 7 - 0
web/inc/i18n/id.php

@@ -742,4 +742,11 @@ $LANG['id'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/it.php

@@ -740,4 +740,11 @@ $LANG['it'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/ja.php

@@ -739,4 +739,11 @@ $LANG['ja'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/ka.php

@@ -739,4 +739,11 @@ $LANG['ka'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/nl.php

@@ -740,4 +740,11 @@ $LANG['nl'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/no.php

@@ -740,4 +740,11 @@ $LANG['no'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/pl.php

@@ -739,4 +739,11 @@ $LANG['pl'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 8 - 0
web/inc/i18n/pt-BR.php

@@ -738,4 +738,12 @@ $LANG['pt-BR'] = array(
     'SIGNATURE' => 'SIGNATURE',
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
+
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/pt.php

@@ -739,4 +739,11 @@ $LANG['pt'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/ro.php

@@ -740,4 +740,11 @@ $LANG['ro'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/ru.php

@@ -740,4 +740,11 @@ $LANG['ru'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/se.php

@@ -739,4 +739,11 @@ $LANG['se'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/tr.php

@@ -740,4 +740,11 @@ $LANG['tr'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/tw.php

@@ -762,4 +762,11 @@ $LANG['tw'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/ua.php

@@ -740,4 +740,11 @@ $LANG['ua'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 7 - 0
web/inc/i18n/vi.php

@@ -738,4 +738,11 @@ $LANG['vi'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
+    'Use server hostname' => 'Use server hostname',
+    'Use domain hostname' => 'Use domain hostname',
+    'Use STARTTLS' => 'Use STARTTLS',
+    'Use SSL' => 'Use SSL',
+    'No encryption' => 'No encryption',
+    'Do not use encryption' => 'Do not use encryption',
+
 );

+ 27 - 0
web/js/pages/add_mail_acc.js

@@ -93,6 +93,33 @@ randomString = function() {
         $('#v_password').text(Array(randomstring.length+1).join('*'));
 }
 
+use_hostname = function(domain) {
+	$('#td_imap_hostname').html(domain);
+	$('#td_smtp_hostname').html(domain);
+}
+
+use_starttls = function() {
+	$('#td_imap_port').html('143');
+	$('#td_imap_encryption').html('STARTTLS');
+	$('#td_smtp_port').html('587');
+	$('#td_smtp_encryption').html('STARTTLS');
+}
+
+use_ssl = function() {
+	$('#td_imap_port').html('993');
+	$('#td_imap_encryption').html('SSL');
+	$('#td_smtp_port').html('465');
+	$('#td_smtp_encryption').html('SSL');
+}
+
+use_no_encryption = function(domain, no_encyption) {
+	use_hostname(domain);
+	$('#td_imap_port').html('143');
+	$('#td_imap_encryption').html(no_encyption);
+	$('#td_smtp_port').html('25');
+	$('#td_smtp_encryption').html(no_encyption);
+}
+
 $(document).ready(function() {
     $('#v_account').text($('input[name=v_account]').val());
     $('#v_password').text($('input[name=v_password]').val());

+ 14 - 6
web/templates/admin/add_mail_acc.html

@@ -143,15 +143,15 @@
                     </tr>
                     <tr>
                         <td><?=__('IMAP hostname')?>:</td>
-                        <td><?=$hostname?></td>
+                        <td id="td_imap_hostname"><?=$hostname?></td>
                     </tr>
                     <tr>
                         <td><?=__('IMAP port')?>:</td>
-                        <td>143</td>
+                        <td id="td_imap_port">143</td>
                     </tr>
                     <tr>
                         <td><?=__('IMAP security')?>:</td>
-                        <td><?=__('STARTTLS')?></td>
+                        <td id="td_imap_encryption"><?=__('STARTTLS')?></td>
                     </tr>
                     <tr>
                         <td><?=__('IMAP auth method')?>:</td>
@@ -159,20 +159,28 @@
                     </tr>
                     <tr>
                         <td><?=__('SMTP hostname')?></td>
-                        <td><?=$hostname?></td>
+                        <td id="td_smtp_hostname"><?=$hostname?></td>
                     </tr>
                     <tr>
                         <td><?=__('SMTP port')?>:</td>
-                        <td>587</td>
+                        <td id="td_smtp_port">587</td>
                     </tr>
                     <tr>
                         <td><?=__('SMTP security')?>:</td>
-                        <td><?=__('STARTTLS')?></td>
+                        <td id="td_smtp_encryption"><?=__('STARTTLS')?></td>
                     </tr>
                     <tr>
                         <td><?=__('SMTP auth method')?>:</td>
                         <td><?=__('Normal password')?></td>
                     </tr>
+                </table>
+				<br />
+                <table>
+					<tr><td>&#8226; <a href="javascript:use_hostname('<?=$hostname?>');" class="generate"><?php print __('Use server hostname');?></a></td></tr>
+					<tr><td>&#8226; <a href="javascript:use_hostname('<?=$v_domain?>');" class="generate"><?php print __('Use domain hostname');?></a></td></tr>
+					<tr><td>&#8226; <a href="javascript:use_starttls();" class="generate"><?php print __('Use STARTTLS');?></a></td></tr>
+					<tr><td>&#8226; <a href="javascript:use_ssl();" class="generate"><?php print __('Use SSL');?></a></td></tr>
+					<tr><td>&#8226; <a href="javascript:use_no_encryption('<?=$v_domain?>', '<?php print __('No encryption');?>');" class="generate"><?php print __('Do not use encryption');?></a></td></tr>
                 </table>
                 </div>
             </td>