aboutsummaryrefslogtreecommitdiff
path: root/mail/p5-IMAP-Sieve
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2003-04-26 21:51:56 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2003-04-26 21:51:56 +0000
commit67a9e0c5bab8a1d91512baf7571d2821a683b83d (patch)
tree61794c87ebaa9522cac29b80866397479eae35a0 /mail/p5-IMAP-Sieve
parent58187416e9cf3105f1890387fbea4887bf13eb5a (diff)
downloadports-67a9e0c5bab8a1d91512baf7571d2821a683b83d.tar.gz
ports-67a9e0c5bab8a1d91512baf7571d2821a683b83d.zip
Notes
Diffstat (limited to 'mail/p5-IMAP-Sieve')
-rw-r--r--mail/p5-IMAP-Sieve/Makefile35
-rw-r--r--mail/p5-IMAP-Sieve/distinfo1
-rw-r--r--mail/p5-IMAP-Sieve/files/patch-MANIFEST10
-rw-r--r--mail/p5-IMAP-Sieve/files/patch-Sieve.pm101
-rw-r--r--mail/p5-IMAP-Sieve/pkg-descr7
-rw-r--r--mail/p5-IMAP-Sieve/pkg-plist5
6 files changed, 159 insertions, 0 deletions
diff --git a/mail/p5-IMAP-Sieve/Makefile b/mail/p5-IMAP-Sieve/Makefile
new file mode 100644
index 000000000000..627e2c8665fa
--- /dev/null
+++ b/mail/p5-IMAP-Sieve/Makefile
@@ -0,0 +1,35 @@
+# New ports collection makefile for: p5-IMAP-Sieve
+# Date created: 25 Apr 2003
+# Whom: Oliver Eikemeier <eikemeier@fillmore-labs.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= IMAP-Sieve
+PORTVERSION= 0.4.9
+CATEGORIES= mail perl5
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= websieve
+PKGNAMEPREFIX= p5-
+DISTNAME= websieve-0.61
+
+MAINTAINER= eikemeier@fillmore-labs.com
+COMMENT= Perl module to edit Sieve scripts on an Cyrus IMAP server
+
+RUN_DEPENDS= ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL \
+ ${SITE_PERL}/${PERL_ARCH}/IO.pm:${PORTSDIR}/devel/p5-IO
+
+WRKSRC= ${WRKDIR}/${PERLSIEVENAME}
+
+PERL_CONFIGURE= yes
+
+PERLSIEVENAME= perlsieve-${PORTVERSION}
+PERLSIEVESUFX= b
+
+post-extract:
+ @${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
+ ${WRKDIR}/websieve/${PERLSIEVENAME}${PERLSIEVESUFX}${EXTRACT_SUFX} \
+ ${EXTRACT_AFTER_ARGS} -C ${WRKDIR}
+ @${RM} ${WRKSRC}/testssl.pl
+
+.include <bsd.port.mk>
diff --git a/mail/p5-IMAP-Sieve/distinfo b/mail/p5-IMAP-Sieve/distinfo
new file mode 100644
index 000000000000..6e94d0e47405
--- /dev/null
+++ b/mail/p5-IMAP-Sieve/distinfo
@@ -0,0 +1 @@
+MD5 (websieve-0.61.tar.gz) = 5f2d01a2479f8cdd8e2ea4fd1a09163e
diff --git a/mail/p5-IMAP-Sieve/files/patch-MANIFEST b/mail/p5-IMAP-Sieve/files/patch-MANIFEST
new file mode 100644
index 000000000000..30a558b60fbf
--- /dev/null
+++ b/mail/p5-IMAP-Sieve/files/patch-MANIFEST
@@ -0,0 +1,10 @@
+--- MANIFEST.orig Fri Apr 25 18:47:03 2003
++++ MANIFEST Fri Apr 25 18:47:12 2003
+@@ -2,7 +2,6 @@
+ GPL2.txt
+ LGPL2.txt
+ test.pl
+-testssl.pl
+ Sieve.pm
+ Changes
+ MANIFEST
diff --git a/mail/p5-IMAP-Sieve/files/patch-Sieve.pm b/mail/p5-IMAP-Sieve/files/patch-Sieve.pm
new file mode 100644
index 000000000000..af847be5573d
--- /dev/null
+++ b/mail/p5-IMAP-Sieve/files/patch-Sieve.pm
@@ -0,0 +1,101 @@
+--- Sieve.pm.orig Sat Jun 23 22:42:48 2001
++++ Sieve.pm Thu Apr 24 18:10:29 2003
+@@ -93,7 +93,7 @@
+ Proto => 'tcp',
+ Reuse => 1); })
+ {
+- $self->_error("initialize", "could'nt establish a Sieve connection to",$self->{'Server'});
++ $self->_error("initialize", "couldn't establish a Sieve connection to",$self->{'Server'});
+ return;
+ }
+ } # if SSL
+@@ -110,6 +110,7 @@
+ if (/\r$/) {
+ chop;
+ }
++ my $starttls = 0;
+ if (/IMPLEMENTATION/) {
+ $self->{'Implementation'}=$1 if /^"IMPLEMENTATION" +"(.*)"/;
+ #version 2 of cyrus imap/timsieved
+@@ -119,6 +120,7 @@
+ while (!/^OK/) {
+ $self->{'Capability'}=$1 if /^"SASL" +"(.*)"/;
+ $self->{'Sieve'}=$1 if /^"SIEVE" +"(.*)"/;
++ $starttls=1 if /"STARTTLS"/;
+ $_ = $self->_read;
+ ## $_=$self->_read;
+ }
+@@ -126,6 +128,55 @@
+ else {
+ $self->{'Capability'}=$_;
+ }
++ if (!defined($self->{'SSL'}) && $starttls) {
++ my $cwd= cwd;
++ my %ssl_defaults = (
++ 'SSL_use_cert' => 0,
++ 'SSL_verify_mode' => 0x00,
++ 'SSL_key_file' => $cwd."/certs/client-key.pem",
++ 'SSL_cert_file' => $cwd."/certs/client-cert.pem",
++ 'SSL_ca_path' => $cwd."/certs",
++ 'SSL_ca_file' => $cwd."/certs/ca-cert.pem",
++ 'SSL_version' => 'tlsv1'
++ );
++ my @ssl_options;
++ my $ssl_key;
++ my $key;
++ foreach $ssl_key (keys(%ssl_defaults)) {
++ if (!defined($self->{$ssl_key})) {
++ $self->{$ssl_key} = $ssl_defaults{$ssl_key};
++ }
++ }
++ foreach $ssl_key (keys(%{$self})) {
++ if ($ssl_key =~ /^SSL_/) {
++ push @ssl_options, $ssl_key,$self->{$ssl_key};
++ }
++ }
++ my $SSL_try="use IO::Socket::SSL";
++ eval $SSL_try;
++# $IO::Socket::SSL::DEBUG = 4;
++ if ($self->{'Socket'}->isa('IO::Socket::SSL')) {
++ $self->_error("starttls", "TLS already started");
++ $self->close;
++ return;
++ }
++ print $fh "STARTTLS\r\n";
++ $_ = $self->_read;
++ if (/OK/) {
++
++ #IO::Socket::SSL::context_init({@ssl_options});
++ if (!IO::Socket::SSL::socket_to_SSL($self->{'Socket'}, {@ssl_options}))
++ {
++ $self->_error("starttls", "couldn't secure connection to",$self->{'Server'});
++ $self->close;
++ return;
++ }
++ } else {
++ $self->close;
++ $self->_error("starttls", "Unknown error",$_);
++ return;
++ }
++ }
+ $userpass = "$self->{'Proxy'}\x00".$self->{'Login'}."\x00".$self->{'Password'};
+ $encode=encode_base64($userpass);
+ $len=length($encode);
+@@ -196,7 +247,7 @@
+ }
+ }
+ else {
+- if (($char eq "\n") or ($char eq "\r")) {
++ if ($char eq "\n") {
+ if (length($buffer) ==0) {
+ # remove any cr or nl leftover
+ }
+@@ -204,7 +255,7 @@
+ return $buffer;
+ }
+ }
+- else {
++ elsif ($char ne "\r") {
+ $buffer.=$char;
+ }
+ }
diff --git a/mail/p5-IMAP-Sieve/pkg-descr b/mail/p5-IMAP-Sieve/pkg-descr
new file mode 100644
index 000000000000..56238ff43252
--- /dev/null
+++ b/mail/p5-IMAP-Sieve/pkg-descr
@@ -0,0 +1,7 @@
+A Perl module used by websieve for creating Sieve scripts on an Cyrus
+IMAP mail server. Sometimes also referenced as 'perlsieve'.
+
+Author: Alain Turbide <aturbide@toshiba.ca>
+
+
+WWW: http://sourceforge.net/projects/websieve
diff --git a/mail/p5-IMAP-Sieve/pkg-plist b/mail/p5-IMAP-Sieve/pkg-plist
new file mode 100644
index 000000000000..7b8797d23603
--- /dev/null
+++ b/mail/p5-IMAP-Sieve/pkg-plist
@@ -0,0 +1,5 @@
+%%SITE_PERL%%/IMAP/Sieve.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/IMAP/Sieve/.packlist
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/IMAP/Sieve
+@unexec rmdir %D%%SITE_PERL%%/%%PERL_ARCH%%/auto/IMAP 2>/dev/null || true
+@unexec rmdir %D%%SITE_PERL%%/IMAP 2>/dev/null || true