Skip to content

Commit b6698e0

Browse files
committed
mail_forwarding source must be unique
1 parent 95f8fb7 commit b6698e0

Some content is hidden

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

52 files changed

+34
-47
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
-- default spamfilter_users.policy_id to 0
22
ALTER TABLE `spamfilter_users` ALTER `policy_id` SET DEFAULT 0;
3+
4+
-- mail_forwarding.source must be unique
5+
ALTER TABLE `mail_forwarding` DROP KEY `server_id`;
6+
ALTER TABLE `mail_forwarding` ADD UNIQUE KEY `server_id` (`server_id`, `source`);

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ CREATE TABLE `mail_forwarding` (
916916
`allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n',
917917
`greylisting` enum('n','y' ) NOT NULL DEFAULT 'n',
918918
PRIMARY KEY (`forwarding_id`),
919-
KEY `server_id` (`server_id`,`source`),
919+
UNIQUE KEY `server_id` (`server_id`, `source`),
920920
KEY `type` (`type`)
921921
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
922922

interface/web/mail/form/mail_alias.tform.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
),
8484
'validators' => array ( 0 => array ( 'type' => 'ISEMAIL',
8585
'errmsg'=> 'email_error_isemail'),
86+
1 => array ( 'type' => 'UNIQUE',
87+
'errmsg'=> 'email_error_unique'),
8688
),
8789
'default' => '',
8890
'value' => '',

interface/web/mail/form/mail_forward.tform.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
),
8484
'validators' => array ( 0 => array ( 'type' => 'ISEMAIL',
8585
'errmsg'=> 'email_error_isemail'),
86+
1 => array ( 'type' => 'UNIQUE',
87+
'errmsg'=> 'email_error_unique'),
8688
),
8789
'default' => '',
8890
'value' => '',

interface/web/mail/lib/lang/ar_mail_alias.lng

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
1414
$wb['greylisting_txt'] = 'Enable greylisting';
1515
$wb['send_as_txt'] = 'Send as';
1616
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
17-
?>

interface/web/mail/lib/lang/ar_mail_forward.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
1010
$wb['destination_error_empty'] = 'The destination must not be empty.';
1111
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
1212
$wb['email_error_isemail'] = 'Please enter a valid email address.';
13+
$wb['email_error_unique'] = 'Duplicate Emailaddress.';
1314
$wb['send_as_txt'] = 'Send as';
1415
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
15-
?>

interface/web/mail/lib/lang/bg_mail_alias.lng

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
1414
$wb['greylisting_txt'] = 'Enable greylisting';
1515
$wb['send_as_txt'] = 'Send as';
1616
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
17-
?>

interface/web/mail/lib/lang/bg_mail_forward.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
1010
$wb['destination_error_empty'] = 'The destination must not be empty.';
1111
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
1212
$wb['email_error_isemail'] = 'Please enter a valid email address.';
13+
$wb['email_error_unique'] = 'Duplicate Emailaddress.';
1314
$wb['send_as_txt'] = 'Send as';
1415
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
15-
?>

interface/web/mail/lib/lang/br_mail_forward.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ $wb['source_txt'] = 'Endereço de email de origem';
99
$wb['destination_error_empty'] = 'O endereço de email de destino não pode ficar vazio.';
1010
$wb['destination_error_isemail'] = 'O endereço de email de destino é inválido.';
1111
$wb['email_error_isemail'] = 'Por favor informe um endereço de email válido.';
12+
$wb['email_error_unique'] = 'Endereço de email duplicado.';
1213
$wb['send_as_txt'] = 'Enviar como';
1314
$wb['send_as_exp'] = 'Permitir o destino enviar emails usando este endereço como origem (se o destino for interno)';
1415
$wb['greylisting_txt'] = 'Habilitar greylist';

interface/web/mail/lib/lang/ca_mail_alias.lng

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
1414
$wb['send_as_txt'] = 'Send as';
1515
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
1616
$wb['greylisting_txt'] = 'Enable greylisting';
17-
?>

0 commit comments

Comments
 (0)