Hello everybody,
I modified Russel's package a bit, my version of pop3-record:
---- snip /usr/local/bin/pop3-record ----
#!/bin/sh
TCPDIR=/etc/tcprules.d
PATH=$PATH:/usr/local/bin/
# First see if $TCPREMOTEIP is handled by existing rules
tcprulescheck $TCPDIR/qmail-smtpd.cdb "$TCPREMOTEIP" | grep RELAYCLIENT > /dev/null && 
exit 0
echo "$TCPREMOTEIP"':allow,RELAYCLIENT=""' >> $TCPDIR/smtp.filter.newer
cat $TCPDIR/smtp.filter.* > $TCPDIR/qmail-smtpd
tcprules $TCPDIR/qmail-smtpd.cdb $TCPDIR/qmail-smtpd.tmp < $TCPDIR/qmail-smtpd
---- snap ----

- pop3-record will act in /etc/tcprules.d
- I have users from an internal network which I always trust so:
- before adding TCPREMOTEIP, pop3-record will check wether this is already a
  RELAYCLIENT for us.
- rules for internal users go to /etc/tcprules.d/smtp.filter.zintern:
 ---- snip /etc/tcprules.d/smtp.filter.zintern ----
 127.0.0.1:allow,RELAYCLIENT=""
 192.168.0.:allow,RELAYCLIENT=""
 :allow
 ---- snap ---- 
- I also wrote a small spec-file for rpm which will apply the patches, copy
  the scripts to the appropriate places and set up a cron-script for age-smtp.  

Any comments?

Mirko

Reply via email to