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.

58 lines
1.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../qmail-scanner/qmail-scanner.conf
  5. # Copyright (C) 2007 The OpenSDE Project
  6. # Copyright (C) 2005 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. # remove not applying part of the patch
  16. tmppatch=`mktemp`
  17. bzcat $(match_source_file -p 'st.*patch') |
  18. sed -e '/^--- .*qmail-scanner-queue.template.orig/,/^--- / {/^--- .*qmail-scanner-queue.template.orig/d;/^--- /b' \
  19. -e 'd;}' > $tmppatch
  20. var_append patchfiles ' ' $tmppatch
  21. var_append patchfiles ' ' $confdir/head-1-postst.diff
  22. hook_add preconf 5 'rm -vf qmail-scanner-queue.template.orig'
  23. var_append patchfiles ' ' $confdir/no_magic.diff
  24. confopt='--batch'
  25. var_append confopt ' ' '--log-details yes'
  26. var_append confopt ' ' '--debug yes'
  27. var_append confopt ' ' '--virus-to-delete yes'
  28. scanners=
  29. pkginstalled clamav &&
  30. var_append scanners ',' clamdscan
  31. pkginstalled spamassassin &&
  32. var_append scanners ',' fast_spamassassin
  33. var_append confopt ' ' '--scanners ${scanners:-auto}'
  34. notify=admin
  35. var_append confopt ' ' '--notify $notify'
  36. qscan_main() {
  37. # configure
  38. eval "./configure $confopt"
  39. # install
  40. qscandir=$root/var/spool/qmailscan
  41. mkdir -pv $qscandir/{quarantine,working,archive}/{new,tmp,cur}
  42. cp -vf quarantine-attachments.txt $qscandir
  43. chown -R qscand:qscand $qscandir
  44. cp qmail-scanner-queue.pl $root/var/qmail/bin/qmail-scanner-queue.pl
  45. chown qscand:qscand $root/var/qmail/bin/qmail-scanner-queue.pl
  46. chmod 4755 $root/var/qmail/bin/qmail-scanner-queue.pl
  47. }
  48. custmain=qscan_main