diff options
author | Peter Pentchev <roam@FreeBSD.org> | 2003-10-31 17:24:01 +0000 |
---|---|---|
committer | Peter Pentchev <roam@FreeBSD.org> | 2003-10-31 17:24:01 +0000 |
commit | f4a88d4c6c0991f2eb067daa0441e3a005dc3679 (patch) | |
tree | d940d96403754d8bda2c0eec12c919ee63f3c818 /mail/vpopmail/files/patch-vdelivermail.c | |
parent | 450b648c54aea6bf5cf7ef50c1945e2bcc4b80ca (diff) | |
download | ports-f4a88d4c6c0991f2eb067daa0441e3a005dc3679.tar.gz ports-f4a88d4c6c0991f2eb067daa0441e3a005dc3679.zip |
Notes
Diffstat (limited to 'mail/vpopmail/files/patch-vdelivermail.c')
-rw-r--r-- | mail/vpopmail/files/patch-vdelivermail.c | 45 |
1 files changed, 42 insertions, 3 deletions
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) { |