Skip to content

Commit 098b2f0

Browse files
author
oliver
committed
1.) Added final_*_destiny settings in amavisd_user_config.master to enable quarantining if wanted.
2.) Cleaned up update.php 3.) Changed definitions for quarantine settings 4.) Commented out areas for quarantining 'clean' and 'other'
1 parent 0087708 commit 098b2f0

File tree

4 files changed

+53
-54
lines changed

4 files changed

+53
-54
lines changed

install/tpl/amavisd_user_config.master

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ $sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
4040
' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k))' .
4141
' ORDER BY spamfilter_wblist.priority DESC';
4242

43+
#
44+
# Quarantine settings
45+
#
46+
47+
$final_virus_destiny = D_BOUNCE;
48+
$final_spam_destiny = D_DISCARD;
49+
$final_banned_destiny = D_BOUNCE;
50+
$final_bad_header_destiny = D_DISCARD;
4351

4452
#
4553
# Enable Logging

install/update.php

Lines changed: 35 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,17 @@
2828
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31-
/*
32-
ISPConfig 3 installer.
33-
*/
31+
32+
//** ISPConfig 3 installer.
3433

3534

36-
// Include the library with the basic installer functions
35+
//** Include the library with the basic installer functions
3736
require_once('lib/install.lib.php');
3837

39-
// Include the base class of the installer class
38+
//** Include the base class of the installer class
4039
require_once('lib/installer_base.lib.php');
4140

42-
//** Install logfile
41+
//** Installer/updater logfile
4342
define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log');
4443

4544
//** Get distribution identifier
@@ -49,37 +48,34 @@
4948
$conf_old = $conf;
5049
unset($conf);
5150

52-
// Include the distribution specific installer class library
53-
// and configuration
51+
//** Include the distribution specific installer class library and configuration
5452
include_once('dist/lib/'.$distname.'.lib.php');
5553
include_once('dist/conf/'.$distname.'.conf.php');
5654

57-
// Set the mysql login information
55+
//** Set the mysql login information
5856
$conf["mysql"]["host"] = $conf_old["db_host"];
5957
$conf["mysql"]["database"] = $conf_old["db_database"];
6058
$conf["mysql"]["ispconfig_user"] = $conf_old["db_user"];
6159
$conf["mysql"]["ispconfig_password"] = $conf_old["db_password"];
6260

6361
$inst = new installer();
6462

65-
6663
echo "This application will update ISPConfig 3 on your server.\n";
6764

68-
// $conf["language"] = $inst->request_language();
69-
70-
// TODO: all other queries, for testing I will setup everything in $conf
65+
//** TODO: all other queries, for testing I will setup everything in $conf
7166

72-
// Initialize the MySQL server connection
67+
//** Initialize the MySQL server connection
7368
include_once('lib/mysql.lib.php');
7469

75-
// Database update is a bit brute force and should be rebuild later ;)
70+
//** Database update is a bit brute force and should be rebuild later ;)
7671

77-
// export the current database data
72+
//** Ask user for mysql admin_password if empty
7873
if( empty($conf["mysql"]["admin_password"]) ) {
7974

8075
$conf["mysql"]["admin_password"] = $inst->free_query('MySQL root password', $conf['mysql']['admin_password']);
8176
}
8277

78+
//** export the current database data
8379
if( !empty($conf["mysql"]["admin_password"]) ) {
8480

8581
system("mysqldump -h ".$conf['mysql']['host']." -u ".$conf['mysql']['admin_user']." -p".$conf['mysql']['admin_password']." -c -t --add-drop-table --all --quick ".$conf['mysql']['database']." > existing_db.sql");
@@ -89,89 +85,82 @@
8985
system("mysqldump -h ".$conf['mysql']['host']." -u ".$conf['mysql']['admin_user']." -c -t --add-drop-table --all --quick ".$conf['mysql']['database']." > existing_db.sql");
9086
}
9187

92-
// Delete the old database
88+
//** Delete the old database
9389
$inst->db = new db();
9490

9591
if( !$inst->db->query('DROP DATABASE IF EXISTS '.$conf['mysql']['database']) ) {
9692

9793
$inst->error('Unable to drop MySQL database: '.$conf['mysql']['database'].'.');
9894
}
9995

100-
101-
/*exec("/etc/init.d/mysql stop");
102-
sleep(3);
103-
if($conf["mysql"]["database"] != '') exec("rm -rf /var/lib/mysql/".$conf["mysql"]["database"]);
104-
exec("/etc/init.d/mysql start");
105-
sleep(5);*/
106-
107-
// Create the mysql database
96+
//** Create the mysql database
10897
$inst->configure_database();
10998

110-
// empty all databases
99+
//** empty all databases
111100
$db_tables = $inst->db->getTables();
101+
112102
foreach($db_tables as $table) {
103+
113104
$inst->db->query("TRUNCATE $table");
114105
}
115106

116-
// load old data back into database
117-
if($conf["mysql"]["admin_password"] != '') {
107+
//** load old data back into database
108+
if( !empty($conf["mysql"]["admin_password"]) ) {
109+
118110
system("mysql -h ".$conf['mysql']['host']." -u ".$conf['mysql']['admin_user']." -p".$conf['mysql']['admin_password']." ".$conf['mysql']['database']." < existing_db.sql");
119111
} else {
112+
120113
system("mysql -h ".$conf['mysql']['host']." -u ".$conf['mysql']['admin_user']." ".$conf['mysql']['database']." < existing_db.sql");
121114
}
122-
// Configure postfix
115+
116+
//** Configure postfix
123117
$inst->configure_postfix('dont-create-certs');
124118

125-
// Configure saslauthd
119+
//** Configure saslauthd
126120
swriteln('Configuring SASL');
127121
$inst->configure_saslauthd();
128122

129-
130-
// Configure PAM
123+
//** Configure PAM
131124
swriteln('Configuring PAM');
132125
$inst->configure_pam();
133126

134-
// Configure courier
127+
//** Configure courier
135128
swriteln('Configuring Courier');
136129
$inst->configure_courier();
137130

138-
// Configure Spamasassin
131+
//** Configure Spamasassin
139132
swriteln('Configuring Spamassassin');
140133
$inst->configure_spamassassin();
141134

142-
// Configure Amavis
135+
//** Configure Amavis
143136
swriteln('Configuring Amavisd');
144137
$inst->configure_amavis();
145138

146-
// Configure Getmail
139+
//** Configure Getmail
147140
swriteln('Configuring Getmail');
148141
$inst->configure_getmail();
149142

150-
// Configure Pureftpd
143+
//** Configure Pureftpd
151144
swriteln('Configuring Pureftpd');
152145
$inst->configure_pureftpd();
153146

154-
// Configure MyDNS
147+
//** Configure MyDNS
155148
swriteln('Configuring MyDNS');
156149
$inst->configure_mydns();
157150

158-
// Configure Apache
151+
//** Configure Apache
159152
swriteln('Configuring Apache');
160153
$inst->configure_apache();
161154

162-
// Configure ISPConfig
155+
//** Configure ISPConfig
163156
swriteln('Installing ISPConfig');
164157
$inst->install_ispconfig();
165158

166-
// Configure ISPConfig
159+
//** Configure ISPConfig
167160
swriteln('Installing Crontab');
168161
$inst->install_crontab();
169162

170-
171-
/*
172-
Restart services:
173-
*/
174-
163+
//** Restart services:
175164
swriteln('Restarting services ...');
176165
system("/etc/init.d/mysql restart");
177166
system("/etc/init.d/postfix restart");
@@ -189,5 +178,4 @@
189178

190179
echo "Update finished.\n";
191180

192-
193181
?>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ $wb["bypass_banned_checks_txt"] = 'Bypass banned checks';
99
$wb["bypass_header_checks_txt"] = 'Bypass header checks';
1010
$wb["btn_save_txt"] = 'Save';
1111
$wb["btn_cancel_txt"] = 'Cancel';
12-
$wb["virus_quarantine_to_txt"] = 'Virus quarantine to';
13-
$wb["spam_quarantine_to_txt"] = 'Spam quarantine to';
14-
$wb["banned_quarantine_to_txt"] = 'Banned quarantine to';
15-
$wb["bad_header_quarantine_to_txt"] = 'Bad header quarantine to';
16-
$wb["clean_quarantine_to_txt"] = 'Clean quarantine to';
17-
$wb["other_quarantine_to_txt"] = 'Other quarantine to';
12+
$wb["virus_quarantine_to_txt"] = 'Forward virus to email';
13+
$wb["spam_quarantine_to_txt"] = 'Forward spam to email';
14+
$wb["banned_quarantine_to_txt"] = 'Forward banned to email';
15+
$wb["bad_header_quarantine_to_txt"] = 'Forward bad header to email';
16+
$wb["clean_quarantine_to_txt"] = 'Forward clean to email';
17+
$wb["other_quarantine_to_txt"] = 'Forward other to email';
1818
$wb["spam_tag_level_txt"] = 'SPAM tag level';
1919
$wb["spam_tag2_level_txt"] = 'SPAM tag2 level';
2020
$wb["spam_kill_level_txt"] = 'SPAM kill level';

interface/web/mail/templates/spamfilter_quarantine_edit.htm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
<td class="frmText11">{tmpl_var name='bad_header_quarantine_to_txt'}:</td>
1616
<td class="frmText11"><input name="bad_header_quarantine_to" type="text" class="text" value="{tmpl_var name='bad_header_quarantine_to'}" size="30" maxlength="255"></td>
1717
</tr>
18+
<!--
1819
<tr>
1920
<td class="frmText11">{tmpl_var name='clean_quarantine_to_txt'}:</td>
2021
<td class="frmText11"><input name="clean_quarantine_to" type="text" class="text" value="{tmpl_var name='clean_quarantine_to'}" size="30" maxlength="255"></td>
2122
</tr>
2223
<tr>
2324
<td class="frmText11">{tmpl_var name='other_quarantine_to_txt'}:</td>
2425
<td class="frmText11"><input name="other_quarantine_to" type="text" class="text" value="{tmpl_var name='other_quarantine_to'}" size="30" maxlength="255"></td>
25-
</tr> <tr>
26+
</tr>
27+
//-->
28+
<tr>
2629
<td class="frmText11">&nbsp;</td>
2730
<td class="frmText11">&nbsp;</td>
2831
</tr>

0 commit comments

Comments
 (0)