Skip to content

Commit 7799762

Browse files
author
A. Täffner
committed
Mail Security: implemented a SendAs-Permission for aliases and forwardings (by dark alex)
NOTE: I did only translate de and en!
1 parent b6a0ab0 commit 7799762

File tree

11 files changed

+47
-1
lines changed

11 files changed

+47
-1
lines changed

install/sql/incremental/upd_dev_collection.sql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,16 @@ ALTER TABLE `web_domain` ADD `ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n
192192

193193
ALTER TABLE `openvz_template` CHANGE `vmguarpages` `vmguarpages` varchar(255) DEFAULT '65536:unlimited';
194194
ALTER TABLE `openvz_template` CHANGE `privvmpages` `privvmpages` varchar(255) DEFAULT '131072:139264';
195+
196+
197+
198+
199+
-- Mail Security: Send As Permission by dark alex
200+
-- MS: alter table
201+
ALTER TABLE `mail_forwarding`
202+
ADD COLUMN `allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `active`;
203+
-- MS: apply defaults
204+
update mail_forwarding set allow_send_as='y' WHERE type = 'alias';
205+
206+
207+

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@ CREATE TABLE `mail_forwarding` (
800800
`destination` text,
801801
`type` enum('alias','aliasdomain','forward','catchall') NOT NULL default 'alias',
802802
`active` enum('n','y') NOT NULL DEFAULT 'n',
803+
`allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n',
803804
`greylisting` enum('n','y' ) NOT NULL DEFAULT 'n',
804805
PRIMARY KEY (`forwarding_id`),
805806
KEY `server_id` (`server_id`,`source`),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
user = {mysql_server_ispconfig_user}
22
password = {mysql_server_ispconfig_password}
33
dbname = {mysql_server_database}
4-
query = SELECT destination FROM mail_forwarding WHERE source = '%s' AND active = 'y' AND type = 'alias' AND server_id = {server_id} UNION SELECT email FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id};
4+
query = SELECT destination FROM mail_forwarding WHERE source = '%s' AND active = 'y' AND allow_send_as = 'y' AND server_id = {server_id} UNION SELECT email FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id};
55
hosts = {mysql_server_ip}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@
124124
'default' => 'y',
125125
'value' => array(0 => 'n', 1 => 'y')
126126
),
127+
'allow_send_as' => array (
128+
'datatype' => 'VARCHAR',
129+
'formtype' => 'CHECKBOX',
130+
'default' => 'y',
131+
'value' => array(1 => 'y', 0 => 'n')
132+
),
127133
'greylisting' => array (
128134
'datatype' => 'VARCHAR',
129135
'formtype' => 'CHECKBOX',

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@
118118
'default' => 'y',
119119
'value' => array(0 => 'n', 1 => 'y')
120120
),
121+
'allow_send_as' => array (
122+
'datatype' => 'VARCHAR',
123+
'formtype' => 'CHECKBOX',
124+
'default' => 'n',
125+
'value' => array(1 => 'y', 0 => 'n')
126+
),
121127
'greylisting' => array (
122128
'datatype' => 'VARCHAR',
123129
'formtype' => 'CHECKBOX',

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ $wb['duplicate_mailbox_txt'] = 'Es existiert bereits eine E-Mail Konto mit diese
1111
$wb['domain_txt'] = 'Domain';
1212
$wb['duplicate_email_alias_txt'] = 'Dieser E-Mail Alias existiert bereits.';
1313
$wb['source_txt'] = 'Alias';
14+
$wb['send_as_txt'] = 'Senden als';
15+
$wb['send_as_exp'] = 'Ziel erlauben, den alias als Absender zu benutzen';
1416
$wb['greylisting_txt'] = 'Aktiviere Greylisting';
1517
?>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ $wb['duplicate_mailbox_txt'] = 'Es existiert bereits ein E-Mail Konto mit dieser
77
$wb['domain_txt'] = 'Domain';
88
$wb['source_txt'] = 'Quell E-Mail Adresse';
99
$wb['email_error_isemail'] = 'Bitte geben Sie eine gültige E-Mail Adresse an.';
10+
$wb['send_as_txt'] = 'Senden als';
11+
$wb['send_as_exp'] = 'Ziel erlauben, die Adresse als Absender zu nutzen (Nur, falls das Ziel intern ist)';
1012
$wb['greylisting_txt'] = 'Aktiviere greylisting';
1113
?>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ $wb["duplicate_mailbox_txt"] = 'There is already a mailbox with this email addre
1111
$wb['domain_txt'] = 'Domain';
1212
$wb["duplicate_email_alias_txt"] = 'This email alias does already exist.';
1313
$wb["source_txt"] = 'Alias';
14+
$wb['send_as_txt'] = 'Send as';
15+
$wb['send_as_exp'] = 'Allow target to send mail using this alias as origin';
1416
$wb['greylisting_txt'] = 'Enable greylisting';
1517
?>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ $wb["duplicate_mailbox_txt"] = 'There is already a mailbox with this email addre
77
$wb['domain_txt'] = 'Domain';
88
$wb["source_txt"] = 'Source Email';
99
$wb['email_error_isemail'] = 'Please enter a valid email address.';
10+
$wb['send_as_txt'] = 'Send as';
11+
$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
1012
$wb['greylisting_txt'] = 'Enable greylisting';
1113
?>

interface/web/mail/templates/mail_alias_edit.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ <h1><tmpl_var name="list_head_txt"></h1>
2727
{tmpl_var name='active'}
2828
</div>
2929
</div>
30+
<div class="form-group">
31+
<label class="col-sm-3 control-label">{tmpl_var name='send_as_txt'}</label>
32+
<div class="col-sm-9">
33+
{tmpl_var name='allow_send_as'} <small>{tmpl_var name='send_as_exp'}</small>
34+
</div>
35+
</div>
3036
<div class="form-group">
3137
<label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
3238
<div class="col-sm-9">

0 commit comments

Comments
 (0)