Page 1 of 1

Integrate Postfix-Policyd

Posted: 10 Mar 2016 10:51
by rhyse
Hi
It would be good to integrate Postfix-Policyd (http://wiki.policyd.org) into the system.

In particular the quota portion (the one I really need) as the other features largely seem to overlap with current functionality

Thanks

Re: Integrate Postfix-Policyd

Posted: 10 Mar 2016 11:42
by rhyse
Sorry another option may be postfwd (http://postfwd.org/)

Re: Integrate Postfix-Policyd

Posted: 11 Mar 2016 08:40
by rhyse
Hi

I got basic integration of postfwd working with the following

perl -MCPAN -e shell
install Net::Server::Daemonize
install Net::Server::PreFork
install Storable
install Net::Server::Multiplex
install Time::HiRes
#install Net::DNS

/usr/bin/wget -O /usr/bin/postfwd http://postfwd.org/postfwd2-1.35

chmod +x /usr/bin/postfwd

cat > /etc/postfwd.cf <<EOF
id=RULE001; sender_domain=domain.local; action=rate(sender/60/300/450 4.7.1 only 60 messages per 5 mins)
EOF

groupadd postfwd
useradd -g postfwd -d /var/empty -s /bin/false -c "postfwd daemon user" postfwd
passwd -l postfwd

postfwd --daemon -f /etc/postfwd.cf -u postfwd -g postfwd -p 10045 -R --pidfile /var/run/postfwd.pid -n --nodns -v


edit /etc/postfix/main.cf to include the postfwd integration line
smtpd_recipient_restrictions = permit_mynetworks, # recommended
check_policy_service inet:127.0.0.1:10045, # **postfwd integration**


Thanks

Re: Integrate Postfix-Policyd

Posted: 12 Mar 2016 14:59
by shawniverson