1, wget http://software.virtualmin.com/gpl/centos/5/SRPMS/fedora-usermgmt-0.9-1.el5.src.rpm and build the source rpm
rpm -ivh /usr/src/redhat/RPMS/noarch/fedora-usermgmt-0.9-1.noarch.rpm /usr/src/redhat/RPMS/noarch/fedora-usermgmt-core-0.9-1.noarch.rpm /usr/src/redhat/RPMS/noarch/fedora-usermgmt-default-fedora-setup-0.9-1.noarch.rpm /usr/src/redhat/RPMS/noarch/fedora-usermgmt-shadow-utils-0.9-1.noarch.rpm /usr/src/redhat/RPMS/noarch/fedora-usermgmt-devel-0.9-1.noarch.rpm
2, yum -y install sendmail-devel geoip-* –enablerepo dag
3, wget ftp://ftp.muug.mb.ca/mirror/fedora/linux/development/rawhide/source/SRPMS/milter-greylist-4.2.4-1400.fc14.src.rpm
4, rpm -ivh milter-greylist-4.2.3-1400.fc14.src.rpm –nomd5
vim /usr/src/redhat/SPECS/milter-greylist.spec
define the following variable
%global username smmsp
%global vardir %_var/%name
%global dbdir %vardir
%global rundir %_var/%name
%global __chkconfig /sbin/chkconfig
delete
Requires: init(%name)
delete
–enable-dnsrbl \
delete the following (we want /var/milter-greylist/ path)
for i in `find -type f`; do
sed -e ‘s!/var/milter-greylist/milter-greylist.sock!%rundir/milter-greylist.sock!g;
s!/var/milter-greylist/greylist.db!%dbdir/greylist.db!g;
s!/var/milter-greylist/milter-greylist.pid!%_var/run/milter-greylist.pid!g;
‘ "$i" >"$i.tmp"
cmp -s "$i" "$i.tmp" || cat "$i.tmp" >"$i"
rm -f "$i".tmp
done
change this line
touch $RPM_BUILD_ROOT%_var/run/milter-greylist.pid
to
touch $RPM_BUILD_ROOT%rundir/milter-greylist.pid
change this line
touch $RPM_BUILD_ROOT%_var/run/milter-greylist.sock
to
touch $RPM_BUILD_ROOT%rundir/milter-greylist.sock
change this line
%ghost %_var/run/milter-greylist.pid
to
%ghost %rundir/run/milter-greylist.pid
%ghost %rundir/milter-greylist.sock
%dir /usr/src/debug/%name-4.2.3/*
/usr/lib/debug/usr/sbin/%name.debug
%dir %vardir/%name.sock
%vardir/%name.pid
rpmbuild -ba /usr/src/redhat/SPECS/milter-greylist.spec
rpm -Uvh /usr/src/redhat/RPMS/noarch/milter-greylist-4.2.3-1400.noarch.rpm
edit /etc/mail/greylist.conf, adding the following
geoipdb "/usr/share/GeoIP/GeoIP.dat"
spamdsock inet "127.0.0.1:783"
dacl blacklist spamd > 7 msg "Your message is considered spam."
dacl greylist spamd > 6 delay 6h autowhite 3h msg "greylist in action (6) , please come back later. call 886-921361388 for help!"
dacl greylist spamd > 5 delay 1h autowhite 40h msg "greylist in action (5), please come back later. call 886-921361388 for help!"
dacl greylist spamd > 4 delay 30m autowhite 110h msg "greylist in action (4), please come back later. call 886-921361388 for help!"
dacl greylist spamd > 3 delay 10m autowhite 180h msg "greylist in action (3), please come back later. call 886-921361388 for help!"
racl whitelist default
racl greylist default delay 5m autowhite 7d msg "greylist in action (4), please come back later. call 886-921361388 for help!"
now spamassassin must be starting
edit /etc/sysconfig/spamassassin
chkconfig –level 35 spamassassin on
service spamassassin start
service milter-greylist restart