Commit b6698e08 authored by Jesse Norell's avatar Jesse Norell
Browse files

mail_forwarding source must be unique

parent 95f8fb7f
-- default spamfilter_users.policy_id to 0
ALTER TABLE `spamfilter_users` ALTER `policy_id` SET DEFAULT 0;
-- mail_forwarding.source must be unique
ALTER TABLE `mail_forwarding` DROP KEY `server_id`;
ALTER TABLE `mail_forwarding` ADD UNIQUE KEY `server_id` (`server_id`, `source`);
......@@ -916,7 +916,7 @@ CREATE TABLE `mail_forwarding` (
`allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n',
`greylisting` enum('n','y' ) NOT NULL DEFAULT 'n',
PRIMARY KEY (`forwarding_id`),
KEY `server_id` (`server_id`,`source`),
UNIQUE KEY `server_id` (`server_id`, `source`),
KEY `type` (`type`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......
......@@ -83,6 +83,8 @@ $form["tabs"]['alias'] = array (
),
'validators' => array ( 0 => array ( 'type' => 'ISEMAIL',
'errmsg'=> 'email_error_isemail'),
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'email_error_unique'),
),
'default' => '',
'value' => '',
......
......@@ -83,6 +83,8 @@ $form["tabs"]['forward'] = array (
),
'validators' => array ( 0 => array ( 'type' => 'ISEMAIL',
'errmsg'=> 'email_error_isemail'),
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'email_error_unique'),
),
'default' => '',
'value' => '',
......
......@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
$wb['greylisting_txt'] = 'Enable greylisting';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
?>
......@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
$wb['destination_error_empty'] = 'The destination must not be empty.';
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
$wb['email_error_isemail'] = 'Please enter a valid email address.';
$wb['email_error_unique'] = 'Duplicate Emailaddress.';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
?>
......@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
$wb['greylisting_txt'] = 'Enable greylisting';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
?>
......@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
$wb['destination_error_empty'] = 'The destination must not be empty.';
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
$wb['email_error_isemail'] = 'Please enter a valid email address.';
$wb['email_error_unique'] = 'Duplicate Emailaddress.';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
?>
......@@ -9,6 +9,7 @@ $wb['source_txt'] = 'Endereço de email de origem';
$wb['destination_error_empty'] = 'O endereço de email de destino não pode ficar vazio.';
$wb['destination_error_isemail'] = 'O endereço de email de destino é inválido.';
$wb['email_error_isemail'] = 'Por favor informe um endereço de email válido.';
$wb['email_error_unique'] = 'Endereço de email duplicado.';
$wb['send_as_txt'] = 'Enviar como';
$wb['send_as_exp'] = 'Permitir o destino enviar emails usando este endereço como origem (se o destino for interno)';
$wb['greylisting_txt'] = 'Habilitar greylist';
......@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
$wb['greylisting_txt'] = 'Enable greylisting';
?>
......@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Source courriel';
$wb['destination_error_empty'] = 'The destination must not be empty.';
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
$wb['email_error_isemail'] = 'Please enter a valid email address.';
$wb['email_error_unique'] = 'Dupliquer l\'adresse courriel.';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
$wb['greylisting_txt'] = 'Enable greylisting';
?>
......@@ -9,6 +9,7 @@ $wb['source_txt'] = 'Zdrojový e-mail';
$wb['destination_error_empty'] = 'The destination must not be empty.';
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
$wb['email_error_isemail'] = 'Zadejte prosím platnou e-mailovou adresu.';
$wb['email_error_unique'] = 'Duplikování e-mailové adresy.';
$wb['send_as_txt'] = 'Odeslat jako';
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
$wb['greylisting_txt'] = 'Povolit greylisting';
......@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
$wb['send_as_txt'] = 'Senden als';
$wb['send_as_exp'] = 'Ziel erlauben, den Alias als Absender zu benutzen';
$wb['greylisting_txt'] = 'Aktiviere Greylisting';
?>
......@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Quell E-Mail Adresse';
$wb['destination_error_empty'] = 'Das Weiterleitungsziel darf nicht leer sein.';
$wb['destination_error_isemail'] = 'Das Weiterleitungsziel enthält mindestens eine ungültige E-Mail-Adresse.';
$wb['email_error_isemail'] = 'Bitte geben Sie eine gültige E-Mail Adresse an.';
$wb['email_error_unique'] = 'Doppelte E-Mail Adresse.';
$wb['send_as_txt'] = 'Senden als';
$wb['send_as_exp'] = 'Ziel erlauben, die Adresse als Absender zu nutzen (Nur, falls das Ziel intern ist)';
$wb['greylisting_txt'] = 'Aktiviere greylisting';
?>
......@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
$wb['greylisting_txt'] = 'Enable greylisting';
?>
......@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Kilde E-mail';
$wb['destination_error_empty'] = 'The destination must not be empty.';
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
$wb['email_error_isemail'] = 'Please enter a valid email address.';
$wb['email_error_unique'] = 'Dupliker E-mailadresse.';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
$wb['greylisting_txt'] = 'Enable greylisting';
?>
......@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
$wb['greylisting_txt'] = 'Enable greylisting';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
?>
......@@ -10,6 +10,6 @@ $wb['greylisting_txt'] = 'Enable greylisting';
$wb['destination_error_empty'] = 'The destination must not be empty.';
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
$wb['email_error_isemail'] = 'Please enter a valid email address.';
$wb['email_error_unique'] = 'Διπλή διεύθυνση Email.';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
?>
......@@ -14,4 +14,3 @@ $wb['source_txt'] = 'Alias';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
$wb['greylisting_txt'] = 'Enable greylisting';
?>
......@@ -9,7 +9,7 @@ $wb['source_txt'] = 'Source Email';
$wb['destination_error_empty'] = 'The destination must not be empty.';
$wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
$wb['email_error_isemail'] = 'Please enter a valid email address.';
$wb['email_error_unique'] = 'Duplicate Emailaddress.';
$wb['send_as_txt'] = 'Send as';
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
$wb['greylisting_txt'] = 'Enable greylisting';
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment