summaryrefslogtreecommitdiff
path: root/mail/vpopmail/files/patch-configure
blob: d1d1be7e34081297cf4e13fcd194710b4f8158d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
--- configure.orig	Mon Feb  2 06:24:19 2004
+++ configure	Mon Feb  2 10:10:12 2004
@@ -846,6 +846,8 @@
   --enable-qmail-newu=PATH   Full path to qmail-newu program.
   --enable-qmail-inject=PATH Full path to qmail-inject program.
   --enable-qmail-newmrh=PATH Full path to qmail-newmrh program.
+  --enable-spamassassin=PATH Enable SpamAssassin. Full path to spamc program. default /usr/local/bin/spamc"
+  --enable-spam-threshold=# or n Automatically delete messages that score more than # spam hits"
   --enable-vpopuser=USER     User name allocated to vpopmail vpopmail.
   --enable-vpopgroup=GROUP   Group name allocated to vpopmail vchkpw.
   --enable-roaming-users     Enable POP-before-SMTP functionality.
@@ -5097,7 +5099,7 @@
 
 #----------------------------------------------------------------------
 
-if test `$idcommand` != "0"
+if false && test `$idcommand` != "0"
 then
   { echo "$as_me:$LINENO: WARNING: === vpopmail must be configured as root. ===" >&5
 echo "$as_me: WARNING: === vpopmail must be configured as root. ===" >&2;}
@@ -5227,19 +5229,50 @@
     ;;
 esac
 
+# Check whether --enable-spamassassin or --disable-spamassassin was given.
+if test "${enable_spamassassin+set}" = set; then
+  enableval="$enable_spamassassin"
+  spamc="$enableval"
 
-#----------------------------------------------------------------------
+  case $spamc in
+  1*|y*|Y*)
+      spamc="/usr/local/bin/spamc"
+      ;;
+  esac
+
+  if test ! -f "$spamc"
+  then
+      { echo "configure: error: Unable to find your spamc file, specify --enable-spamassassin=/full/path/to/spamc" 1>&2; exit 1; }
+  fi
+
+  cat >> confdefs.h <<EOF
+#define SPAMC "$spamc"
+EOF
+
+# Check whether --enable-spam-threshold or --disable-spam-threshold was given.
+if test "${enable_spam_threshold+set}" = set; then
+  enableval="$enable_spam_threshold"
+  ENABLE_SPAM_THRESHOLD=$enableval
+else
+
+                        ENABLE_SPAM_THRESHOLD=0
 
-if test ! -d $vpopmaildir/etc
-then
-  mkdir $vpopmaildir/etc
-  chown $vpopmailuid "$vpopmaildir"/etc
-  chgrp $vpopmailgid "$vpopmaildir"/etc
-  chmod 755 "$vpopmaildir"/etc
-  { echo "$as_me:$LINENO: WARNING: making a vpopmail etc directory " >&5
-echo "$as_me: WARNING: making a vpopmail etc directory " >&2;}
 fi
 
+
+case $ENABLE_SPAM_THRESHOLD in
+0*|n*|N*)
+      ;;
+*)
+          cat >> confdefs.h <<EOF
+#define SPAM_THRESHOLD $ENABLE_SPAM_THRESHOLD
+EOF
+
+          ;;
+esac
+fi
+
+
 #----------------------------------------------------------------------
 
 echo "$as_me:$LINENO: checking whether we can locate the qmail directory" >&5
@@ -5705,20 +5738,7 @@
 if test "${enable_tcpserver_file+set}" = set; then
   enableval="$enable_tcpserver_file"
   tcpserver_file="$enableval"
-else
-
-            if test "$tcpserver_file" = ""
-            then
-                { echo "$as_me:$LINENO: WARNING: Unable to find your tcpserver relay file." >&5
-echo "$as_me: WARNING: Unable to find your tcpserver relay file." >&2;}
-                { echo "$as_me:$LINENO: WARNING: Creating tcp.smtp in \"$vpopmaildir\"/etc/tcp.smtp." >&5
-echo "$as_me: WARNING: Creating tcp.smtp in \"$vpopmaildir\"/etc/tcp.smtp." >&2;}
-
-                echo "127.:allow,RELAYCLIENT=\"\"" > "$vpopmaildir"/etc/tcp.smtp
-                tcpserver_file="$vpopmaildir"/etc/tcp.smtp
-            fi
-
-
+  echo "127.:allow,RELAYCLIENT=\"\"" > ${VCFGDIR}/tcp.smtp
 fi;
 
     if test ! -f "$tcpserver_file"