Simpler postfix + dspam
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:
1 | # really postfix |
On postfix‘s main.cf
side:
1 | # don't overwhelm dspam, only one message at a time |
Warning, I used regexp:
instead of pcre:
because that’s what NetBSD base’s postfix
supports.
The dspam_filter_access
pipes the message to dspam
‘s socket by matching everything:
1 | $ cat /etc/postfix/dspam_filter_access |
The only remaining piece is to declare the dspam
service in postfix
‘s master.cf
file:
1 | 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 :)
1 | mailbox_command = /usr/pkg/bin/procmail |
Sources: