Howto install and configure OpenBSD spamd

last updated in Categories Networking, OpenBSD, Security, Tips, Tuning

OpenBSD’s spamd is a SPAM deferral daemon which rejects false mail in a very efficient way. spamd is a fake MTA or mail daemon which rejects false mail. It is designed to be very efficient so that it does not slow down the receiving machine.


For large email server I put spamd infront of Postfix. If you are just using a Postfix MTA try these tips to avoid spam.

From the article:

We all know about the rampant spam email problem. Nearly all of the potential solutions offered for it are based on the idea of the mail server receiving messages, classifying them as either spam or legitimate, and then processing further (deleting or forwarding messages) as appropriate. The problem with this strategy is that you end up using extra resources on the mail server. Here’s a way to get the same result while minimizing resource usage by preventing the spam from reaching the mail server.
The order of things is as follows:
1. Decide on a physical hookup and IP addressing scheme.
2. Get spamd configured and running.
3. Tell OpenBSD to send any TCP 25 traffic to spamd for evaluation (yes, that is a required step). But we also must tell OpenBSD to forward email from “good” senders to our real email server. PF rules (OpenBSD’s version of iptables) take care of that.
4. Test, test, test!

Installing and configuring spamd


Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

1 comment

  1. If you use Linux, then greyd provides all of the feature of spamd. Check it out at (shameless plug from author)

    Have a question? Post it on our forum!