Nethence Documentation Lab Webmail Your IP BBDock  


Those documents are obsolete, please use the Nethence Documentation instead.

HomeUnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigsPrivate

Setting up milter-greylist on FreeBSD 8
 
Install the milter,
pkg_add -r milter-greylist
cd /usr/local/etc/mail/
cp greylist.conf.sample greylist.conf
chmod u+w greylist.conf
provide an easy symlink,
cd /etc/mail/
ln -s /usr/local/etc/mail/greylist.conf
 
Edit its configuration,
grep mailnull /etc/passwd
grep mailnull /etc/group
cd /etc/mail/
vi greylist.conf
like,
pidfile "/var/run/milter-greylist.pid"
socket "/var/milter-greylist/milter-greylist.sock"
dumpfile "/var/milter-greylist/greylist.db" 600
dumpfreq 1
user "mailnull:mailnull"

quiet
greylist 7m
dumpfreq 1d
autowhite 10d

list "my network" addr { 127.0.0.1/8 10.0.0.0/8 192.168.0.0/16 }

# This is a list of broken MTAs that break with greylisting. Derived from
# http://cvs.puremagic.com/viewcvs/greylisting/schema/whitelist_ip.txt?rev=1.16
list "broken mta" addr { \
...
}

# And here is the access list
racl whitelist list "my network"
racl whitelist list "broken mta"
racl greylist default
Ref. How to Setup milter-greylist Spam Blocking in Sendmail
 
Enable the milter at boot time and start it right away,
cd /etc/rc.d/
cp /usr/local/etc/rc.d/milter-greylist ./
cd ../
cat >> rc.conf <<EOF9
miltergreylist_enable="YES"
EOF9
rc.d/milter-greylist start
date
ls -lF /var/milter-greylist/
 
Setup the milter within Sendmail,
cd /etc/mail/
vi $HOSTNAME.mc
add,
dnl j,{if_addr},{cert_subject},i,{auth_authen} are already enabled by default
define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO``, {verify}'')
define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``, {greylist}'')
INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock, F=T, T=R:30s')
note. no "define confINPUT_MAIL_FILTER" is needed, as "INPUT_MAIL_FILTER" populates it already. (ref. cf/README or https://www.sendmail.com/sm/open_source/docs/m4/adding_mailfilters.html)
and apply,
make
make install
make restart
Refs.
package's DESCR
/usr/local/share/doc/milter-greylist/README
 

Last update: Jul 10, 2015