You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							58 lines
						
					
					
						
							1.9 KiB
						
					
					
				
			
		
		
	
	
							58 lines
						
					
					
						
							1.9 KiB
						
					
					
				#!/bin/sh | 
						|
# --- T2-COPYRIGHT-NOTE-BEGIN --- | 
						|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. | 
						|
#  | 
						|
# T2 SDE: package/.../qmail-scanner/qmail-scanner.conf | 
						|
# Copyright (C) 2005 - 2006 The T2 SDE Project | 
						|
#  | 
						|
# More information can be found in the files COPYING and README. | 
						|
#  | 
						|
# This program is free software; you can redistribute it and/or modify | 
						|
# it under the terms of the GNU General Public License as published by | 
						|
# the Free Software Foundation; version 2 of the License. A copy of the | 
						|
# GNU General Public License can be found in the file COPYING. | 
						|
# --- T2-COPYRIGHT-NOTE-END --- | 
						|
 | 
						|
# remove not applying part of the patch | 
						|
tmppatch=`mktemp` | 
						|
 | 
						|
bzcat $(match_source_file -p 'st.*patch') | | 
						|
	sed -e '/^--- .*qmail-scanner-queue.template.orig/,/^--- / {/^--- .*qmail-scanner-queue.template.orig/d;/^--- /b' \ | 
						|
	    -e 'd;}' > $tmppatch | 
						|
var_append patchfiles ' ' $tmppatch | 
						|
var_append patchfiles ' ' $confdir/head-1-postst.diff | 
						|
hook_add preconf 5 'rm -vf qmail-scanner-queue.template.orig' | 
						|
 | 
						|
var_append patchfiles ' ' $confdir/no_magic.diff | 
						|
 | 
						|
confopt='--batch' | 
						|
var_append confopt ' ' '--log-details yes' | 
						|
var_append confopt ' ' '--debug yes' | 
						|
var_append confopt ' ' '--virus-to-delete yes' | 
						|
 | 
						|
scanners= | 
						|
pkginstalled clamav && | 
						|
	var_append scanners ',' clamdscan | 
						|
pkginstalled spamassassin && | 
						|
	var_append scanners ',' fast_spamassassin | 
						|
 | 
						|
var_append confopt ' ' '--scanners ${scanners:-auto}' | 
						|
 | 
						|
notify=admin | 
						|
var_append confopt ' ' '--notify $notify' | 
						|
 | 
						|
qscan_main() { | 
						|
	# configure | 
						|
	eval "./configure $confopt" | 
						|
 | 
						|
	# install | 
						|
	qscandir=$root/var/spool/qmailscan | 
						|
	mkdir -pv $qscandir/{quarantine,working,archive}/{new,tmp,cur} | 
						|
	cp -vf quarantine-attachments.txt $qscandir | 
						|
	chown -R qscand:qscand $qscandir | 
						|
 | 
						|
	cp qmail-scanner-queue.pl $root/var/qmail/bin/qmail-scanner-queue.pl | 
						|
	chown qscand:qscand $root/var/qmail/bin/qmail-scanner-queue.pl | 
						|
	chmod 4755  $root/var/qmail/bin/qmail-scanner-queue.pl | 
						|
} | 
						|
custmain=qscan_main
 | 
						|
 |