OpenSDE Packages Database (without history before r20070)
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.

283 lines
11 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../qmail-scanner/no_magic.diff
  5. # Copyright (C) 2005 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  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
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- ./configure.orig 2005-12-10 01:53:05.000000000 -0300
  17. +++ ./configure 2005-12-10 02:25:30.000000000 -0300
  18. @@ -785,17 +785,6 @@
  19. if test -x $dir/reformime
  20. then
  21. UNMIME_BINARY="${UNMIME_BINARY:-$dir/reformime}"
  22. - DD=`reformime -s1.2 -xTEST- < ./contrib/reformime-test.eml`
  23. - if [ "`grep hello TEST-hello.txt`" = "" ]; then
  24. - echo "** FATAL ERROR ***"
  25. - echo ""
  26. - echo "$UNMIME_BINARY contains bugs. Please upgrade to a release"
  27. - echo "that post-dates Mar 22 2002 (e.g. 1.3.8)"
  28. - echo ""
  29. - rm -f TEST-hello.txt
  30. - exit 1
  31. - fi
  32. - rm -f TEST-hello.txt
  33. fi
  34. if test -x $dir/maildrop
  35. then
  36. @@ -806,34 +795,12 @@
  37. if test -x $dir/tnef
  38. then
  39. TNEF_BINARY="${TNEF_BINARY:-$dir/tnef}"
  40. - #There's a LOCALE bug in uudecode - workaround...
  41. - if [ "`$TNEF_BINARY --help 2>&1|grep number-backups`" = "" ]; then
  42. - TNEF_BINARY=""
  43. - cat<<EOF
  44. -
  45. -Old tnef binary found on your system!
  46. -
  47. -Please upgrade ASAP to a version supporting the "--number-backups" option.
  48. -
  49. -EOF
  50. - exit 1
  51. - fi
  52. fi
  53. fi
  54. if [ "$MIME_UNPACKER" = "ripmime" ]; then
  55. if test -x $dir/ripmime
  56. then
  57. UNMIME_BINARY="${UNMIME_BINARY:-$dir/ripmime}"
  58. - DD=`ripmime -i - < ./contrib/reformime-test.eml`
  59. - if [ "`grep hello hello.txt`" = "" ]; then
  60. - echo "** FATAL ERROR ***"
  61. - echo ""
  62. - echo "$UNMIME_BINARY contains bugs. Please upgrade to a newer release."
  63. - echo ""
  64. - rm -f hello.txt textfile*
  65. - exit 1
  66. - fi
  67. - rm -f hello.txt textfile*
  68. fi
  69. fi
  70. if test -x $dir/unzip
  71. @@ -841,43 +808,23 @@
  72. UNZIP_BINARY="${UNZIP_BINARY:-$dir/unzip}"
  73. #Now check for password support
  74. UNZIP_PASSWD="xx${RANDOM}$$xx"
  75. - DD=`unzip -Ptest -t contrib/test_password.zip 2>&1|egrep 'testing:.*OK'`
  76. - if [ "$DD" != "" ]; then
  77. UNZIP_OPTIONS="-P$UNZIP_PASSWD"
  78. - else
  79. - UNZIP_OPTIONS=""
  80. - fi
  81. - #Now check we can get filesizes out
  82. - EE=`unzip -Ptest -lv contrib/test_password.zip 2>&1|egrep '80688.*test/ls'`
  83. - if [ "$EE" = "" ]; then
  84. - echo "**FATAL ERROR ***"
  85. - echo ""
  86. - echo "$UNZIP_BINARY doesn't support the \"-lv\" option to view file details"
  87. - echo ""
  88. - echo "Please upgrade to another version of unzip"
  89. - echo ""
  90. - exit 1
  91. - fi
  92. fi
  93. if test -x $dir/uvscan
  94. then
  95. if [ "`echo $FIND_SCANNERS|grep ' uvscan '`" != "" -a "$UVSCAN" = "" ]; then
  96. - if [ "`$dir/uvscan -r --secure --fam --unzip --macro-heuristics -v $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then
  97. UVSCAN="${UVSCAN:-$dir/uvscan}"
  98. INSTALLED_SCANNERS="$INSTALLED_SCANNERS
  99. uvscan"
  100. - fi
  101. fi
  102. fi
  103. if test -x $dir/csav
  104. then
  105. if [ "`echo $FIND_SCANNERS|grep ' csav '`" != "" -a "$CSAV" = "" ]; then
  106. - if [ "`$dir/csav -list -nomem -packed -archive -noboot $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then
  107. CSAV="${CSAV:-$dir/csav}"
  108. INSTALLED_SCANNERS="$INSTALLED_SCANNERS
  109. csav"
  110. - fi
  111. fi
  112. fi
  113. if [ "`echo $FIND_SCANNERS|grep ' sophie '`" != "" -a "$SOPHIE" = "" ]; then
  114. @@ -1097,28 +1044,17 @@
  115. if [ "`echo $FIND_SCANNERS|grep ' clamdscan '`" != "" -a "$CLAMDSCAN" = "" ]; then
  116. if test -x $dir/clamdscan
  117. then
  118. - DD="`$dir/clamdscan -v $TMP_DIR 2>&1`|egrep -i 'virus|test'"
  119. - if [ "$DD" != "" ]; then
  120. CLAMDSCAN="${CLAMDSCAN:-$dir/clamdscan}"
  121. INSTALLED_SCANNERS="$INSTALLED_SCANNERS
  122. clamdscan"
  123. - else
  124. - echo "
  125. -Something like clamdscan for ClamAV detected - but not correctly installed.
  126. -Please read Q-S FAQ if you want it - especially check that clamd daemon
  127. -can read files owned by $QS_USER (i.e. make it run as $QS_USER).
  128. -".
  129. - fi
  130. fi
  131. fi
  132. if test -x $dir/clamscan
  133. then
  134. if [ "`echo $FIND_SCANNERS|grep ' clamscan '`" != "" -a "$CLAMSCAN" = "" ]; then
  135. - if [ "`$dir/clamscan -v $TMP_DIR 2>&1|egrep -i 'virus|test'`" != "" ]; then
  136. CLAMSCAN="${CLAMSCAN:-$dir/clamscan}"
  137. INSTALLED_SCANNERS="$INSTALLED_SCANNERS
  138. clamscan"
  139. - fi
  140. fi
  141. fi
  142. if [ "`echo $FIND_SCANNERS|grep spamassassin`" != "" -a "$SPAMASSASSIN_BINARY" = "" ]; then
  143. @@ -1129,126 +1065,21 @@
  144. if [ "$SPAMASSASSIN_BINARY" != "" -a -x "$dir/spamc" -a "$SPAMC_BINARY" = "" ]
  145. then
  146. - #Test it out
  147. - if [ "`$dir/spamc -h 2>&1|grep 'spamd'`" != "" ] ;then
  148. SPAMC_BINARY="${SPAMC_BINARY:-$dir/spamc}"
  149. - # st: is spamd running with sql per user settings?
  150. - SA_SQL_AUT=`ps ax -w 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep`
  151. - if [ "$SA_SQL_AUT" = "" ]; then
  152. - SA_SQL_AUT=`ps -ef 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep`
  153. - fi
  154. - if [ "$SA_SQL_AUT" = "" ]; then
  155. - SA_SQL_AUT=`ps aux 2>/dev/null | egrep 'spamd.*( \-q | \-Q | \-\-sql|with\-sql)' |grep -v grep`
  156. - fi
  157. -
  158. # st: are we using spamd in unix-socket mode?
  159. if [ "$SPAMD_SOCKET" != "" ] ;then
  160. - if [ ! -S "$SPAMD_SOCKET" ] ;then
  161. - cat<<EOF
  162. -
  163. - Spamd socket not found in $SPAMD_SOCKET
  164. -
  165. - Are you really using spamd daemon with the '--socketpath' option?
  166. - Check it or allow the configure script to look for
  167. - it, just omiting the configure option --sa-socket ...
  168. -
  169. -EOF
  170. - exit
  171. - fi
  172. #SPAMC_BINARY="$SPAMC_BINARY -U $SPAMD_SOCKET"
  173. SA_SKT=" -U $SPAMD_SOCKET"
  174. - else
  175. -
  176. - #Test to see if spamc is calling Unix sockets instead of TCP
  177. - SPAMD_SOCKET=`ps -ef 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'`
  178. - if [ "$SPAMD_SOCKET" = "" ]; then
  179. - SPAMD_SOCKET=`ps aux 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'`
  180. - fi
  181. -
  182. - # st: in my RH7.3 servers this works...
  183. - if [ "$SPAMD_SOCKET" = "" ]; then
  184. - SPAMD_SOCKET=`ps ax -w 2>/dev/null|egrep 'spamd.*socketpath'|grep -v grep|sed -e 's/^.*socketpath=//'|awk '{print $1}'`
  185. - fi
  186. -
  187. - if [ "$SPAMD_SOCKET" != "" ]; then
  188. - if [ -S "$SPAMD_SOCKET" ]; then
  189. - #SPAMC_BINARY="$SPAMC_BINARY -U $SPAMD_SOCKET"
  190. - SA_SKT=" -U $SPAMD_SOCKET"
  191. - else
  192. - cat<<EOF
  193. -
  194. - Oops... Spamd socket not found in $SPAMD_SOCKET
  195. -
  196. - It seems that you're running spamd in unix-socket mode, but the
  197. - configure script couldn't find the socket properly.
  198. - Try to set it manually using the configure option --sa-socket ...
  199. -
  200. -EOF
  201. - exit
  202. - fi
  203. - fi
  204. -
  205. fi
  206. - DD="`$SPAMC_BINARY $SA_SKT < ./contrib/spamc-nice.eml`"
  207. - if [ "`echo $DD|grep '^From '`" != "" ]; then
  208. - cat<<EOF
  209. -
  210. -SpamAssassin's spamd daemon is incorrectly installed. You need to run it as:
  211. -
  212. -spamd -F 0 ....
  213. -
  214. -Please try again.
  215. -EOF
  216. - exit
  217. - fi
  218. - DD="`$SPAMC_BINARY $SA_HN $SA_SKT < ./contrib/spamc-nice.eml`"
  219. - if [ "$?" != "0" -o "`echo $DD|grep 'X-Spam-Status: No'`" = "" ]; then
  220. - echo "
  221. -Something like spamc for SpamAssassin detected - but not correctly installed
  222. -(didn't include a \"X-Spam-Status\" line in output).
  223. -Please read Q-S FAQ if you want it - especially check that spamd daemon
  224. -is running. Ignoring...
  225. -"
  226. - SPAMC_BINARY=''
  227. - else
  228. - DD="`$SPAMC_BINARY $SA_HN $SA_SKT < ./contrib/spamc-nasty.eml`"
  229. - if [ "$?" != "0" -o "`echo $DD|grep 'X-Spam-Status: Yes'`" = "" ]; then
  230. - echo "
  231. -Something like spamc for SpamAssassin detected - but not correctly installed
  232. -(didn't include a \"X-Spam-Status: Yes\" line in output) - ignoring...
  233. -"
  234. - SPAMC_BINARY=''
  235. - else
  236. - DD="`$SPAMC_BINARY $SA_HN $SA_SKT -c < ./contrib/spamc-nasty.eml`"
  237. - if [ "`echo $DD|tail -n 1|grep /`" != "" ]; then
  238. - SPAMASSASSIN_VERSION="fast_spamassassin"
  239. - SA_THRESHOLD=`echo $DD|tail -n 1|sed -e 's/\(.*\)\/\(.*\)/\2/'`
  240. - fi
  241. - fi
  242. - fi
  243. - if [ "$SPAMC_BINARY" != "" ]; then
  244. if [ "`echo $FIND_SCANNERS|grep ' fast_spamassassin'`" != "" ]; then
  245. - if [ "$SPAMASSASSIN_VERSION" != "fast_spamassassin" ]; then
  246. - cat<<EOF
  247. -Fatal: You have asked for the "fast" v2.1 SpamAssassin support, however
  248. -your system is NOT correctly configured for it.
  249. -
  250. -Either upgrade and try again, or reconfigure for the older "verbose"
  251. -SpamAssassin support.
  252. -
  253. -EOF
  254. - exit
  255. - fi
  256. + SPAMASSASSIN_VERSION="fast_spamassassin"
  257. #SPAMC_OPTIONS="$SA_HN -c "
  258. SA_FAST="1"
  259. INSTALLED_SCANNERS="$INSTALLED_SCANNERS
  260. fast_spamassassin"
  261. - #See if they want fast_spamassassin to alter the
  262. - #Subject: line too...
  263. - SPAMC_SUBJECT="`echo $FIND_SCANNERS|grep ' fast_spamassassin='|sed -e 's/^.*fast_spamassassin=//g' -e 's/ .*$//g'`"
  264. if [ "$SPAMC_SUBJECT" = "" ]; then SPAMC_SUBJECT=$SA_SUBJECT ; fi
  265. else
  266. SPAMASSASSIN_VERSION="verbose_spamassassin"
  267. @@ -1259,10 +1090,6 @@
  268. INSTALLED_SCANNERS="$INSTALLED_SCANNERS
  269. verbose_spamassassin"
  270. fi
  271. - else
  272. - SPAMC_BINARY=''
  273. - fi
  274. - fi
  275. fi
  276. fi
  277. if test -x $dir/find