Mercurial > hgrepos > hgweb.cgi > imapext
diff APOPtools/pop3-age @ 4:d741b3ecc917 draft
imapext-2007f
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 30 Oct 2014 00:03:05 +0900 |
parents | 28a55bc1110c |
children |
line wrap: on
line diff
--- a/APOPtools/pop3-age Thu Oct 30 00:00:57 2014 +0900 +++ b/APOPtools/pop3-age Thu Oct 30 00:03:05 2014 +0900 @@ -1,62 +1,1 @@ -#!/bin/sh - -# A sample "POP before SMTP"-enabler script for tcp_wrappers -# This script should be installed in /usr/local/etc -# If you are thinking of using this script on heavily loaded host, -# you had better to choose tcpserver instead of tcp_wrappers. -# -ALLOWTMP="/var/log/ATMP" -if [ -f /usr/local/etc/hosts.allow ]; then - ALLOW="/usr/local/etc/hosts.allow" -else - ALLOW=/etc/hosts.allow -fi -ALLOWSRC=${ALLOW}.src -ALLOWNEW=${ALLOW}.new - -# for debug -# (env;echo "1=$1") | Mail -s pop3access yuuji - -case $0 in - *record) - echo "tcp-env : $RELAYCLIENT : setenv = RELAYCLIENT" >> $ALLOWTMP.1 - ;; - *age) - rm -f $ALLOWTMP.2 - [ -f $ALLOWTMP.1 ] && mv -f $ALLOWTMP.1 $ALLOWTMP.2 - ;; - *) - # else generate master hosts.allow file - ;; -esac -touch $ALLOWTMP.1 $ALLOWTMP.2 -echo "# -# DO NOT EDIT THIS FILE! -# This file is generated from $ALLOWSRC file. -# Edit it! -#" > $ALLOWNEW -(cat $ALLOWTMP.[12] | sort -u; cat $ALLOWSRC) >> $ALLOWNEW -/bin/mv -f $ALLOWNEW $ALLOW - -# pop3-{age,update,record} for tcp_wrappers ends here -# The following section is the sample routine for tcpserver(ucsp-tcp) -# If you use tcpserver, replace the above section after "case $0...esac" -# by the following section. -# Sample code was contributed by pirozeau(pirozeau@banana-fish.com). - -#TCPREMOTEIP=${TCPREMOTEIP:-undefined} -#RELAYCLIENT=${RELAYCLIENT:-$TCPREMOTEIP} -#ALLOW=/usr/local/etc/smtprule -#case $0 in -# *record) -# echo "$RELAYCLIENT:allow,RELAYCLIENT=\"\"" >> $ALLOWTMP.1 -# ;; -# *age) -# rm -f $ALLOWTMP.2 -# [ -f $ALLOWTMP.1 ] && mv -f $ALLOWTMP.1 $ALLOWTMP.2 -# ;; -# *) -# # else generate master tcprule file -# ;; -#esac -#touch $ALLOWTMP.1 $ALLOWTMP.2 -#(cat $ALLOWTMP.[12] | sort -u; cat ${ALLOW}) | /usr/local/bin/tcprules ${ALLOW}.cdb ${ALLOW}.tmp +pop3-record \ No newline at end of file