diff options
author | Thomas Abthorpe <tabthorpe@FreeBSD.org> | 2009-03-31 14:07:50 +0000 |
---|---|---|
committer | Thomas Abthorpe <tabthorpe@FreeBSD.org> | 2009-03-31 14:07:50 +0000 |
commit | ef2b2ea5183867b2b41615bf261f5ac89438a39a (patch) | |
tree | e9d32658eadf79a8b49f257ac52d4f6081c50387 /mail/squirrelmail-avelsieve-plugin | |
parent | c9f8ecd73e8fceed47fc8903893e583c2919d81c (diff) | |
download | ports-ef2b2ea5183867b2b41615bf261f5ac89438a39a.tar.gz ports-ef2b2ea5183867b2b41615bf261f5ac89438a39a.zip |
Notes
Diffstat (limited to 'mail/squirrelmail-avelsieve-plugin')
-rw-r--r-- | mail/squirrelmail-avelsieve-plugin/Makefile | 68 | ||||
-rw-r--r-- | mail/squirrelmail-avelsieve-plugin/files/patch-avelsieve__include__managesieve.lib.php | 55 |
2 files changed, 59 insertions, 64 deletions
diff --git a/mail/squirrelmail-avelsieve-plugin/Makefile b/mail/squirrelmail-avelsieve-plugin/Makefile index 2c3964af1cc5..3ac700f1d3da 100644 --- a/mail/squirrelmail-avelsieve-plugin/Makefile +++ b/mail/squirrelmail-avelsieve-plugin/Makefile @@ -6,78 +6,18 @@ PORTNAME= avelsieve PORTVERSION= 1.9.7 -PORTREVISION= 1 -CATEGORIES= mail www -MASTER_SITES= http://www.squirrelmail.org/plugins/ -PKGNAMEPREFIX= squirrelmail- -PKGNAMESUFFIX= -plugin +PORTREVISION= 2 DIST_SUBDIR= squirrelmail MAINTAINER= neil@darlow.co.uk -COMMENT= Interface to create server-side Sieve scripts - -RUN_DEPENDS= ${SQUIRRELDIR}/index.php:${PORTSDIR}/mail/squirrelmail - -SQUIRREL_PLUGIN_NAME= ${PORTNAME} - -.ifdef SQUIRRELDIR -PLIST_SUB+= SQUIRRELDIR=${SQUIRRELDIR} -SUB_LIST+= SQUIRRELDIR=${SQUIRRELDIR} -.else -. ifndef WITHOUT_WWWDIR -SQUIRRELDIR= ${PREFIX}/www/squirrelmail -PLIST_SUB+= SQUIRRELDIR=www/squirrelmail -SUB_LIST+= SQUIRRELDIR=www/squirrelmail -. else -SQUIRRELDIR= ${PREFIX}/squirrelmail -PLIST_SUB+= SQUIRRELDIR=squirrelmail -SUB_LIST+= SQUIRRELDIR=squirrelmail -. endif -.endif -PLIST_SUB+= SQUIRREL_PLUGIN_NAME=${SQUIRREL_PLUGIN_NAME} -SUB_LIST+= SQUIRREL_PLUGIN_NAME=${SQUIRREL_PLUGIN_NAME} - -SUB_FILES= pkg-message - -NO_BUILD= yes -NO_WRKSUBDIR= yes -USE_PERL5_BUILD= yes -WANT_PHP_WEB= yes +COMMENT= SquirrelMail plugin for Server-Side Mail Filtering management .include <bsd.port.pre.mk> - -pre-everything:: - @${ECHO} "" -.ifndef WITHOUT_ACTIVATE - @${ECHO} "Activating plug-in in SquirrelMail after installation." - @${ECHO} "If you don't want to automatically activate the plug-in set" - @${ECHO} "WITHOUT_ACTIVATE=yes" -.else - @${ECHO} "NOT Activating plug-in in SquirrelMail after installation." - @${ECHO} "If you want to automatically activate the plug-in unset" - @${ECHO} "WITHOUT_ACTIVATE" -.endif - @${ECHO} "" +.include "${PORTSDIR}/mail/squirrelmail/bsd.squirrelmail.mk" pre-install: ${RM} -Rf ${WRKSRC}/${SQUIRREL_PLUGIN_NAME}/po ${FIND} ${WRKSRC}/${SQUIRREL_PLUGIN_NAME} -type f \ - \( -name '.cvsignore' -o -name '*.bak' \) -exec ${RM} '{}' ';' - -do-install: - ${CP} -R ${WRKSRC}/${SQUIRREL_PLUGIN_NAME} ${SQUIRRELDIR}/plugins - ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME} - -post-install: -.ifndef WITHOUT_ACTIVATE -.if exists( ${SQUIRRELDIR}/config/config.php ) - @${ECHO} "Activating plug-in in SquirrelMail" - ${SQUIRRELDIR}/config/conf.pl --install-plugin ${SQUIRREL_PLUGIN_NAME} -.endif -.else - @${ECHO} "To activate the plug-in in SquirrelMail use" - @${ECHO} "${SQUIRRELDIR}/config/conf.pl --install-plugin ${SQUIRREL_PLUGIN_NAME}" -.endif - @${CAT} ${PKGMESSAGE} + \( -name '.cvsignore' -o -name '*.bak' -o -name '*.orig' \) -exec ${RM} {} \; .include <bsd.port.post.mk> diff --git a/mail/squirrelmail-avelsieve-plugin/files/patch-avelsieve__include__managesieve.lib.php b/mail/squirrelmail-avelsieve-plugin/files/patch-avelsieve__include__managesieve.lib.php new file mode 100644 index 000000000000..e3d925b8b4f0 --- /dev/null +++ b/mail/squirrelmail-avelsieve-plugin/files/patch-avelsieve__include__managesieve.lib.php @@ -0,0 +1,55 @@ +--- avelsieve/include/managesieve.lib.php.orig 2006-07-24 14:48:27.000000000 +0100 ++++ avelsieve/include/managesieve.lib.php 2009-03-26 20:36:33.000000000 +0000 +@@ -686,6 +686,20 @@ + } + + /** ++ * Neil Darlow - 2009/03/26 ++ * Changes to Sieve servers to be compliant with draft-managesieve-09.txt ++ * break authenticate() which cannot handle the capability strings received ++ * after AUTHENTICATE under a TLS encrypted session. We ignore capability ++ * strings for each SASL mechanism. ++ */ ++ function ignore_capabilities() ++ { ++ if ($this->capabilities['starttls']) do { ++ $line = fgets($this->fp, 1024); ++ } while (strncmp($line, 'OK', 2)); ++ } ++ ++ /** + * Perform SASL authentication to SIEVE server. + * + * Attempts to authenticate to SIEVE, using some SASL authentication method +@@ -701,6 +715,7 @@ + + $this->len=strlen($auth); + fputs($this->fp, 'AUTHENTICATE "PLAIN" {' . $this->len . '+}' . "\r\n"); ++ $this->ignore_capabilities(); + fputs($this->fp, "$auth\r\n"); + + $this->line=fgets($this->fp,1024); +@@ -717,6 +732,7 @@ + // SASL DIGEST-MD5 support works with timsieved 1.1.0 + // follows rfc2831 for generating the $response to $challenge + fputs($this->fp, "AUTHENTICATE \"DIGEST-MD5\"\r\n"); ++ $this->ignore_capabilities(); + // $clen is length of server challenge, we ignore it. + $clen = fgets($this->fp, 1024); + // read for 2048, rfc2831 max length allowed +@@ -768,6 +784,7 @@ + // CRAM-MD5 does not support proxy of $auth by $user + // requires php mhash extension + fputs($this->fp, "AUTHENTICATE \"CRAM-MD5\"\r\n"); ++ $this->ignore_capabilities(); + // $clen is the length of the challenge line the server gives us + $clen = fgets($this->fp, 1024); + // read for 1024, should be long enough? +@@ -793,6 +810,7 @@ + $pass=base64_encode($this->pass); + + fputs($this->fp, "AUTHENTICATE \"LOGIN\"\r\n"); ++ $this->ignore_capabilities(); + fputs($this->fp, "{".strlen($login)."+}\r\n"); + fputs($this->fp, "$login\r\n"); + fputs($this->fp, "{".strlen($pass)."+}\r\n"); |