Skip to content

Commit 20b7abe

Browse files
author
Marius Burkard
committed
- 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
1 parent 7bf3c54 commit 20b7abe

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
user = {mysql_server_ispconfig_user}
22
password = {mysql_server_ispconfig_password}
33
dbname = {mysql_server_database}
4-
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'
4+
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'
5+
56
hosts = {mysql_server_ip}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@
131131
'default' => 'y',
132132
'value' => array(0 => 'n', 1 => 'y')
133133
),
134+
'greylisting' => array (
135+
'datatype' => 'VARCHAR',
136+
'formtype' => 'CHECKBOX',
137+
'default' => 'n',
138+
'value' => array(1 => 'y', 0 => 'n')
139+
),
134140
//#################################
135141
// ENDE Datatable fields
136142
//#################################

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ $wb['domain_error_regex'] = 'Ungültiger Domainname oder ungültige Zeichen im D
88
$wb['limit_mailcatchall_txt'] = 'Die maximale Anzahl an Catchall Einträgen für Ihr Konto wurde erreicht.';
99
$wb['source_txt'] = 'Quelle';
1010
$wb['destination_error_isemail'] = 'Das Ziel ist keine gültige E-Mail Adresse.';
11+
$wb['greylisting_txt'] = 'Aktiviere Greylisting';
1112
?>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ $wb["limit_mailcatchall_txt"] = 'The max. number of email catchall accounts for
99
$wb['domain_txt'] = 'Domain';
1010
$wb["source_txt"] = 'Source';
1111
$wb['destination_error_isemail'] = 'Destination is no valid email address.';
12+
$wb['greylisting_txt'] = 'Enable greylisting';
1213
?>

interface/web/mail/templates/mail_domain_catchall_edit.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ <h1><tmpl_var name="list_head_txt"></h1>
1414
<div class="form-group">
1515
<label for="destination" class="col-sm-3 control-label">{tmpl_var name='destination_txt'}</label>
1616
<div class="col-sm-9"><input type="text" name="destination" id="destination" value="{tmpl_var name='destination'}" class="form-control" /></div></div>
17+
<div class="form-group">
18+
<label class="col-sm-3 control-label">{tmpl_var name='greylisting_txt'}</label>
19+
<div class="col-sm-9">
20+
{tmpl_var name='greylisting'}
21+
</div>
22+
</div>
1723
<div class="form-group">
1824
<label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
1925
<div class="col-sm-9">

0 commit comments

Comments
 (0)