# pkg_add ..milter-greylist.x.x

# vi /etc/rc.local

if [ X“${milter_greylist}“ != X“NO“ -a \
-x /usr/local/libexec/milter-greylist ]; then
echo -n ‚ milter-greylist‘
/usr/local/libexec/milter-greylist ${milter_greylist}
fi

# vi /etc/mail/greylist.conf

socket „/var/db/milter-greylist/milter-greylist.sock“
dumpfile „/var/db/milter-greylist/greylist.db“
#acl whitelist default
acl greylist default

# cd /usr/share/sendmail/cf
# cp openbsd-proto.mc nospam.mc
# vi nospam.mc

INPUT_MAIL_FILTER(`greylist‘,
`S=local:/var/db/milter-greylist/milter-greylist.sock‘)
define(`confMILTER_MACROS_CONNECT‘, `j, {if_addr}‘)
define(`confMILTER_MACROS_HELO‘, `{verify}, {cert_subject}‘)
define(`confMILTER_MACROS_ENVFROM‘, `i, {auth_authen}‘)
define(`confMILTER_MACROS_ENVRCPT‘, `{greylist}‘)

# m4 ../m4/cf.m4 nospam.mc > sendmail.cf
# mv sendmail.cf /etc/mail/sendmail.cf
# kill -1 `head -n1 /var/run/sendmail.pid`