dbtype = Mysql dbhost = localhost dbuser = grayuser dbpass = foobar rrdfile_graylist = /var/lib/gray.rrd picpath = /home/www/pages/graystats
sqlite3 /var/db/graylist/graylist.sqlite < sqlite.graylist.sql sqlite3 /var/db/graylist/mailcount.sqlite < sqlite.mailcount.sql sqlite3 /var/db/graylist/spf.sqlite < sqlite.spf.sql chown -Rv graylist /var/db/graylist
smtpd_recipient_restrictions = ... check_policy_service unix:/var/run/graypold_graylist.sock
smtpd_end_of_data_restrictions = ... check_policy_service unix:/var/run/graypold_mailcount.sockOptionally, if you want to have all recipient addresses reported by the mailcount module (the number of recipients gets always counted):
smtpd_recipient_restrictions = ... check_policy_service unix:/var/run/graypold_mailcount.sock, permit_sasl_authenticated, ...
smtpd_recipient_restrictions = ... check_policy_service unix:/var/run/graypold_sent.sock, permit_sasl_authenticated, ...
smtpd_helo_restrictions = ... check_policy_service unix:/var/run/graypold_spf_helo.sock, ...
smtpd_sender_restrictions = ... check_policy_service unix:/var/run/graypold_spf.sock, ...
* * * * * /usr/local/libexec/graycron.pl permit */5 * * * * /usr/local/libexec/graycron.pl graph 0 * * * * /usr/local/libexec/graycron.pl clean 0 0 * * * /usr/local/libexec/graycron.pl scrub
INSERT INTO graylist (hostname, ip, username, sender, recipient, count, instance, ts_entry, ts_latest, ts_ok) VALUES ('', '::', '', 'sender@domain.tld', 'recipient@domain.tld', 0, '', now(), now(), now());
INSERT INTO graylist (hostname, ip, username, sender, recipient, count, instance, ts_entry, ts_latest, ts_ok) VALUES ('', '::', '', '', 'recipient@domain.tld', 0, '', now(), now(), now());
delaypol unix - n n - - spawn user=nobody argv=/usr/local/libexec/delaypol.pl
smtpd_helo_restrictions = check_policy_service unix:private/delaypol smtpd_sender_restrictions = check_policy_service unix:private/delaypol smtpd_client_restrictions = check_policy_service unix:private/delaypol smtpd_recipient_restrictions = check_policy_service unix:private/delaypol smtpd_data_restrictions = check_policy_service unix:private/delaypol smtpd_end_of_data_restrictions = check_policy_service unix:private/delaypol
These two scripts are the predecessors of graypold. They are started by the postfix spawn tool: