-
-
Notifications
You must be signed in to change notification settings - Fork 3
greylist.3
greylist - query qmail-greyd for greylisted records
#include <tlsacheck.h>
int greylist(char *ip, char *client_ip, char *from, char *tolist, int len, void (*timeoutfn)(), void (*errfn)());
greylist() connects to qmail-greyd(8) - greylisting daemon to query, on the IP address ip, to query greylisting records for emails from IP address client_ip. It uses the triplets of IP address / sender / recepient sender. It uses UDP to send the triplet and expects a two byte response. Clients like qmail-smtpd(8) can use this function to enforce greylisting protocol. The default port to which greylist() connects is 1999. IP address can also be of the form ip@port, to specify an alternate port.
The arguments timeoutfn should be a user defined function to handle timeouts. The default timeout is 10 seconds, but can be changed by setting the GREYTIMEOUT environment variable.
greylist returns 1 if the sender triplet records have been greylisted / whitelisted, 0 if greylisting verification fails