1. Install graypold:

make install



2. Create tables:

2.1. PostgreSQL:

psql -U graylist -d graylist -f graypol.postgre.sql


2.2. MySQL:

mysql -ugraylist -p graylist < graypol.my.sql



3. Adjust main.cf:

3.1 If you want graylisting:

smtpd_recipient_restrictions =
	...
	check_policy_service unix:/var/run/graypold_graypol.sock


3.2. If you want mailcounting:

smtpd_end_of_data_restrictions =
	...
	check_policy_service unix:/var/run/graypold_mailcount.sock

Optionally, if you want to have all recipient addresses reported by the
mailcount module (the number of recipients gets always counted):

smtpd_recipient_restrictions =
	...
	# place "check_policy_service unix:/var/run/graypold_graypol.sock" here!
	check_policy_service unix:/var/run/graypold_mailcount.sock


3.3. If you want SASL authenticated users, who are sending mails, to unlock
graylisting in the opposite direction:

smtpd_recipient_restrictions =
	...
	check_policy_service unix:/var/run/graypold_sent.sock,
	permit_sasl_authenticated,
	...



4. Overwrite default settings (see /usr/local/lib/graypol.pl) in
   /usr/local/etc/graypol.conf



5. Create cronjobs:

* * * * * /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



6. Start graypold.pl, use either one of the supplied RC scripts or call
   /usr/local/sbin/graypol.pl directly



7. Restart postfix
