+ -

What is it?

greyd is a lightweight greylisting & blacklisting daemon. It runs on your gateway and pretends to be a real mail server. It keeps track of all hosts who connect, and automatically whitelists hosts after a period.

greyd is written in C, and endeavours to be portable (ie POSIX compliant).

greyd consists of four programs:

  • greyd - the main spam deferral daemon.
  • greylogd - connection tracking & whitelist updating.
  • greydb - greylisting/greytrapping database management.
  • greyd-setup - blacklist & whitelist population.

Which systems are supported?

greyd runs on GNU/Linux, OpenBSD, NetBSD, FreeBSD & DragonFly BSD.

greyd closely integrates with the firewall, and provides an abstract interface to theoretically support any appropriate firewall system (Netfilter & PF are currenly supported).

One of the goals of the greyd project is to support a wide variety of systems, firewalls and databases.


greyd closely follows the design of the excellent spamd from the OpenBSD project, and thus, implements all features of spamd. greyd is also able to seemlessly sync with spamd.


Blacklists may also be loaded into greyd (via greyd-setup). If greyd finds that a host is on one or more blacklists, it will reply very slowly in order to waste as much spammer time as possible.


greyd provides multiple ways to trap spammers (aka greytrapping):

  • if the spammer sends mail to a designated spamtrap address (setup via greydb)
  • if the spammer sends mail to a non-existant address
  • if the spammer sends mail to a designated backup MX out of order
  • if the spammer spoofs a from address, and SPF validation fails accordingly

Trapped hosts are treated in the same fashion as blacklisted hosts.