1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../qmail-scanner/no_magic.diff
5 # Copyright (C) 2005 - 2006 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- ./configure.orig 2005-12-10 01:53:05.000000000 -0300
18 +++ ./configure 2005-12-10 02:25:30.000000000 -0300
20 if test -x $dir/reformime
22 UNMIME_BINARY="${UNMIME_BINARY:-$dir/reformime}"
23 - DD=`reformime -s1.2 -xTEST- < ./contrib/reformime-test.eml`
24 - if [ "`grep hello TEST-hello.txt`" = "" ]; then
25 - echo "** FATAL ERROR ***"
27 - echo "$UNMIME_BINARY contains bugs. Please upgrade to a release"
28 - echo "that post-dates Mar 22 2002 (e.g. 1.3.8)"
30 - rm -f TEST-hello.txt
33 - rm -f TEST-hello.txt
35 if test -x $dir/maildrop
40 TNEF_BINARY="${TNEF_BINARY:-$dir/tnef}"
41 - #There's a LOCALE bug in uudecode - workaround...
42 - if [ "`$TNEF_BINARY --help 2>&1|grep number-backups`" = "" ]; then
46 -Old tnef binary found on your system!
48 -Please upgrade ASAP to a version supporting the "--number-backups" option.
55 if [ "$MIME_UNPACKER" = "ripmime" ]; then
56 if test -x $dir/ripmime
58 UNMIME_BINARY="${UNMIME_BINARY:-$dir/ripmime}"
59 - DD=`ripmime -i - < ./contrib/reformime-test.eml`
60 - if [ "`grep hello hello.txt`" = "" ]; then
61 - echo "** FATAL ERROR ***"
63 - echo "$UNMIME_BINARY contains bugs. Please upgrade to a newer release."
65 - rm -f hello.txt textfile*
68 - rm -f hello.txt textfile*
73 UNZIP_BINARY="${UNZIP_BINARY:-$dir/unzip}"
74 #Now check for password support
75 UNZIP_PASSWD="xx${RANDOM}$$xx"
76 - DD=`unzip -Ptest -t contrib/test_password.zip 2>&1|egrep 'testing:.*OK'`
77 - if [ "$DD" != "" ]; then
78 UNZIP_OPTIONS="-P$UNZIP_PASSWD"
82 - #Now check we can get filesizes out
83 - EE=`unzip -Ptest -lv contrib/test_password.zip 2>&1|egrep '80688.*test/ls'`
84 - if [ "$EE" = "" ]; then
85 - echo "**FATAL ERROR ***"
87 - echo "$UNZIP_BINARY doesn't support the \"-lv\" option to view file details"
89 - echo "Please upgrade to another version of unzip"
95 if test -x $dir/uvscan
97 if [ "`echo $FIND_SCANNERS|grep ' uvscan '`" != "" -a "$UVSCAN" = "" ]; then
98 - if [ "`$dir/uvscan -r --secure --fam --unzip --macro-heuristics -v $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then
99 UVSCAN="${UVSCAN:-$dir/uvscan}"
100 INSTALLED_SCANNERS="$INSTALLED_SCANNERS
107 if [ "`echo $FIND_SCANNERS|grep ' csav '`" != "" -a "$CSAV" = "" ]; then
108 - if [ "`$dir/csav -list -nomem -packed -archive -noboot $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then
109 CSAV="${CSAV:-$dir/csav}"
110 INSTALLED_SCANNERS="$INSTALLED_SCANNERS
115 if [ "`echo $FIND_SCANNERS|grep ' sophie '`" != "" -a "$SOPHIE" = "" ]; then
116 @@ -1097,28 +1044,17 @@
117 if [ "`echo $FIND_SCANNERS|grep ' clamdscan '`" != "" -a "$CLAMDSCAN" = "" ]; then
118 if test -x $dir/clamdscan
120 - DD="`$dir/clamdscan -v $TMP_DIR 2>&1`|egrep -i 'virus|test'"
121 - if [ "$DD" != "" ]; then
122 CLAMDSCAN="${CLAMDSCAN:-$dir/clamdscan}"
123 INSTALLED_SCANNERS="$INSTALLED_SCANNERS
127 -Something like clamdscan for ClamAV detected - but not correctly installed.
128 -Please read Q-S FAQ if you want it - especially check that clamd daemon
129 -can read files owned by $QS_USER (i.e. make it run as $QS_USER).
134 if test -x $dir/clamscan
136 if [ "`echo $FIND_SCANNERS|grep ' clamscan '`" != "" -a "$CLAMSCAN" = "" ]; then
137 - if [ "`$dir/clamscan -v $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then
138 CLAMSCAN="${CLAMSCAN:-$dir/clamscan}"
139 INSTALLED_SCANNERS="$INSTALLED_SCANNERS
144 if [ "`echo $FIND_SCANNERS|grep spamassassin`" != "" -a "$SPAMASSASSIN_BINARY" = "" ]; then
145 @@ -1129,126 +1065,21 @@
147 if [ "$SPAMASSASSIN_BINARY" != "" -a -x "$dir/spamc" -a "$SPAMC_BINARY" = "" ]
150 - if [ "`$dir/spamc -h 2>&1|grep 'spamd'`" != "" ] ;then
151 SPAMC_BINARY="${SPAMC_BINARY:-$dir/spamc}"
153 - # st: is spamd running with sql per user settings?
154 - SA_SQL_AUT=`ps ax -w 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep`
155 - if [ "$SA_SQL_AUT" = "" ]; then
156 - SA_SQL_AUT=`ps -ef 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep`
158 - if [ "$SA_SQL_AUT" = "" ]; then
159 - SA_SQL_AUT=`ps aux 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep`
162 # st: are we using spamd in unix-socket mode?
163 if [ "$SPAMD_SOCKET" != "" ] ;then
164 - if [ ! -S "$SPAMD_SOCKET" ] ;then
167 - Spamd socket not found in $SPAMD_SOCKET
169 - Are you really using spamd daemon with the '--socketpath' option?
170 - Check it or allow the configure script to look for
171 - it, just omiting the configure option --sa-socket ...
176 #SPAMC_BINARY="$SPAMC_BINARY -U $SPAMD_SOCKET"
177 SA_SKT=" -U $SPAMD_SOCKET"
180 - #Test to see if spamc is calling Unix sockets instead of TCP
181 - SPAMD_SOCKET=`ps -ef 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'`
182 - if [ "$SPAMD_SOCKET" = "" ]; then
183 - SPAMD_SOCKET=`ps aux 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'`
186 - # st: in my RH7.3 servers this works...
187 - if [ "$SPAMD_SOCKET" = "" ]; then
188 - SPAMD_SOCKET=`ps ax -w 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'`
191 - if [ "$SPAMD_SOCKET" != "" ]; then
192 - if [ -S "$SPAMD_SOCKET" ]; then
193 - #SPAMC_BINARY="$SPAMC_BINARY -U $SPAMD_SOCKET"
194 - SA_SKT=" -U $SPAMD_SOCKET"
198 - Oops... Spamd socket not found in $SPAMD_SOCKET
200 - It seems that you're running spamd in unix-socket mode, but the
201 - configure script couldn't find the socket properly.
202 - Try to set it manually using the configure option --sa-socket ...
211 - DD="`$SPAMC_BINARY $SA_SKT < ./contrib/spamc-nice.eml`"
212 - if [ "`echo $DD|grep '^From '`" != "" ]; then
215 -SpamAssassin's spamd daemon is incorrectly installed. You need to run it as:
224 - DD="`$SPAMC_BINARY $SA_HN $SA_SKT < ./contrib/spamc-nice.eml`"
225 - if [ "$?" != "0" -o "`echo $DD|grep 'X-Spam-Status: No'`" = "" ]; then
227 -Something like spamc for SpamAssassin detected - but not correctly installed
228 -(didn't include a \"X-Spam-Status\" line in output).
229 -Please read Q-S FAQ if you want it - especially check that spamd daemon
230 -is running. Ignoring...
234 - DD="`$SPAMC_BINARY $SA_HN $SA_SKT < ./contrib/spamc-nasty.eml`"
235 - if [ "$?" != "0" -o "`echo $DD|grep 'X-Spam-Status: Yes'`" = "" ]; then
237 -Something like spamc for SpamAssassin detected - but not correctly installed
238 -(didn't include a \"X-Spam-Status: Yes\" line in output) - ignoring...
242 - DD="`$SPAMC_BINARY $SA_HN $SA_SKT -c < ./contrib/spamc-nasty.eml`"
243 - if [ "`echo $DD|tail -n 1|grep /`" != "" ]; then
244 - SPAMASSASSIN_VERSION="fast_spamassassin"
245 - SA_THRESHOLD=`echo $DD|tail -n 1|sed -e 's/\(.*\)\/\(.*\)/\2/'`
249 - if [ "$SPAMC_BINARY" != "" ]; then
250 if [ "`echo $FIND_SCANNERS|grep ' fast_spamassassin'`" != "" ]; then
251 - if [ "$SPAMASSASSIN_VERSION" != "fast_spamassassin" ]; then
253 -Fatal: You have asked for the "fast" v2.1 SpamAssassin support, however
254 -your system is NOT correctly configured for it.
256 -Either upgrade and try again, or reconfigure for the older "verbose"
257 -SpamAssassin support.
262 + SPAMASSASSIN_VERSION="fast_spamassassin"
263 #SPAMC_OPTIONS="$SA_HN -c "
265 INSTALLED_SCANNERS="$INSTALLED_SCANNERS
267 - #See if they want fast_spamassassin to alter the
268 - #Subject: line too...
269 - SPAMC_SUBJECT="`echo $FIND_SCANNERS|grep ' fast_spamassassin='|sed -e 's/^.*fast_spamassassin=//g' -e 's/ .*$//g'`"
270 if [ "$SPAMC_SUBJECT" = "" ]; then SPAMC_SUBJECT=$SA_SUBJECT ; fi
272 SPAMASSASSIN_VERSION="verbose_spamassassin"
273 @@ -1259,10 +1090,6 @@
274 INSTALLED_SCANNERS="$INSTALLED_SCANNERS
275 verbose_spamassassin"