# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../qmail-scanner/no_magic.diff # Copyright (C) 2005 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- ./configure.orig 2005-12-10 01:53:05.000000000 -0300 +++ ./configure 2005-12-10 02:25:30.000000000 -0300 @@ -785,17 +785,6 @@ if test -x $dir/reformime then UNMIME_BINARY="${UNMIME_BINARY:-$dir/reformime}" - DD=`reformime -s1.2 -xTEST- < ./contrib/reformime-test.eml` - if [ "`grep hello TEST-hello.txt`" = "" ]; then - echo "** FATAL ERROR ***" - echo "" - echo "$UNMIME_BINARY contains bugs. Please upgrade to a release" - echo "that post-dates Mar 22 2002 (e.g. 1.3.8)" - echo "" - rm -f TEST-hello.txt - exit 1 - fi - rm -f TEST-hello.txt fi if test -x $dir/maildrop then @@ -806,34 +795,12 @@ if test -x $dir/tnef then TNEF_BINARY="${TNEF_BINARY:-$dir/tnef}" - #There's a LOCALE bug in uudecode - workaround... - if [ "`$TNEF_BINARY --help 2>&1|grep number-backups`" = "" ]; then - TNEF_BINARY="" - cat<<EOF - -Old tnef binary found on your system! - -Please upgrade ASAP to a version supporting the "--number-backups" option. - -EOF - exit 1 - fi fi fi if [ "$MIME_UNPACKER" = "ripmime" ]; then if test -x $dir/ripmime then UNMIME_BINARY="${UNMIME_BINARY:-$dir/ripmime}" - DD=`ripmime -i - < ./contrib/reformime-test.eml` - if [ "`grep hello hello.txt`" = "" ]; then - echo "** FATAL ERROR ***" - echo "" - echo "$UNMIME_BINARY contains bugs. Please upgrade to a newer release." - echo "" - rm -f hello.txt textfile* - exit 1 - fi - rm -f hello.txt textfile* fi fi if test -x $dir/unzip @@ -841,43 +808,23 @@ UNZIP_BINARY="${UNZIP_BINARY:-$dir/unzip}" #Now check for password support UNZIP_PASSWD="xx${RANDOM}$$xx" - DD=`unzip -Ptest -t contrib/test_password.zip 2>&1|egrep 'testing:.*OK'` - if [ "$DD" != "" ]; then UNZIP_OPTIONS="-P$UNZIP_PASSWD" - else - UNZIP_OPTIONS="" - fi - #Now check we can get filesizes out - EE=`unzip -Ptest -lv contrib/test_password.zip 2>&1|egrep '80688.*test/ls'` - if [ "$EE" = "" ]; then - echo "**FATAL ERROR ***" - echo "" - echo "$UNZIP_BINARY doesn't support the \"-lv\" option to view file details" - echo "" - echo "Please upgrade to another version of unzip" - echo "" - exit 1 - fi fi if test -x $dir/uvscan then if [ "`echo $FIND_SCANNERS|grep ' uvscan '`" != "" -a "$UVSCAN" = "" ]; then - if [ "`$dir/uvscan -r --secure --fam --unzip --macro-heuristics -v $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then UVSCAN="${UVSCAN:-$dir/uvscan}" INSTALLED_SCANNERS="$INSTALLED_SCANNERS uvscan" - fi fi fi if test -x $dir/csav then if [ "`echo $FIND_SCANNERS|grep ' csav '`" != "" -a "$CSAV" = "" ]; then - if [ "`$dir/csav -list -nomem -packed -archive -noboot $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then CSAV="${CSAV:-$dir/csav}" INSTALLED_SCANNERS="$INSTALLED_SCANNERS csav" - fi fi fi if [ "`echo $FIND_SCANNERS|grep ' sophie '`" != "" -a "$SOPHIE" = "" ]; then @@ -1097,28 +1044,17 @@ if [ "`echo $FIND_SCANNERS|grep ' clamdscan '`" != "" -a "$CLAMDSCAN" = "" ]; then if test -x $dir/clamdscan then - DD="`$dir/clamdscan -v $TMP_DIR 2>&1`|egrep -i 'virus|test'" - if [ "$DD" != "" ]; then CLAMDSCAN="${CLAMDSCAN:-$dir/clamdscan}" INSTALLED_SCANNERS="$INSTALLED_SCANNERS clamdscan" - else - echo " -Something like clamdscan for ClamAV detected - but not correctly installed. -Please read Q-S FAQ if you want it - especially check that clamd daemon -can read files owned by $QS_USER (i.e. make it run as $QS_USER). -". - fi fi fi if test -x $dir/clamscan then if [ "`echo $FIND_SCANNERS|grep ' clamscan '`" != "" -a "$CLAMSCAN" = "" ]; then - if [ "`$dir/clamscan -v $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then CLAMSCAN="${CLAMSCAN:-$dir/clamscan}" INSTALLED_SCANNERS="$INSTALLED_SCANNERS clamscan" - fi fi fi if [ "`echo $FIND_SCANNERS|grep spamassassin`" != "" -a "$SPAMASSASSIN_BINARY" = "" ]; then @@ -1129,126 +1065,21 @@ if [ "$SPAMASSASSIN_BINARY" != "" -a -x "$dir/spamc" -a "$SPAMC_BINARY" = "" ] then - #Test it out - if [ "`$dir/spamc -h 2>&1|grep 'spamd'`" != "" ] ;then SPAMC_BINARY="${SPAMC_BINARY:-$dir/spamc}" - # st: is spamd running with sql per user settings? - SA_SQL_AUT=`ps ax -w 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep` - if [ "$SA_SQL_AUT" = "" ]; then - SA_SQL_AUT=`ps -ef 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep` - fi - if [ "$SA_SQL_AUT" = "" ]; then - SA_SQL_AUT=`ps aux 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep` - fi - # st: are we using spamd in unix-socket mode? if [ "$SPAMD_SOCKET" != "" ] ;then - if [ ! -S "$SPAMD_SOCKET" ] ;then - cat<<EOF - - Spamd socket not found in $SPAMD_SOCKET - - Are you really using spamd daemon with the '--socketpath' option? - Check it or allow the configure script to look for - it, just omiting the configure option --sa-socket ... - -EOF - exit - fi #SPAMC_BINARY="$SPAMC_BINARY -U $SPAMD_SOCKET" SA_SKT=" -U $SPAMD_SOCKET" - else - - #Test to see if spamc is calling Unix sockets instead of TCP - SPAMD_SOCKET=`ps -ef 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'` - if [ "$SPAMD_SOCKET" = "" ]; then - SPAMD_SOCKET=`ps aux 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'` - fi - - # st: in my RH7.3 servers this works... - if [ "$SPAMD_SOCKET" = "" ]; then - SPAMD_SOCKET=`ps ax -w 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'` - fi - - if [ "$SPAMD_SOCKET" != "" ]; then - if [ -S "$SPAMD_SOCKET" ]; then - #SPAMC_BINARY="$SPAMC_BINARY -U $SPAMD_SOCKET" - SA_SKT=" -U $SPAMD_SOCKET" - else - cat<<EOF - - Oops... Spamd socket not found in $SPAMD_SOCKET - - It seems that you're running spamd in unix-socket mode, but the - configure script couldn't find the socket properly. - Try to set it manually using the configure option --sa-socket ... - -EOF - exit - fi - fi - fi - DD="`$SPAMC_BINARY $SA_SKT < ./contrib/spamc-nice.eml`" - if [ "`echo $DD|grep '^From '`" != "" ]; then - cat<<EOF - -SpamAssassin's spamd daemon is incorrectly installed. You need to run it as: - -spamd -F 0 .... - -Please try again. -EOF - exit - fi - DD="`$SPAMC_BINARY $SA_HN $SA_SKT < ./contrib/spamc-nice.eml`" - if [ "$?" != "0" -o "`echo $DD|grep 'X-Spam-Status: No'`" = "" ]; then - echo " -Something like spamc for SpamAssassin detected - but not correctly installed -(didn't include a \"X-Spam-Status\" line in output). -Please read Q-S FAQ if you want it - especially check that spamd daemon -is running. Ignoring... -" - SPAMC_BINARY='' - else - DD="`$SPAMC_BINARY $SA_HN $SA_SKT < ./contrib/spamc-nasty.eml`" - if [ "$?" != "0" -o "`echo $DD|grep 'X-Spam-Status: Yes'`" = "" ]; then - echo " -Something like spamc for SpamAssassin detected - but not correctly installed -(didn't include a \"X-Spam-Status: Yes\" line in output) - ignoring... -" - SPAMC_BINARY='' - else - DD="`$SPAMC_BINARY $SA_HN $SA_SKT -c < ./contrib/spamc-nasty.eml`" - if [ "`echo $DD|tail -n 1|grep /`" != "" ]; then - SPAMASSASSIN_VERSION="fast_spamassassin" - SA_THRESHOLD=`echo $DD|tail -n 1|sed -e 's/\(.*\)\/\(.*\)/\2/'` - fi - fi - fi - if [ "$SPAMC_BINARY" != "" ]; then if [ "`echo $FIND_SCANNERS|grep ' fast_spamassassin'`" != "" ]; then - if [ "$SPAMASSASSIN_VERSION" != "fast_spamassassin" ]; then - cat<<EOF -Fatal: You have asked for the "fast" v2.1 SpamAssassin support, however -your system is NOT correctly configured for it. - -Either upgrade and try again, or reconfigure for the older "verbose" -SpamAssassin support. - -EOF - exit - fi + SPAMASSASSIN_VERSION="fast_spamassassin" #SPAMC_OPTIONS="$SA_HN -c " SA_FAST="1" INSTALLED_SCANNERS="$INSTALLED_SCANNERS fast_spamassassin" - #See if they want fast_spamassassin to alter the - #Subject: line too... - SPAMC_SUBJECT="`echo $FIND_SCANNERS|grep ' fast_spamassassin='|sed -e 's/^.*fast_spamassassin=//g' -e 's/ .*$//g'`" if [ "$SPAMC_SUBJECT" = "" ]; then SPAMC_SUBJECT=$SA_SUBJECT ; fi else SPAMASSASSIN_VERSION="verbose_spamassassin" @@ -1259,10 +1090,6 @@ INSTALLED_SCANNERS="$INSTALLED_SCANNERS verbose_spamassassin" fi - else - SPAMC_BINARY='' - fi - fi fi fi if test -x $dir/find