Skip to content

Commit 6fab3f1

Browse files
author
Marius Burkard
committed
- improved rspamd config
1 parent a14360e commit 6fab3f1

File tree

5 files changed

+36
-9
lines changed

5 files changed

+36
-9
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
use = ["x-spamd-bar", "x-spam-level", "authentication-results"];
2+
authenticated_headers = ["authentication-results"];
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
local_addrs = "127.0.0.0/8, ::1";
2+
3+
dns {
4+
nameserver = ["127.0.0.1:53:10"];
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
servers = "127.0.0.1";

server/conf/rspamd_users.conf.master

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ settings {
2525

2626
want_spam = yes;
2727
}
28-
whitelist-timmehosting {
29-
priority = 20;
30-
from = "@timmehosting.de";
31-
from = "@timmehosting.com";
32-
want_spam = yes;
33-
}
28+
# whitelist-timmehosting {
29+
# priority = 20;
30+
# from = "@xxx";
31+
# from = "@xxx";
32+
# want_spam = yes;
33+
# }
3434
whitelist-ca {
3535
priority = 20;
3636
from = "@comodo.com";

server/plugins-available/postfix_server_plugin.inc.php

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ function update($event_name, $data) {
189189
exec("postconf -X 'content_filter'");
190190

191191
exec("postconf -e 'smtpd_milters = inet:localhost:11332'");
192+
exec("postconf -e 'non_smtpd_milters = inet:localhost:11332'");
192193
exec("postconf -e 'milter_protocol = 6'");
193194
exec("postconf -e 'milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}'");
194195
exec("postconf -e 'milter_default_action = accept'");
@@ -262,6 +263,24 @@ function update($event_name, $data) {
262263
exec('cp '.$conf['rootpath'].'/conf/rspamd_mx_check.conf.master /etc/rspamd/local.d/mx_check.conf');
263264
}
264265

266+
if(file_exists($conf['rootpath'].'/conf-custom/rspamd_redis.conf.master')) {
267+
exec('cp '.$conf['rootpath'].'/conf-custom/rspamd_redis.conf.master /etc/rspamd/local.d/redis.conf');
268+
} else {
269+
exec('cp '.$conf['rootpath'].'/conf/rspamd_redis.conf.master /etc/rspamd/local.d/redis.conf');
270+
}
271+
272+
if(file_exists($conf['rootpath'].'/conf-custom/rspamd_milter_headers.conf.master')) {
273+
exec('cp '.$conf['rootpath'].'/conf-custom/rspamd_milter_headers.conf.master /etc/rspamd/local.d/milter_headers.conf');
274+
} else {
275+
exec('cp '.$conf['rootpath'].'/conf/rspamd_milter_headers.conf.master /etc/rspamd/local.d/milter_headers.conf');
276+
}
277+
278+
if(file_exists($conf['rootpath'].'/conf-custom/rspamd_options.inc.master')) {
279+
exec('cp '.$conf['rootpath'].'/conf-custom/rspamd_options.inc.master /etc/rspamd/local.d/options.inc');
280+
} else {
281+
exec('cp '.$conf['rootpath'].'/conf/rspamd_options.inc.master /etc/rspamd/local.d/options.inc');
282+
}
283+
265284
/*if(file_exists($conf['rootpath'].'/conf-custom/rspamd.local.lua.master')) {
266285
exec('cp '.$conf['rootpath'].'/conf-custom/rspamd.local.lua.master /etc/rspamd/rspamd.local.lua');
267286
} else {
@@ -304,9 +323,9 @@ function update($event_name, $data) {
304323
$app->services->restartServiceDelayed('rspamd', 'reload');
305324
}
306325

307-
exec("postconf -e 'mailbox_size_limit = ".intval($mail_config['mailbox_size_limit']*1024*1024)."'"); //TODO : no reload?
308-
exec("postconf -e 'message_size_limit = ".intval($mail_config['message_size_limit']*1024*1024)."'"); //TODO : no reload?
309-
326+
exec("postconf -e 'mailbox_size_limit = ".intval($mail_config['mailbox_size_limit']*1024*1024)."'");
327+
exec("postconf -e 'message_size_limit = ".intval($mail_config['message_size_limit']*1024*1024)."'");
328+
$app->services->restartServiceDelayed('postfix', 'reload');
310329
}
311330

312331
function server_ip($event_name, $data) {

0 commit comments

Comments
 (0)