* Sophie Loe <
1sophiel...@gmail.com> 2017.12.01 16:10:
> Is there an idiot's guide for configuring this as a postfix milter and
> getting this to work? I've not managed to get much working - as in postfix
> sends to rpsamd. Rspamd scans but nothing else. I managed a X-Spam=yes
> header on some random emails, but I have no idea how this happened.
Most values can be set using the local.d directory. For instance if you look at modules.d/milter_headers.conf you will find includes like this:
[...]
.include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/milter_headers.conf"
You can put modified settings in a file there and they will be merged with the default config. The snippet below adds a header to scanned mails including your hostname:
# cat /etc/rspamd/local.d/milter_headers.conf
use = ["x-rspamd-server"];
routines {
x-rspamd-server {
header = "X-Rspamd-Server";
remove = 1;
}
}
https://rspamd.com/doc/quickstart.html#configuring-rspamd
https://rspamd.com/doc/workers/rspamd_proxy.html
To define your custom spam flag, which is added when a mail is classified as spam you could use this configuration on the worker-proxy:
# cat /etc/rspamd/local.d/worker-proxy.inc
bind_socket = "
127.0.0.1:11332";
milter = yes; # Enable milter mode
timeout = 120s; # Needed for Milter usually
spam_header = "X-Spam-Flag-Your-Custom-Name";
upstream "local" {
default = yes; # Self-scan upstreams are always default
self_scan = yes; # Enable self-scan
}
https://rspamd.com/doc/modules/milter_headers.html
There are more options to add scores similar to what SA did in your old setup in the link above.
Regards
Thomas