I have read a shitload of overcomplicated setups to bring up a postfix / dspam SMTP + antispam server, and finally came to a much lighter and simpler configuration by basically reading documentation and real life examples.
Note this is suitable for a personnal and basic environment, no database, no virtual setup. Basic stuff.
The target system is NetBSD but this short doc should apply to pretty much any UNIX / Linux.
On dspam‘s side, I added the following parameters:
# really postfix
# don't overwhelm dspam, only one message at a time
Warning, I used
regexp: instead of
pcre: because that’s what NetBSD base’s
dspam_filter_access pipes the message to
dspam‘s socket by matching everything:
$ cat /etc/postfix/dspam_filter_access
The only remaining piece is to declare the
dspam service in
dspam unix - n n - 10 pipe
The final delivery method is up to you, but I chose
procmail, mostly because I have written my rules a while ago and am too lazy to adapt them to sieve :)
mailbox_command = /usr/pkg/bin/procmail