interface/web/js/mail_domain_dkim.jsold mode 100644 new mode 100755
@@ -46,9 +46,13 @@ alert("Error creating XMLHTTP-instance"); return false; } else { var domain=encodeURIComponent(document.getElementById("domain").value) var selector=encodeURIComponent(document.getElementById("dkim_selector").value) var publickey=encodeURIComponent(document.getElementById("dkim_public").value) var privatekey=encodeURIComponent(document.getElementById("dkim_private").value) request.open('POST', 'mail/mail_domain_dkim_create.php', true); request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); request.send('domain='+value+'&action='+action+'&pkey='+privatekey); request.send('domain='+domain+'&action='+action+'&dkim_selector='+selector+'&dkim_public='+publickey+'&dkim_private='+privatekey); request.onreadystatechange = interpretRequest; } } @@ -58,15 +62,15 @@ case 4: if (request.status != 200) {alert("Request done but NOK\nError:"+request.status);} else { document.getElementsByName('dkim_selector')[0].value = request.responseXML.getElementsByTagName('selector')[0].firstChild.nodeValue; document.getElementsByName('dkim_private')[0].value = request.responseXML.getElementsByTagName('privatekey')[0].firstChild.nodeValue; document.getElementsByName('dkim_public')[0].value = request.responseXML.getElementsByTagName('publickey')[0].firstChild.nodeValue; document.getElementsByName('dns_record')[0].value = request.responseXML.getElementsByTagName('dns_record')[0].firstChild.nodeValue; document.getElementsByName('dkim_public')[0].value = request.responseXML.getElementsByTagName('publickey')[0].firstChild.nodeValue; document.getElementsByName('dns_record')[0].value = request.responseXML.getElementsByTagName('dns_record')[0].firstChild.nodeValue; } break; default: break; } } var serverType = jQuery('#dkim_private').val(); setRequest('show','{tmpl_var name="domain"}',serverType); interface/web/mail/lib/lang/ar_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/bg_mail_domain.lng
@@ -1,4 +1,4 @@ <?php m_selector_error'] = '<?php $wb['server_id_txt'] = 'Server'; $wb['domain_txt'] = 'Domain'; $wb['type_txt'] = 'Type'; @@ -12,9 +12,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; $wb['policy_txt'] = 'Спамфилтър'; interface/web/mail/lib/lang/br_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/cz_mail_domain.lng
@@ -12,11 +12,11 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb['policy_txt'] = 'Spamový filtr'; $wb['no_policy'] = '- nepovoleno -'; ?> interface/web/mail/lib/lang/de_mail_domain.lng
@@ -7,7 +7,7 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'erstelle DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'ungueltiger DKIM-Private key'; $wb['domain_error_empty'] = 'Domain ist leer'; $wb['domain_error_unique'] = 'Doppelte Domain.'; @@ -17,6 +17,6 @@ $wb['policy_txt'] = 'Spamfilter'; $wb['no_policy'] = '- nicht aktiviert -'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Ungültiger DKIM-Selector. Verwenden Sie nur alphanumerische Zeichen (a-z oder 0-9)'; $wb['dkim_selector_error'] = 'Ungültiger DKIM-Selector. Verwenden Sie nur max. 63 alphanumerische Zeichen (a-z oder 0-9)'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/en_mail_domain.lng
@@ -7,7 +7,7 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb["domain_error_empty"] = 'Domain is empty.'; $wb["domain_error_unique"] = 'Duplicate Domain.'; @@ -19,5 +19,5 @@ $wb["no_policy"] = '- not enabled -'; $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; ?> interface/web/mail/lib/lang/es_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'Clave privada DKIM'; $wb["dkim_public_txt"] = 'Clave pública DKIM\nsólo para información'; $wb["dkim_generate_txt"] = 'Generar clave privada DKIM'; $wb["dkim_dns_txt"] = 'Registro DNS (TYPE TXT)<br><br>añade este registro a tus DNS'; $wb["dkim_dns_txt"] = 'Registro DNS'; $wb["dkim_private_key_error"] = 'Clave privada DKIM no válida'; $wb['dkim_selector_txt'] = 'Selector DKIM'; $wb['dkim_selector_error'] = 'Selector DKIM no válido. Usar sólo caracteres alfanuméricos en minúsculas (a-z o 0-9)'; $wb['dkim_selector_error'] = 'Selector DKIM no válido. Usar sólo caracteres alfanuméricos en minúsculas (a-z o 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/fi_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/fr_mail_domain.lng
@@ -7,7 +7,7 @@ $wb['dkim_private_txt'] = 'ClérivéDKIM'; $wb['dkim_public_txt'] = 'Cléublique DKIM\npour information seulement'; $wb['dkim_generate_txt'] = 'Gérer la clérivéDKIM'; $wb['dkim_dns_txt'] = 'Enregistrement DNS (TYPE TXT)<br><br>Ajouter l\'enregistrement àotre DNS'; $wb['dkim_dns_txt'] = 'Enregistrement DNS'; $wb['dkim_private_key_error'] = 'ClérivéDKIM invalide'; $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)'; $wb['domain_error_empty'] = 'Le domaine est vide.'; @@ -19,6 +19,6 @@ $wb['no_policy'] = '- inactif -'; $wb['error_not_allowed_server_id'] = 'Le serveur choisi n\'est pas autoriséour ce compte.'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Selecteur DKIM non valide. Utiliser que des caractès alphanuméques minuscules (a-z et/oo 0-9)'; $wb['dkim_selector_error'] = 'Selecteur DKIM non valide. Utiliser que des caractès alphanuméques minuscules (a-z et/oo 0-9) up to 63 chars'; ?> interface/web/mail/lib/lang/hr_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/hu_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/id_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/it_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/ja_mail_domain.lng
@@ -14,7 +14,7 @@ $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['no_policy'] = '使わない'; ?> interface/web/mail/lib/lang/nl_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/pl_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/pt_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/ro_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/lib/lang/se_mail_domain.lng
@@ -13,10 +13,10 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; $wb['no_policy'] = '- ej aktiverat -'; ?> interface/web/mail/lib/lang/sk_mail_domain.lng
@@ -12,9 +12,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb['policy_txt'] = 'Spamfilter'; $wb['no_policy'] = '- Nie je aktivovaný -'; interface/web/mail/lib/lang/tr_mail_domain.lng
@@ -14,9 +14,9 @@ $wb["dkim_private_txt"] = 'DKIM Private-key'; $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; $wb["dkim_generate_txt"] = 'Generate DKIM Private-key'; $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; $wb["dkim_dns_txt"] = 'DNS-Record'; $wb["dkim_private_key_error"] = 'Invalid DKIM-Private key'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9)'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; $wb["dkim_settings_txt"] = 'DomainKeys Identified Mail (DKIM)'; ?> interface/web/mail/mail_domain_dkim_create.php
@@ -32,7 +32,7 @@ /** * This script is invoked by interface/js/mail_domain_dkim.js * to generate or show the DKIM Private-key and to show the Private-key. * returns DKIM Private-Key and DKIM Public-Key * returns DKIM keys, selector, and dns-record */ @@ -40,13 +40,21 @@ require_once '../../lib/app.inc.php'; require_once '../../lib/classes/validate_dkim.inc.php'; $validate_dkim=new validate_dkim (); //* Check permissions for module $app->auth->check_module_permissions('mail'); header('Content-Type: text/xml; charset=utf-8'); header('Cache-Control: must-revalidate, pre-check=0, no-store, no-cache, max-age=0, post-check=0'); function validate_domain($domain) { $regex = '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/'; return preg_match($regex, $domain); } function validate_selector($selector) { $regex = '/^[a-z0-9]{0,63}$/'; return preg_match($regex, $selector); } /** * This function fix PHP's messing up POST input containing characters space, dot, @@ -77,7 +85,6 @@ } function get_public_key($private_key) { require_once('../../lib/classes/validate_dkim.inc.php'); $validate_dkim=new validate_dkim (); if($validate_dkim->validate_post('private',$private_key)) { /* validate the $_POST-value */ exec('echo '.escapeshellarg($private_key).'|openssl rsa -pubout -outform PEM 2> /dev/null',$pubkey,$result); @@ -88,27 +95,63 @@ return $public_key; } $_POST=getRealPOST(); /** * This function updates the selector if a new key-pair was created * and the selector is already used in the dns-record * @param string $old_selector * @return string selector */ function new_selector ($old_selector, $domain) { global $app; //* validate post-values if ( validate_domain($domain) && validate_selector($old_selector) ) { //* get active selectors from dns $soa_rec = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE active = 'Y' AND origin = ?", $domain.'.'); if ( isset($soa_rec) && !empty($soa_rec) ) { //* check for a dkim-record in the dns? $dns_data = $app->db->queryOneRecord("SELECT name FROM dns_rr WHERE name = ? AND active = 'Y'", $old_selector.'._domainkey.'.$domain.'.'); $selector = str_replace( '._domainkey.'.$domain.'.', '', $dns_data['name']); if ( $old_selector == $selector) { $selector = substr($old_selector, 0, 53) . time(); //* add unix-timestamp to delimiter to allow old and new key in the dns } else { $selector = $old_selector; } } } else { $selector = 'invalid domain or selector'; } return $selector; } switch ($_POST['action']) { case 'create': /* create DKIM Private-key */ $_POST=getRealPOST(); exec('openssl rand -out /usr/local/ispconfig/server/temp/random-data.bin 4096 2> /dev/null', $output, $result); exec('openssl genrsa -rand /usr/local/ispconfig/server/temp/random-data.bin 1024 2> /dev/null', $privkey, $result); unlink("/usr/local/ispconfig/server/temp/random-data.bin"); foreach($privkey as $values) $private_key=$private_key.$values."\n"; //* check the selector for updated dkim-settings only if ( isset($_POST['dkim_public']) && !empty($_POST['dkim_public']) ) $selector = new_selector($_POST['dkim_selector'], $_POST['domain']); break; case 'show': /* show the DNS-Record onLoad */ $private_key=$_POST['pkey']; $private_key=$_POST['dkim_private']; break; } $public_key=get_public_key($private_key); $dns_record=str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"),'',$public_key); if ( !isset($selector) ) { if ( validate_selector($_POST['dkim_selector']) ) $selector=$_POST['dkim_selector']; } echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; echo "<formatname>\n"; echo "<selector>".$selector."</selector>\n"; echo "<privatekey>".$private_key."</privatekey>\n"; echo "<publickey>".$public_key."</publickey>\n"; echo "<dns_record>v=DKIM1; t=s; p=".$dns_record."</dns_record>\n"; if ( validate_domain($_POST['domain']) ) { echo '<dns_record>'.$selector.'_domainkey.'.$_POST['domain'].'. 3600 TXT "v=DKIM1; t=s; p='.$dns_record.'"</dns_record>'; } echo "</formatname>\n"; ?> interface/web/mail/templates/mail_domain_edit.htmold mode 100644 new mode 100755
@@ -97,7 +97,7 @@ <div class="ctrlHolder"> <label for="dkim_private">{tmpl_var name='dkim_private_txt'}</label> <textarea name="dkim_private" id="dkim_private" rows='10' cols='30'>{tmpl_var name='dkim_private'}</textarea> <a href="javascript:setRequest('create','{tmpl_var name='domain'}')">{tmpl_var name='dkim_generate_txt'}</a> <a href="javascript:setRequest('create','{tmpl_var name='domain'}','{tmpl_var name='dkim_selector'}')">{tmpl_var name='dkim_generate_txt'}</a> </div> <div class="ctrlHolder"> <textarea name="dkim_public" style="display:none;" id="dkim_public" rows='5' cols='30' readonly>{tmpl_var name='dkim_public'}</textarea> @@ -108,6 +108,7 @@ </div> </div> </fieldset> <input type="hidden" name="id" value="{tmpl_var name='id'}"> @@ -118,6 +119,5 @@ <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('mail/mail_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> </div> </div> </div> <script language="JavaScript" type="text/javascript" src="js/mail_domain_dkim.js"></script>