aboutsummaryrefslogtreecommitdiff
path: root/mail/vpopmail/files
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2003-10-31 17:24:01 +0000
committerPeter Pentchev <roam@FreeBSD.org>2003-10-31 17:24:01 +0000
commitf4a88d4c6c0991f2eb067daa0441e3a005dc3679 (patch)
treed940d96403754d8bda2c0eec12c919ee63f3c818 /mail/vpopmail/files
parent450b648c54aea6bf5cf7ef50c1945e2bcc4b80ca (diff)
downloadports-f4a88d4c6c0991f2eb067daa0441e3a005dc3679.tar.gz
ports-f4a88d4c6c0991f2eb067daa0441e3a005dc3679.zip
Notes
Diffstat (limited to 'mail/vpopmail/files')
-rw-r--r--mail/vpopmail/files/patch-config.h.in12
-rw-r--r--mail/vpopmail/files/patch-configure47
-rw-r--r--mail/vpopmail/files/patch-vdelivermail.c45
3 files changed, 96 insertions, 8 deletions
diff --git a/mail/vpopmail/files/patch-config.h.in b/mail/vpopmail/files/patch-config.h.in
new file mode 100644
index 000000000000..f795be18e767
--- /dev/null
+++ b/mail/vpopmail/files/patch-config.h.in
@@ -0,0 +1,12 @@
+--- config.h.in.orig Fri Oct 24 18:43:20 2003
++++ config.h.in Fri Oct 24 18:43:45 2003
+@@ -89,6 +89,9 @@
+ #undef QMAILNEWU
+
+ /* */
++#undef SPAMC
++
++/* */
+ #undef QMAILINJECT
+
+ /* */
diff --git a/mail/vpopmail/files/patch-configure b/mail/vpopmail/files/patch-configure
index dff6d39e78a5..af635b3504dc 100644
--- a/mail/vpopmail/files/patch-configure
+++ b/mail/vpopmail/files/patch-configure
@@ -1,6 +1,15 @@
---- configure.orig Thu Aug 28 21:09:47 2003
-+++ configure Fri Sep 5 00:13:14 2003
-@@ -1317,7 +1317,7 @@
+--- configure.orig Fri Oct 17 01:12:22 2003
++++ configure Sat Oct 25 01:18:27 2003
+@@ -20,6 +20,8 @@
+ ac_help="$ac_help
+ --enable-qmail-newmrh=path Full path to qmail-newmrh program"
+ ac_help="$ac_help
++ --enable-spamassassin=path Enable SpamAssassin. Full path to spamc program. default /usr/local/bin/spamc"
++ac_help="$ac_help
+ --enable-vpopuser=vpopmail user vchkpw was installed as."
+ ac_help="$ac_help
+ --enable-vpopgroup=vchkpw group vchkpw was installed as."
+@@ -1317,7 +1319,7 @@
;;
esac
@@ -9,7 +18,35 @@
then
echo "configure: warning: === vpopmail must be configured as root. ===" 1>&2
echo "configure: warning: === please switch to the root user and ===" 1>&2
-@@ -1601,15 +1601,6 @@
+@@ -1446,6 +1448,27 @@
+ EOF
+
+
++# 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
++fi
++
+
+ vpopuser="vpopmail"
+ # Check whether --enable-vpopuser or --disable-vpopuser was given.
+@@ -1601,15 +1624,6 @@
EOF
@@ -25,7 +62,7 @@
# Check whether --enable-roaming-users or --disable-roaming-users was given.
if test "${enable_roaming_users+set}" = set; then
enableval="$enable_roaming_users"
-@@ -1671,17 +1662,7 @@
+@@ -1671,17 +1685,7 @@
if test "${enable_tcpserver_file+set}" = set; then
enableval="$enable_tcpserver_file"
tcpserver_file="$enableval"
diff --git a/mail/vpopmail/files/patch-vdelivermail.c b/mail/vpopmail/files/patch-vdelivermail.c
index 106281226007..8a23e9bb5c43 100644
--- a/mail/vpopmail/files/patch-vdelivermail.c
+++ b/mail/vpopmail/files/patch-vdelivermail.c
@@ -1,6 +1,6 @@
---- vdelivermail.c.orig Sat Nov 2 22:34:39 2002
-+++ vdelivermail.c Sat Nov 2 22:35:20 2002
-@@ -263,7 +263,7 @@
+--- vdelivermail.c.orig Mon Oct 20 20:59:57 2003
++++ vdelivermail.c Fri Oct 24 18:31:45 2003
+@@ -257,7 +257,7 @@
/* check for wildcard if there's no match */
if(tmpstr == NULL) {
@@ -9,3 +9,42 @@
if(TheUser[i-1]=='-') {
tmpuser[0] = '\0';
strncat(tmpuser,TheUser,i);
+@@ -444,6 +444,7 @@
+ int inject = 0;
+ FILE *fs;
+ char tmp_file[256];
++ int pim[2];
+
+ /* check if the email is looping to this user */
+ if ( is_looping( address ) == 1 ) {
+@@ -631,6 +632,30 @@
+ }
+ }
+
++#ifdef SPAMC
++ /* fork the SpamAssassin client - patch by Alex Dupre */
++ if (!pipe(pim)) {
++ pid = vfork();
++ switch (pid) {
++ case -1:
++ close(pim[0]);
++ close(pim[1]);
++ break;
++ case 0:
++ close(pim[0]);
++ dup2(pim[1], 1);
++ close(pim[1]);
++ if (execl(SPAMC, SPAMC, "-u", maildir_to_email(address), 0) == -1) {
++ while ((file_count=read(0, msgbuf, MSG_BUF_SIZE)) > 0)
++ write(1, msgbuf, file_count);
++ _exit(0);
++ }
++ }
++ close(pim[1]);
++ dup2(pim[0], 0);
++ close(pim[0]);
++ }
++#endif
+
+ /* read it in chunks and write it to the new file */
+ while((file_count=read(0,msgbuf,MSG_BUF_SIZE))>0) {