Skip to content

Commit 178258f

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
Master See merge request !124
2 parents b4f3f51 + 7c2e3ea commit 178258f

File tree

76 files changed

+1143
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1143
-465
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `dns_rr` CHANGE `data` `data` TEXT NOT NULL DEFAULT '';

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ CREATE TABLE `dns_rr` (
450450
`zone` int(11) unsigned NOT NULL DEFAULT '0',
451451
`name` varchar(255) NOT NULL DEFAULT '',
452452
`type` enum('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL,
453-
`data` varchar(255) NOT NULL DEFAULT '',
453+
`data` TEXT NOT NULL DEFAULT '',
454454
`aux` int(11) unsigned NOT NULL default '0',
455455
`ttl` int(11) unsigned NOT NULL default '86400',
456456
`active` enum('N','Y') NOT NULL default 'Y',

install/tpl/master_cf_amavis10027.master

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
-o smtp_send_xforward_command=yes
1515
-o milter_default_action=accept
1616
-o milter_macro_daemon_name=ORIGINATING
17-
-o smtpd_milters=inet:127.0.0.1:4445
1817

install/tpl/server.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module=postfix_mysql
3333
maildir_path=/var/vmail/[domain]/[localpart]
3434
homedir_path=/var/vmail
3535
dkim_path=/var/lib/amavis/dkim
36+
dkim_strength=1024
3637
pop3_imap_daemon=courier
3738
mail_filter_syntax=maildrop
3839
mailuser_uid=5000

install/tpl/system.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
enable_custom_login=n
1111
mailboxlist_webmail_link=y
1212
webmail_url=/webmail
13+
dkim_path=/var/lib/amavis/dkim
1314

1415
[monitor]
1516

interface/lib/classes/validate_dkim.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,17 @@ function check_template($field_name, $field_value, $validator) {
7272
*
7373
* @return boolean - true if $POST contains a real key-file
7474
*/
75-
function validate_post($key, $value) {
75+
function validate_post($key, $value, $dkim_strength) {
76+
$value=str_replace(array("\n", "-----BEGIN RSA PRIVATE KEY-----", "-----END RSA PRIVATE KEY-----", " "), "", $value);
7677
switch ($key) {
7778
case 'public':
7879
if (preg_match("/(^-----BEGIN PUBLIC KEY-----)[a-zA-Z0-9\r\n\/\+=]{1,221}(-----END PUBLIC KEY-----(\n|\r)?$)/", $value) === 1) { return true; } else { return false; }
7980
break;
8081
case 'private':
81-
if (preg_match("/(^-----BEGIN RSA PRIVATE KEY-----)[a-zA-Z0-9\r\n\/\+=]{1,850}(-----END RSA PRIVATE KEY-----(\n|\r)?$)/", $value) === 1) { return true; } else { return false; }
82+
if ( $dkim_strength == 1024 ) $range = "{812,816}";
83+
if ( $dkim_strength == 2048 ) $range = "{1588,1592}";
84+
if ( $dkim_strength == 4096 ) $range = "{3132,3136}";
85+
if ( preg_match("/^[a-zA-Z0-9\/\+=]".$range."$/", $value ) === 1) return true; else return false;
8286
break;
8387
}
8488
}

interface/web/admin/form/server_config.tform.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,12 @@
313313
'width' => '40',
314314
'maxlength' => '255'
315315
),
316+
'dkim_strength' => array(
317+
'datatype' => 'INTEGER',
318+
'formtype' => 'SELECT',
319+
'default' => '1024',
320+
'value' => array('1024' => 'normal (1024)', '2048' => 'strong (2048)', '4096' => 'very strong (4096)')
321+
),
316322
'relayhost_password' => array(
317323
'datatype' => 'VARCHAR',
318324
'formtype' => 'TEXT',

interface/web/admin/lib/lang/de_server_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,5 @@ $wb["v6_prefix_txt"] = 'IPv6 Prefix';
198198
$wb["vhost_rewrite_v6_txt"] = 'Rewrite IPv6 on Mirror';
199199
$wb["v6_prefix_length"] = 'Prefix zu lang fuer angegebene IPv6-Adresse ';
200200
$wb['monitor_system_updates_txt'] = 'Suche nach Linux updates';
201+
$wb['dkim_strength_txt'] = 'DKIM Stärke';
201202
?>

interface/web/admin/lib/lang/en_server_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,5 @@ $wb["overquota_db_notify_client_txt"] = 'Send DB quota warnings to client';
202202
$wb['monitor_system_updates_txt'] = 'Check for Linux updates';
203203
$wb['php_handler_txt'] = "PHP Handler";
204204
$wb['disabled_txt'] = 'Disabled';
205+
$wb['dkim_strength_txt'] = 'DKIM strength';
205206
?>

interface/web/admin/lib/lang/es_server_config.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ $wb['backup_mode_txt'] = 'Modo de copias de seguridad';
159159
$wb['backup_mode_userzip'] = 'Copiar archivos del usuario web en un zip';
160160
$wb['backup_mode_rootgz'] = 'Copiar todos los archivos como usuario root';
161161
$wb['realtime_blackhole_list_txt'] = 'Real-time Blackhole List';
162-
$wb['realtime_blackhole_list_note_txt'] = '(Separar RBL's con comas)';
162+
$wb['realtime_blackhole_list_note_txt'] = "(Separar RBL's con comas)";
163163
$wb['ssl_settings_txt'] = 'Configuración SSL';
164164
$wb['permissions_txt'] = 'Permisos';
165165
$wb['php_settings_txt'] = 'Configuración de PHP';

0 commit comments

Comments
 (0)