summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2003-04-26 21:50:25 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2003-04-26 21:50:25 +0000
commit58187416e9cf3105f1890387fbea4887bf13eb5a (patch)
treebdc86af32ad05d61bd07a1c53f03a61bbf5f1e70 /mail
parentUpdate to 1.0.3. (diff)
Add websieve 0.61, web based Cyrus IMAP user admin client.
PR: 51425 Submitted by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Diffstat (limited to 'mail')
-rw-r--r--mail/Makefile1
-rw-r--r--mail/websieve/Makefile48
-rw-r--r--mail/websieve/distinfo1
-rw-r--r--mail/websieve/files/patch-funclib.pl11
-rw-r--r--mail/websieve/files/patch-websieve.conf76
-rw-r--r--mail/websieve/files/patch-websieve.pl190
-rw-r--r--mail/websieve/pkg-descr9
-rw-r--r--mail/websieve/pkg-message6
-rw-r--r--mail/websieve/pkg-plist4
9 files changed, 346 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index caf544e2b265..c27139ec3f47 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -305,6 +305,7 @@
SUBDIR += wanderlust
SUBDIR += wanderlust-emacs20
SUBDIR += wanderlust-xemacs21-mule
+ SUBDIR += websieve
SUBDIR += wmbiff
SUBDIR += wmmail
SUBDIR += wmmaiload
diff --git a/mail/websieve/Makefile b/mail/websieve/Makefile
new file mode 100644
index 000000000000..a9842531ecb4
--- /dev/null
+++ b/mail/websieve/Makefile
@@ -0,0 +1,48 @@
+# New ports collection makefile for: websieve
+# Date created: 25 Apr 2003
+# Whom: Oliver Eikemeier <eikemeier@fillmore-labs.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= websieve
+PORTVERSION= 0.61
+CATEGORIES= mail
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+
+MAINTAINER= eikemeier@fillmore-labs.com
+COMMENT= Web based Cyrus IMAP user admin client
+
+RUN_DEPENDS= ${SITE_PERL}/IMAP/Admin.pm:${PORTSDIR}/mail/p5-IMAP-Admin \
+ ${SITE_PERL}/IMAP/Sieve.pm:mail/p5-IMAP-Sieve \
+ ${SITE_PERL}/CGI/Cache.pm:${PORTSDIR}/www/p5-CGI-Cache
+.if defined(WITH_APACHE2)
+RUN_DEPENDS+= ${LOCALBASE}/www/cgi-bin:${PORTSDIR}/www/apache2
+.else
+RUN_DEPENDS+= ${LOCALBASE}/www/cgi-bin:${PORTSDIR}/www/apache13
+.endif
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+PKGMESSAGE= ${WRKDIR}/pkg-message
+
+USE_REINPLACE= yes
+USE_PERL5_RUN= yes
+
+NO_BUILD= yes
+
+post-configure:
+ @${REINPLACE_CMD} -e "s,require[ ]*'\./\([^']*\)',require '${PREFIX}/etc/websieve/\1'," \
+ ${WRKSRC}/websieve.pl
+
+do-install:
+ @${INSTALL_SCRIPT} ${WRKSRC}/websieve.pl ${PREFIX}/www/cgi-bin
+ @${MKDIR} ${PREFIX}/etc/websieve
+ @${INSTALL_DATA} ${WRKSRC}/websieve.conf ${PREFIX}/etc/websieve/websieve.conf.sample
+ @${INSTALL_DATA} ${WRKSRC}/funclib.pl ${PREFIX}/etc/websieve
+ @@${SED} 's,%%PREFIX%%,${PREFIX},g' ${.CURDIR}/pkg-message > ${PKGMESSAGE}
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/mail/websieve/distinfo b/mail/websieve/distinfo
new file mode 100644
index 000000000000..6e94d0e47405
--- /dev/null
+++ b/mail/websieve/distinfo
@@ -0,0 +1 @@
+MD5 (websieve-0.61.tar.gz) = 5f2d01a2479f8cdd8e2ea4fd1a09163e
diff --git a/mail/websieve/files/patch-funclib.pl b/mail/websieve/files/patch-funclib.pl
new file mode 100644
index 000000000000..be0e951d1e2f
--- /dev/null
+++ b/mail/websieve/files/patch-funclib.pl
@@ -0,0 +1,11 @@
+--- funclib.pl.orig Mon Sep 24 14:50:50 2001
++++ funclib.pl Wed Apr 23 19:24:59 2003
+@@ -51,7 +51,7 @@
+ $IMAPERROR=$imap->{'Error'} unless (defined(@tmp) && scalar(@tmp) > 1);
+ return unless (defined(@tmp) && scalar(@tmp) > 1);
+ #recreate array and remove extra spaces - fixes array properly
+- @tmp=($tmp[3],$tmp[4],$tmp[5]);
++# @tmp=($tmp[3],$tmp[4],$tmp[5]);
+ return @tmp;
+
+ }
diff --git a/mail/websieve/files/patch-websieve.conf b/mail/websieve/files/patch-websieve.conf
new file mode 100644
index 000000000000..13e7ccb3fcf7
--- /dev/null
+++ b/mail/websieve/files/patch-websieve.conf
@@ -0,0 +1,76 @@
+--- websieve.conf.orig Fri Apr 25 15:55:52 2003
++++ websieve.conf Fri Apr 25 16:02:55 2003
+@@ -1,10 +1,10 @@
+ #Websieve configuration file
+
+ #set $useldapextras=1 to use Jules Agee's ldap administration functions
+-$useldapextras=1;
++$useldapextras=0;
+
+ #set $useauth=1 to use ldap (for ldap password changes)
+-$useauth=1;
++$useauth=0;
+ $LDAP_SERVER='localhost';
+ $LDAP_BASEDN='o=toshiba of canada,c=ca';
+ $ENCRYPT_PASS=1;
+@@ -16,17 +16,17 @@
+ # You can write you own functions to change passwords on a different auth
+ # mechanism such as on a MysSql server, Qualcomm poppassd server, etc.
+
+-require "./custom.pl";
++#require "/usr/local/etc/websieve/custom.pl";
+
+ #secret key - CHANGE THIS to some random data!!!!
+ $skey = "your secret key CEDEFEKJKIIEIOO***#KIKIDKKEUIULJLJKJ";
+ #use RC4 algorithm for encryption instead of rot13
+ $userc4=1;
+ #cyrus admin user id that is used for general mailbox administration
+-$cyrusadminuid='admin';
++$cyrusadminuid='cyrus';
+
+ # default imap server host name
+-$imapserver='imap.toshiba.ca';
++$imapserver='localhost';
+
+ #make sure you set this to your program virtual name and path
+ #$program_url = "/cgi-bin/websieve.pl" ; # URL for this program
+@@ -36,7 +36,7 @@
+ $imapport='143';
+
+ #your mail domain
+-$maildomain='test.toshiba.ca' ;
++$maildomain='example.com' ;
+
+ #default FQHN of the mail server for use in vacation addresses
+ $mailhostappend="imap.$maildomain";
+@@ -60,10 +60,8 @@
+ #$sieveport,$imapport,$maildomain, $imapserver and $usexxxSSL will be used instead.
+
+ %server_hosts=(
+-"imap.toshiba.ca"=>['Local Server','143','2000','toshiba.ca','imap.toshiba.ca'],
+-"otherhost"=>['Some otherhost','993','2000','maildomain2','vacationhost2','ssl_imap'],
+-"mtl.toshiba.ca"=>['Mtl Server','143','2000','toshiba.ca','mtl.toshiba.ca'],
+-"otherhostname"=>['other Imap Server','143','2000','other.toshiba.ca','vacationhost3']
++"localhost"=>['Local Server','143','2000','example.com','example.com'],
++"127.0.0.1"=>['Secure Server','993','2000','example.com','example.com','ssl_imap']
+ );
+
+ # show server selection option at login otherwise defaults to $imapserver
+@@ -85,7 +83,7 @@
+ $header1="Mail Account Management";
+
+ # This is the address that supports your mail server
+-$problem_email="administrator\@$maildomain" ;
++$problem_email="postmaster\@$maildomain" ;
+
+ # list of additional namespaces on IMAP server
+ @namespaces = ("public2");
+@@ -183,7 +181,7 @@
+
+ # Menu selections
+ $LOGOUTURL="<a href=$program_url?op=logout>[LOGOUT]</a>" if !$LOGOUTURL;
+-$HOMEURL="<a href=/index.html>[HOME]</a>";
++$HOMEURL="<a href=/>[HOME]</a>";
+ $HELPURL="<a href=/mailhelp.html>[HELP]</a>";
+ $VIEWRULESURL="<a href=$program_url?op=viewrules>[View/Edit Rules]</a>";
+ $FORWARDALLURL="<a href=$program_url?op=forward>[Forward Mail]</a>";
diff --git a/mail/websieve/files/patch-websieve.pl b/mail/websieve/files/patch-websieve.pl
new file mode 100644
index 000000000000..2a59764d89c7
--- /dev/null
+++ b/mail/websieve/files/patch-websieve.pl
@@ -0,0 +1,190 @@
+--- websieve.pl.orig Mon Sep 17 01:23:49 2001
++++ websieve.pl Fri Apr 25 19:49:30 2003
+@@ -301,7 +301,7 @@
+ }
+
+ print "</TABLE></TD></TABLE>";
+- print "<b>NOTE:&nbspYou will lose ALL changes made to a script in advanced mode if you switch back to basic mode.</b>" if ($mode eq 'advanced' && $op eq 'advanced');
++ print "<b>NOTE:&nbsp;You will lose ALL changes made to a script in advanced mode if you switch back to basic mode.</b>" if ($mode eq 'advanced' && $op eq 'advanced');
+ }
+
+
+@@ -405,7 +405,7 @@
+ else {
+ $change=1 ;
+ param('mbx',$mbx);
+- print hidden('mbx');
++ #print hidden('mbx');
+ }
+ }
+ if (!$mbx || !(( $acl && $useracl) || $maxquota)) {
+@@ -547,7 +547,7 @@
+ }
+ @tmpbox=@mailboxes;
+ print "<TR><TD >",popup_menu('selectedmbx',[@aclview],' ') if ($shortacl);
+- print "&nbsp&nbsp".submit('Select Folder')."&nbsp".submit('Up One Level')."</TD></TR>" if ($shortacl && $ismanager);
++ print "&nbsp;&nbsp;".submit('Select Folder')."&nbsp;".submit('Up One Level')."</TD></TR>" if ($shortacl && $ismanager);
+
+ print "</TABLE>";
+ print "</TD></TABLE>";
+@@ -567,10 +567,10 @@
+ if (!$ismanager) {
+ print popup_menu('mbx',[@tmpbox],' ')."</TD></TR>";
+ } else {
+- print textfield("mbx","",48)."&nbsp&nbsp&nbsp".submit("Select","Select $subtext")."&nbsp&nbsp(Wildcards allowed [*])</TD></TR>";
++ print textfield("mbx","",48)."&nbsp;&nbsp;&nbsp;".submit("Select","Select $subtext")."&nbsp;&nbsp;(Wildcards allowed [*])</TD></TR>";
+ }
+ print "<TR><TD $cb ><b>Foreign User ID:</b></TD>";
+- print "<TD $cb>".textfield("acluser")."&nbsp(User ID to assign access rights) &nbsp".submit("Set Acl")."</TD></TR>";
++ print "<TD $cb>".textfield("acluser")."&nbsp;(User ID to assign access rights) &nbsp;".submit("Set Acl")."</TD></TR>";
+
+ print "<TD><b> General Rights:</b></TD><TD $cb>".radio_group('rights',[@rights],"-",'',\%rightshash)."</TD></TR>";
+ print "<TR><TD $cb><b>Specific Rights:</b></TD><TD $cb>".checkbox_group('acl',[@acls],'','',\%aclhash)."</TD></TR>";
+@@ -580,7 +580,7 @@
+ param('aclmaxquota',$imapquota[2]);
+ print "<TR><TD><$cb><B>Disk Quota Limit (KB):</b></TD><TD $cb>";
+ print textfield('aclmaxquota',$imapquota[2],20,40);
+- print "&nbsp&nbsp<b>Disk Quota Used (KB):</b>&nbsp&nbsp".$imapquota[1]."&nbsp&nbsp".submit("Set Quota")."</TD></TR>";
++ print "&nbsp;&nbsp;<b>Disk Quota Used (KB):</b>&nbsp;&nbsp;".$imapquota[1]."&nbsp;&nbsp;".submit("Set Quota")."</TD></TR>";
+ }
+ print "</TABLE>";
+ print "</TD></TABLE>",br;
+@@ -592,10 +592,10 @@
+ param('delmailbox','');
+ param('newmbx','');
+ param('partition','');
+- print "<TR><TD $cb ><b>$subtext to Create:</b></TD><TD $cb>".textfield("newmbx")."&nbsp&nbsp";
++ print "<TR><TD $cb ><b>$subtext to Create:</b></TD><TD $cb>".textfield("newmbx")."&nbsp;&nbsp;";
+ print "<b>Partition: </b>",textfield("partition") if $ismanager;
+- print"&nbsp&nbsp". submit('Create Mailbox',"Create $subtext")."&nbsp&nbsp</TR>";
+- print "<TR><TD $cb ><b>$subtext to Delete:</b></TD><TD $cb>".textfield("delmailbox")."&nbsp&nbsp&nbsp".submit("Delete This Mailbox","Delete $subtext")."</tr>" if $ismanager;
++ print"&nbsp;&nbsp;". submit('Create Mailbox',"Create $subtext")."&nbsp;&nbsp;</TR>";
++ print "<TR><TD $cb ><b>$subtext to Delete:</b></TD><TD $cb>".textfield("delmailbox")."&nbsp;&nbsp;&nbsp;".submit("Delete This Mailbox","Delete $subtext")."</tr>" if $ismanager;
+
+ print "</TABLE>";
+ print "</TD></TABLE>";
+@@ -1046,7 +1046,7 @@
+ if (!$rulecount) {
+ print " [No Rules avalailable]<br>";
+ }
+- print "<hr><center>",submit('Save Changes'),"&nbsp&nbsp",submit("Refresh"),"&nbsp&nbsp",reset("Reset Values"),"</center>";
++ print "<hr><center>",submit('Save Changes'),"&nbsp;&nbsp;",submit("Refresh"),"&nbsp;&nbsp;",reset("Reset Values"),"</center>";
+
+ } # if viewrules
+ if (($op eq 'addrule' || $modrule) && ($op ne 'forward')) {
+@@ -1057,8 +1057,8 @@
+ print "<center><b>New Rule Entry for user: </b>$uid</center></TD></TR><TR $cb><TD>";
+ print "<TABLE >";
+ print "<TR $cb><TD><b>Rule#: </b>[$rulecount]";
+- print "&nbsp&nbsp<b>Priority: </b>",textfield("rules.priority.$rulecount",$spriority,2);
+- print "&nbsp&nbsp<b>Status: </b>",popup_menu("rules.ruletype.$rulecount",[@ruletype],'ENABLED'),"</TD><TD></TR>";
++ print "&nbsp;&nbsp;<b>Priority: </b>",textfield("rules.priority.$rulecount",$spriority,2);
++ print "&nbsp;&nbsp;<b>Status: </b>",popup_menu("rules.ruletype.$rulecount",[@ruletype],'ENABLED'),"</TD><TD></TR>";
+ my @checked;
+ my @checkvalues=("copy","keep");
+ push @checkvalues,"regex" if $useregex;
+@@ -1096,23 +1096,23 @@
+ param("rules.searchflg.$rulecount","$ssearchflg");
+ print popup_menu("rules.searchflg.$rulecount",[@flgsts],$ssearchflg,\%searchflghash);
+ }
+- print " field(s):</b></TD><TD $cb>&nbsp 'from' contains ",
++ print " field(s):</b></TD><TD $cb>&nbsp; 'from' contains ",
+ "</TD><TD $cb >";
+ param("rules.from.$rulecount","$sfrom");
+ print textfield("rules.from.$rulecount","$sfrom",50),"</TD></TR>";
+
+ ############# TO field
+ print "<TR>";
+- print "<TD $cb align=right>&nbsp</TD><TD $cb >";
+- print "&nbsp 'to' contains ",
++ print "<TD $cb align=right>&nbsp;</TD><TD $cb >";
++ print "&nbsp; 'to' contains ",
+ "</TD><TD $cb >";
+ param("rules.to.$rulecount","$sto");
+ print textfield("rules.to.$rulecount","$sto",50),"</TD></TR>";
+
+ ########### SUBJECT field
+ print "<TR></TD>";
+- print "<TD $cb align=right>&nbsp</TD><TD $cb>";
+- print "&nbsp 'subject' contains ",
++ print "<TD $cb align=right>&nbsp;</TD><TD $cb>";
++ print "&nbsp; 'subject' contains ",
+ "</TD><TD $cb>";
+ param("rules.subject.$rulecount","$ssubject");
+ print textfield("rules.subject.$rulecount","$ssubject",50),"</TD></TR>";
+@@ -1154,26 +1154,26 @@
+
+ ############## Action REDIRECT
+ param("rules.forward.$rulecount","$sdest1");
+- print "<TD $cb>&nbsp</TD><TD $cb><input type=radio $check1 name=rules.desttype.$rulecount value=\"address\"> Forward To </TD><TD $cb>";
++ print "<TD $cb>&nbsp;</TD><TD $cb><input type=radio $check1 name=rules.desttype.$rulecount value=\"address\"> Forward To </TD><TD $cb>";
+ print textfield("rules.forward.$rulecount",$sdest1,50)," (Email Address) </TD></TR><TR>";
+
+ ############### Action REPLY WITH
+ if ($usereply) {
+
+ param("rules.reply.$rulecount","$sdest2") if (defined $sdest2);
+- print "<TD $cb>&nbsp</TD><TD $cb valign=top><input type=radio $check2 name=rules.desttype.$rulecount value=\"reply\"> Reply With </TD><TD $cb>";
++ print "<TD $cb>&nbsp;</TD><TD $cb valign=top><input type=radio $check2 name=rules.desttype.$rulecount value=\"reply\"> Reply With </TD><TD $cb>";
+ print textarea("rules.reply.$rulecount",$sdest2,2,43)," (Text Message) </TD></TR>";
+
+ }
+ ############## Action Reject
+ if ($usereject) {
+ param("rules.reject.$rulecount","$sdest3");
+- print "<TD $cb>&nbsp</TD><TD $cb valign=top><input type=radio $check3 name=rules.desttype.$rulecount value=\"reject\"> Reject </TD><TD $cb>";
++ print "<TD $cb>&nbsp;</TD><TD $cb valign=top><input type=radio $check3 name=rules.desttype.$rulecount value=\"reject\"> Reject </TD><TD $cb>";
+ print textarea("rules.reject.$rulecount",$sdest3,2,43)," (Text Message) </TD></TR>";
+ }
+ ############## Action Discard
+ if ($usediscard) {
+- print "<TD $cb>&nbsp</TD><TD $cb valign=top><input type=radio $check4 name=rules.desttype.$rulecount value=\"discard\"> Discard </TD><TD $cb>&nbsp</TD></TR>";
++ print "<TD $cb>&nbsp;</TD><TD $cb valign=top><input type=radio $check4 name=rules.desttype.$rulecount value=\"discard\"> Discard </TD><TD $cb>&nbsp;</TD></TR>";
+ }
+
+ ############### Action CustomCode
+@@ -1196,7 +1196,7 @@
+ print hr,"<TABLE ><TR><TD >$wild</TD></TABLE>";
+
+ $rulecount--;
+- print hr,"<center>",submit("Save Rule "),"&nbsp&nbsp",reset('Clear'),"</center>";
++ print hr,"<center>",submit("Save Rule "),"&nbsp;&nbsp;",reset('Clear'),"</center>";
+
+ } # if addrule
+
+@@ -1248,7 +1248,7 @@
+ print "<TD $cb><b>Server: </b>$imapserver</TD><TD $cb><b>Userid: </b>$uid</TD>";
+ print "<TD $cb><b>Used Quota: </b>";
+ if ($percent ne "") {
+- print "[<b>$quota[1]</b> kbytes used /<b> $quota[2]</b> kbytes available.($percent\% usage)]</TD>";
++ print "[<b>$quota[1]</b> kbytes used /<b> $quota[2]</b> kbytes available. ($percent\% usage)]</TD>";
+ } else {
+ print "<TD $cb><b>$quota[1]</b> No limits</TD>";
+ };
+@@ -1387,7 +1387,7 @@
+ print start_form(-action=>$program_url);
+ $gomodifyit = 'yes';
+ print hidden('s',$sencode_params) if $useservercookie;
+- print "<center>",submit('Save Changes'),"&nbsp&nbsp",submit("Refresh"),"&nbsp&nbsp",reset('Reset Values'),"</center>" if $op;
++ print "<center>",submit('Save Changes'),"&nbsp;&nbsp;",submit("Refresh"),"&nbsp;&nbsp;",reset('Reset Values'),"</center>" if $op;
+ param('op',$op);
+ if (param('action') && param('action') eq 'deletembx') {
+ &deleteimapmailbox;
+@@ -1407,7 +1407,7 @@
+ &initscripts(%scripts);
+ if ($op eq 'setacl') {
+ &viewacl if $useacl;
+- print "<hr><center>",submit('Save Changes'),"&nbsp&nbsp",submit("Refresh"),"&nbsp&nbsp",reset('Reset Values'),"</center>";
++ print "<hr><center>",submit('Save Changes'),"&nbsp;&nbsp;",submit("Refresh"),"&nbsp;&nbsp;",reset('Reset Values'),"</center>";
+
+ }
+ if ($mode =~ /basic/i && $op ne 'setacl') {
+@@ -1420,7 +1420,7 @@
+ # print "printing $op<br>";
+
+ &printscript($scripts{'script'}) ;
+- print "<hr><center>",submit('Save Changes'),"&nbsp&nbsp",submit("Refresh"),"&nbsp&nbsp",reset('Reset Values'),"</center>";
++ print "<hr><center>",submit('Save Changes'),"&nbsp;&nbsp;",submit("Refresh"),"&nbsp;&nbsp;",reset('Reset Values'),"</center>";
+
+
+ }
diff --git a/mail/websieve/pkg-descr b/mail/websieve/pkg-descr
new file mode 100644
index 000000000000..3a975d03b93d
--- /dev/null
+++ b/mail/websieve/pkg-descr
@@ -0,0 +1,9 @@
+A web based easy to use interface for creating Sieve scripts on an Cyrus
+IMAP mail server as well as allowing users to set access controls, create
+new mailboxes and view their mail quota. Also give administrators full
+administrative capabilities.
+
+Author: Alain Turbide <aturbide@toshiba.ca>
+
+
+WWW: http://sourceforge.net/projects/websieve
diff --git a/mail/websieve/pkg-message b/mail/websieve/pkg-message
new file mode 100644
index 000000000000..738f92c70493
--- /dev/null
+++ b/mail/websieve/pkg-message
@@ -0,0 +1,6 @@
+Websieve has been installed at <http://localhost/cgi-bin/websieve.pl>
+
+However, before you can use the program, you should copy the file
+"websieve.conf.sample" in %%PREFIX%%/etc/websieve to "websieve.conf"
+edit it to suit your needs. Use "openssl rand -base64 39" to create
+a new secret key.
diff --git a/mail/websieve/pkg-plist b/mail/websieve/pkg-plist
new file mode 100644
index 000000000000..322c9a7d4df4
--- /dev/null
+++ b/mail/websieve/pkg-plist
@@ -0,0 +1,4 @@
+www/cgi-bin/websieve.pl
+etc/websieve/websieve.conf.sample
+etc/websieve/funclib.pl
+@dirrm etc/websieve