fix init script and example-cfg2.txt
This commit is contained in:
		
							parent
							
								
									d07b4c2eab
								
							
						
					
					
						commit
						4d664293de
					
				
					 3 changed files with 20 additions and 16 deletions
				
			
		
							
								
								
									
										5
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,6 +1,11 @@
 | 
			
		|||
postfwd (1.10pre7c-3) unstable; urgency=low
 | 
			
		||||
 | 
			
		||||
  * implement machine-interpretable copyright file
 | 
			
		||||
  * fix init script
 | 
			
		||||
    - let daemon write pid file for his own
 | 
			
		||||
    - point start-stop daemon to pidfile when stoping
 | 
			
		||||
    - fix reload by fixing the way how to get the pid
 | 
			
		||||
  * fix example-cfg2.txt to work with 1.10pre7
 | 
			
		||||
 | 
			
		||||
 -- Jan Wagner <waja@cyconet.org>  Sun, 20 Jul 2008 13:27:42 +0200
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										22
									
								
								debian/example-cfg2.txt
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								debian/example-cfg2.txt
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
# check for more recent versions!
 | 
			
		||||
 | 
			
		||||
###
 | 
			
		||||
### Example config for postfwd 1.10pre8+
 | 
			
		||||
### Example config for postfwd 1.10pre7+
 | 
			
		||||
###
 | 
			
		||||
 | 
			
		||||
## Check DNS whitelists, maybe we don't need more checks
 | 
			
		||||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ id=REJECT_HELO_NODNS; \
 | 
			
		|||
 | 
			
		||||
id=REJECT_RBL_ZEN; \
 | 
			
		||||
  rbl=zen.spamhaus.org; \
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - DNSBL [$$dnsbltext]
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - zen.spamhaus.org RBL
 | 
			
		||||
 | 
			
		||||
## Check other DNSBLs in parallel
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -50,11 +50,11 @@ id=REJECT_RBL_ZEN; \
 | 
			
		|||
 | 
			
		||||
id=EVAL_DNSBLS; \
 | 
			
		||||
  &&DNSBLS; rblcount=all; \
 | 
			
		||||
  action=set(HIT_rbls=$$rblcount,HIT_dtxt=$$dnsbltext)
 | 
			
		||||
  action=set(HIT_rbls=$$rblcount)
 | 
			
		||||
 | 
			
		||||
id=REJECT_RBL_MULTI; \
 | 
			
		||||
  HIT_rbls>=2; \
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - Multiple DNSBLs [$$HIT_dtxt]
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - Multiple DNSBLs
 | 
			
		||||
 | 
			
		||||
## Check RHSBLs if there wasn't enough DNSBLs hit
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -73,33 +73,33 @@ id=REJECT_RBL_MULTI; \
 | 
			
		|||
 | 
			
		||||
id=EVAL_RHSBLS; \
 | 
			
		||||
  &&RHSBLS_REVERSE; &&RHSBLS_SENDER; rhsblcount=all; \
 | 
			
		||||
  action=set(HIT_rhsbls=$$rhsblcount,HIT_rtxt=$$dnsbltext)
 | 
			
		||||
  action=set(HIT_rhsbls=$$rhsblcount)
 | 
			
		||||
 | 
			
		||||
id=REJECT_RHSBL_MULTI; \
 | 
			
		||||
  HIT_rhsbls>=2; \
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - Multiple RHSBLs [$$HIT_rtxt]
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - Multiple RHSBLs
 | 
			
		||||
 | 
			
		||||
## See if we get any combined hits from rules before
 | 
			
		||||
 | 
			
		||||
id=REJECT_RBL_RHSBL; \
 | 
			
		||||
  HIT_rbls>=1; HIT_rhsbls>=1; \
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - RHSBL and DNSBL [$$HIT_rtxt] [$$HIT_dtxt]
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - RHSBL and DNSBL
 | 
			
		||||
 | 
			
		||||
id=REJECT_RBL_HELO; \
 | 
			
		||||
  HIT_rbls>=1; HIT_helo==1; \
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - DNSBL [$$HIT_dtxt] and suspicious HELO [$$helo_name]
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - DNSBL and suspicious HELO [$$helo_name]
 | 
			
		||||
 | 
			
		||||
id=REJECT_RBL_NODNS; \
 | 
			
		||||
  HIT_rbls>=1; HIT_nodns==1; \
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - DNSBL [$$HIT_dtxt] and missing reverse DNS [$$client_address]
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - DNSBL and missing reverse DNS [$$client_address]
 | 
			
		||||
 | 
			
		||||
id=REJECT_RHSBL_HELO; \
 | 
			
		||||
  HIT_rhsbls>=1; HIT_helo==1; \
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - RHSBL [$$HIT_rtxt] and suspicious HELO [$$helo_name]
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - RHSBL and suspicious HELO [$$helo_name]
 | 
			
		||||
 | 
			
		||||
id=REJECT_RHSBL_NODNS; \
 | 
			
		||||
  HIT_rhsbls>=1; HIT_nodns==1; \
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - RHSBL [$$HIT_rtxt] and missing reverse DNS [$$client_address]
 | 
			
		||||
  action=REJECT Blocked - contact postmaster@example.net for help - RHSBL and missing reverse DNS [$$client_address]
 | 
			
		||||
 | 
			
		||||
## Finally greylist all lesser hits.
 | 
			
		||||
##
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										9
									
								
								debian/init.d
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								debian/init.d
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -19,6 +19,7 @@
 | 
			
		|||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
 | 
			
		||||
NAME=postfwd
 | 
			
		||||
DAEMON=/usr/sbin/${NAME}
 | 
			
		||||
PIDFILE=/var/run/$NAME.pid
 | 
			
		||||
DESC=postfwd
 | 
			
		||||
 | 
			
		||||
test -x $DAEMON || exit 0
 | 
			
		||||
| 
						 | 
				
			
			@ -70,19 +71,17 @@ case "$1" in
 | 
			
		|||
	echo -n "Starting $DESC: "
 | 
			
		||||
        start-stop-daemon --start --quiet \
 | 
			
		||||
                --name ${RUNAS} \
 | 
			
		||||
                --exec $DAEMON -- ${ARGS} --daemon --file=${CONF} --interface=${INET} --port=${PORT} --user=${RUNAS} --group=${RUNAS}
 | 
			
		||||
                --exec $DAEMON -- ${ARGS} --daemon --file=${CONF} --interface=${INET} --port=${PORT} --user=${RUNAS} --group=${RUNAS} --pidfile=$PIDFILE
 | 
			
		||||
	echo "$NAME."
 | 
			
		||||
	;;
 | 
			
		||||
  stop)
 | 
			
		||||
	echo -n "Stopping $DESC: "
 | 
			
		||||
        start-stop-daemon --stop --quiet --oknodo \
 | 
			
		||||
                --exec $DAEMON
 | 
			
		||||
	start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE && rm -rf $PIDFILE
 | 
			
		||||
        echo "$NAME."
 | 
			
		||||
        rm -f /var/run/$NAME.pid
 | 
			
		||||
	;;
 | 
			
		||||
  reload)
 | 
			
		||||
	echo "Reloading $DESC configuration files."
 | 
			
		||||
		for pid in `pidof ${NAME}`; do kill -HUP ${pid}; done ;
 | 
			
		||||
		kill -HUP $(cat $PIDFILE)
 | 
			
		||||
	;;
 | 
			
		||||
  restart|force-reload)
 | 
			
		||||
	echo -n "Restarting $DESC (incl. cache): "
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue