Greylisting of suspicious sources - the server
grossd [-dCDhnrV] [-f config] [{-p|-P} pidfile]
grossd is a greylisting server, and more. It's blazingly fast and amazingly resource efficient. It can be configured to query DNSBL databases, and enforce greylisting only for hosts that are found on those databases. It can block hosts that match multiple databases. It can be replicated and run parallel on two servers. It supports Sun Java System Messaging Server, Postfix and Exim. Sendmail Milter implementation needs testing.
Gross consists of grossd, the greylisting daemon, and a client library for \s-1SJSMS\s+1. The server also implements Postfix content filtering protocol.
Upon receiving a request from a client, grossd first validates it. The request includes a triplet (`smtp-client-ip', `sender-address', `recipient-address'). A hash is then calculated and matched against the Bloom filters. If a match is found, and test result does not exceed block_threshold value, grossd sends an \s-1OK\s+1 (\s-1STATUS_TRUST\s+1) message.
If the triplet is not in the Bloom filters (has not been seen recently,) grossd then runs configured checks against the client information. Based on check results grossd returns the client a result. Possible results are \s-1STATUS_TRUST\s+1, \s-1STATUS_BLOCK\s+1 and \s-1STATUS_GREY\s+1. The final response is query protocol specific.
The Bloom filters are updated according the update configuration option. A Bloom filter is a very efficient way to store data. It's a probabilistic data structure, which means that there is a possibility of error when querying the database. False positives are possible, but false negatives are not. This means that there is a possibility that grossd will falsely give an \s-1STATUS_TRUST\s+1 response when a connection should be greylisted. By sizing the bloom filters, you can control the error possibility to meet your needs. The right bloom filter size depends on the number of entries in the database, that is, the retention time versus the number of handled connections.
Create the statefile and exit. The statefile configuration option must be specified in the configuration file.
Make debugging output more verbose. It can be set twice for maximum verbosity.
Run grossd on foreground without daemonizing the process. grossd will output to terminal instead of using syslog.
Specifies the name of the configuration file. The default is /etc/etc/grossd.conf
Output short usage information and exit.
Enable dry-run.
Bail out if the pidfile already exists. Create pidfile after the check.
Create the pidfile. Overwrite if it already exists.
Disable replication.
Output version information and exit.
/etc/grossd.conf
Run grossd under some unprivileged user id. If started as root grossd will setuid() itself to nobody's user id. There are no known security flaws but you must not expose grossd to the Internet. It could be used for a DoS against a domain's \s-1DNS\s+1 servers by an attacker as there is no authentication in grossd.
grossd daemon exits 0 if success, and >0 if an error occurs.
Regarding the configuration both the daemon and \s-1MTA\s+1's, refer to grossd.conf\|(5)
Gross project site: <http://code.google.com/p/gross/>
Bloom filters: <http://en.wikipedia.org/wiki/Bloom_filter>
\s-1DNS\s+1 queries are done asynchronously using c-ares library <http://daniel.haxx.se/projects/c-ares/>.
Eino Tuominen and Antti Siira