A. Täffner
2016-01-20 7799762f2a7ac3835f5e1f238ef32143fdeb3455
Mail Security: implemented a SendAs-Permission for aliases and forwardings (by dark alex)
NOTE: I did only translate de and en!
11 files modified
48 ■■■■■ changed files
install/sql/incremental/upd_dev_collection.sql 13 ●●●●● patch | view | raw | blame | history
install/sql/ispconfig3.sql 1 ●●●● patch | view | raw | blame | history
install/tpl/mysql-virtual_sender_login_maps.cf.master 2 ●●● patch | view | raw | blame | history
interface/web/mail/form/mail_alias.tform.php 6 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_forward.tform.php 6 ●●●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/de_mail_alias.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/de_mail_forward.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/en_mail_alias.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/en_mail_forward.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/mail/templates/mail_alias_edit.htm 6 ●●●●● patch | view | raw | blame | history
interface/web/mail/templates/mail_forward_edit.htm 6 ●●●●● patch | view | raw | blame | history
install/sql/incremental/upd_dev_collection.sql
@@ -192,3 +192,16 @@
ALTER TABLE `openvz_template` CHANGE `vmguarpages` `vmguarpages` varchar(255) DEFAULT '65536:unlimited';
ALTER TABLE `openvz_template` CHANGE `privvmpages` `privvmpages` varchar(255) DEFAULT '131072:139264';
-- Mail Security: Send As Permission by dark alex
-- MS: alter table
ALTER TABLE `mail_forwarding`
    ADD COLUMN `allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `active`;
-- MS: apply defaults
update mail_forwarding set allow_send_as='y' WHERE type = 'alias';
install/sql/ispconfig3.sql
@@ -800,6 +800,7 @@
  `destination` text,
  `type` enum('alias','aliasdomain','forward','catchall') NOT NULL default 'alias',
  `active` enum('n','y') NOT NULL DEFAULT 'n',
  `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`),
install/tpl/mysql-virtual_sender_login_maps.cf.master
@@ -1,5 +1,5 @@
user = {mysql_server_ispconfig_user}
password = {mysql_server_ispconfig_password}
dbname = {mysql_server_database}
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};
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};
hosts = {mysql_server_ip}
interface/web/mail/form/mail_alias.tform.php
@@ -124,6 +124,12 @@
            'default' => 'y',
            'value'  => array(0 => 'n', 1 => 'y')
        ),
        'allow_send_as' => array (
            'datatype' => 'VARCHAR',
            'formtype' => 'CHECKBOX',
            'default' => 'y',
            'value'  => array(1 => 'y', 0 => 'n')
        ),
        'greylisting' => array (
            'datatype' => 'VARCHAR',
            'formtype' => 'CHECKBOX',
interface/web/mail/form/mail_forward.tform.php
@@ -118,6 +118,12 @@
            'default' => 'y',
            'value'  => array(0 => 'n', 1 => 'y')
        ),
        'allow_send_as' => array (
            'datatype' => 'VARCHAR',
            'formtype' => 'CHECKBOX',
            'default' => 'n',
            'value'  => array(1 => 'y', 0 => 'n')
        ),
        'greylisting' => array (
            'datatype' => 'VARCHAR',
            'formtype' => 'CHECKBOX',
interface/web/mail/lib/lang/de_mail_alias.lng
@@ -11,5 +11,7 @@
$wb['domain_txt'] = 'Domain';
$wb['duplicate_email_alias_txt'] = 'Dieser E-Mail Alias existiert bereits.';
$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';
?>
interface/web/mail/lib/lang/de_mail_forward.lng
@@ -7,5 +7,7 @@
$wb['domain_txt'] = 'Domain';
$wb['source_txt'] = 'Quell E-Mail Adresse';
$wb['email_error_isemail'] = 'Bitte geben Sie eine gültige E-Mail Adresse an.';
$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';
?>
interface/web/mail/lib/lang/en_mail_alias.lng
@@ -11,5 +11,7 @@
$wb['domain_txt'] = 'Domain';
$wb["duplicate_email_alias_txt"] = 'This email alias does already exist.';
$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';
?>
interface/web/mail/lib/lang/en_mail_forward.lng
@@ -7,5 +7,7 @@
$wb['domain_txt'] = 'Domain';
$wb["source_txt"] = 'Source Email';
$wb['email_error_isemail'] = 'Please enter a valid email address.';
$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';
?>
interface/web/mail/templates/mail_alias_edit.htm
@@ -28,6 +28,12 @@
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='send_as_txt'}</label>
                <div class="col-sm-9">
                    {tmpl_var name='allow_send_as'} <small>{tmpl_var name='send_as_exp'}</small>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
                <div class="col-sm-9">
                    {tmpl_var name='greylisting'}
interface/web/mail/templates/mail_forward_edit.htm
@@ -26,6 +26,12 @@
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='send_as_txt'}</label>
                <div class="col-sm-9">
                    {tmpl_var name='allow_send_as'} <small>{tmpl_var name='send_as_exp'}</small>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
                <div class="col-sm-9">
                    {tmpl_var name='greylisting'}