Commit 20b7abe3 authored by Marius Burkard's avatar Marius Burkard
Browse files

- enable greylisting setting for catchall mail addresses

- change the way greylisting setting is evaluated (prio is now 1. mail user, 2. mail forward/alias, 3. catchall), fixes #5378
parent 7bf3c540
user = {mysql_server_ispconfig_user}
password = {mysql_server_ispconfig_password}
dbname = {mysql_server_database}
query = SELECT 'greylisting' FROM (SELECT greylisting, source AS email FROM mail_forwarding WHERE server_id = {server_id} UNION SELECT greylisting, email FROM mail_user WHERE server_id = {server_id}) addresses WHERE addresses.email='%s' AND addresses.greylisting='y' UNION SELECT 'greylisting' FROM `mail_forwarding` f CROSS JOIN `mail_user` u ON u.email = f.destination WHERE f.type = 'catchall' AND u.greylisting = 'y' AND u.server_id = {server_id} AND f.source = '@%s'
query = SELECT 'greylisting' FROM (SELECT `greylisting`, 1 as `prio` FROM `mail_user` WHERE `server_id` = {server_id} AND `email` = '%s' UNION SELECT `greylisting`, 2 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '%s' UNION SELECT `greylisting`, 3 as `prio` FROM `mail_forwarding` WHERE `server_id` = {server_id} AND `source` = '@%s' ORDER BY `prio` ASC LIMIT 1) as rules WHERE rules.greylisting = 'y'
hosts = {mysql_server_ip}
\ No newline at end of file
......@@ -131,6 +131,12 @@ $form["tabs"]['catchall'] = array (
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'greylisting' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(1 => 'y', 0 => 'n')
),
//#################################
// ENDE Datatable fields
//#################################
......
......@@ -8,4 +8,5 @@ $wb['domain_error_regex'] = 'Ungültiger Domainname oder ungültige Zeichen im D
$wb['limit_mailcatchall_txt'] = 'Die maximale Anzahl an Catchall Einträgen für Ihr Konto wurde erreicht.';
$wb['source_txt'] = 'Quelle';
$wb['destination_error_isemail'] = 'Das Ziel ist keine gültige E-Mail Adresse.';
$wb['greylisting_txt'] = 'Aktiviere Greylisting';
?>
......@@ -9,4 +9,5 @@ $wb["limit_mailcatchall_txt"] = 'The max. number of email catchall accounts for
$wb['domain_txt'] = 'Domain';
$wb["source_txt"] = 'Source';
$wb['destination_error_isemail'] = 'Destination is no valid email address.';
$wb['greylisting_txt'] = 'Enable greylisting';
?>
......@@ -14,6 +14,12 @@
<div class="form-group">
<label for="destination" class="col-sm-3 control-label">{tmpl_var name='destination_txt'}</label>
<div class="col-sm-9"><input type="text" name="destination" id="destination" value="{tmpl_var name='destination'}" class="form-control" /></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'}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
<div class="col-sm-9">
......
Supports Markdown
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