FreeBSD Bugzilla – Attachment 30577 Details for
Bug 51425
New port: Websieve, a web based Cyrus IMAP user admin client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
websieve.shar
websieve.shar (text/plain), 16.66 KB, created by
Oliver Eikemeier
on 2003-04-26 01:40:08 UTC
(
hide
)
Description:
websieve.shar
Filename:
MIME Type:
Creator:
Oliver Eikemeier
Created:
2003-04-26 01:40:08 UTC
Size:
16.66 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># websieve ># websieve/Makefile ># websieve/files ># websieve/files/patch-funclib.pl ># websieve/files/patch-websieve.pl ># websieve/files/patch-websieve.conf ># websieve/distinfo ># websieve/pkg-descr ># websieve/pkg-plist ># websieve/pkg-message ># >echo c - websieve >mkdir -p websieve > /dev/null 2>&1 >echo x - websieve/Makefile >sed 's/^X//' >websieve/Makefile << 'END-of-websieve/Makefile' >X# New ports collection makefile for: websieve >X# Date created: 25 Apr 2003 >X# Whom: Oliver Eikemeier <eikemeier@fillmore-labs.com> >X# >X# $FreeBSD$ >X# >X >XPORTNAME= websieve >XPORTVERSION= 0.61 >XCATEGORIES= mail >XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} >XMASTER_SITE_SUBDIR= ${PORTNAME} >X >XMAINTAINER= eikemeier@fillmore-labs.com >XCOMMENT= Web based Cyrus IMAP user admin client >X >XRUN_DEPENDS= ${SITE_PERL}/IMAP/Admin.pm:${PORTSDIR}/mail/p5-IMAP-Admin \ >X ${SITE_PERL}/IMAP/Sieve.pm:mail/p5-IMAP-Sieve \ >X ${SITE_PERL}/CGI/Cache.pm:${PORTSDIR}/www/p5-CGI-Cache >X.if defined(WITH_APACHE2) >XRUN_DEPENDS+= ${LOCALBASE}/www/cgi-bin:${PORTSDIR}/www/apache2 >X.else >XRUN_DEPENDS+= ${LOCALBASE}/www/cgi-bin:${PORTSDIR}/www/apache13 >X.endif >X >XWRKSRC= ${WRKDIR}/${PORTNAME} >X >XUSE_REINPLACE= yes >XUSE_PERL5_RUN= yes >X >XNO_BUILD= yes >X >Xpost-configure: >X @${REINPLACE_CMD} -e "s,require[ ]*'\./\([^']*\)',require '${PREFIX}/etc/websieve/\1'," \ >X ${WRKSRC}/websieve.pl >X >Xdo-install: >X ${INSTALL_SCRIPT} ${WRKSRC}/websieve.pl ${PREFIX}/www/cgi-bin >X ${MKDIR} ${PREFIX}/etc/websieve >X ${INSTALL_DATA} ${WRKSRC}/websieve.conf ${PREFIX}/etc/websieve/websieve.conf.sample >X ${INSTALL_DATA} ${WRKSRC}/funclib.pl ${PREFIX}/etc/websieve >X >Xpost-install: >X @${SED} 's,%%PREFIX%%,${PREFIX},g' ${PKGMESSAGE} >X >X.include <bsd.port.mk> >END-of-websieve/Makefile >echo c - websieve/files >mkdir -p websieve/files > /dev/null 2>&1 >echo x - websieve/files/patch-funclib.pl >sed 's/^X//' >websieve/files/patch-funclib.pl << 'END-of-websieve/files/patch-funclib.pl' >X--- funclib.pl.orig Mon Sep 24 14:50:50 2001 >X+++ funclib.pl Wed Apr 23 19:24:59 2003 >X@@ -51,7 +51,7 @@ >X $IMAPERROR=$imap->{'Error'} unless (defined(@tmp) && scalar(@tmp) > 1); >X return unless (defined(@tmp) && scalar(@tmp) > 1); >X #recreate array and remove extra spaces - fixes array properly >X- @tmp=($tmp[3],$tmp[4],$tmp[5]); >X+# @tmp=($tmp[3],$tmp[4],$tmp[5]); >X return @tmp; >X >X } >END-of-websieve/files/patch-funclib.pl >echo x - websieve/files/patch-websieve.pl >sed 's/^X//' >websieve/files/patch-websieve.pl << 'END-of-websieve/files/patch-websieve.pl' >X--- websieve.pl.orig Mon Sep 17 01:23:49 2001 >X+++ websieve.pl Fri Apr 25 19:49:30 2003 >X@@ -301,7 +301,7 @@ >X } >X >X print "</TABLE></TD></TABLE>"; >X- print "<b>NOTE: 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'); >X+ print "<b>NOTE: 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'); >X } >X >X >X@@ -405,7 +405,7 @@ >X else { >X $change=1 ; >X param('mbx',$mbx); >X- print hidden('mbx'); >X+ #print hidden('mbx'); >X } >X } >X if (!$mbx || !(( $acl && $useracl) || $maxquota)) { >X@@ -547,7 +547,7 @@ >X } >X @tmpbox=@mailboxes; >X print "<TR><TD >",popup_menu('selectedmbx',[@aclview],' ') if ($shortacl); >X- print "  ".submit('Select Folder')." ".submit('Up One Level')."</TD></TR>" if ($shortacl && $ismanager); >X+ print " ".submit('Select Folder')." ".submit('Up One Level')."</TD></TR>" if ($shortacl && $ismanager); >X >X print "</TABLE>"; >X print "</TD></TABLE>"; >X@@ -567,10 +567,10 @@ >X if (!$ismanager) { >X print popup_menu('mbx',[@tmpbox],' ')."</TD></TR>"; >X } else { >X- print textfield("mbx","",48)."   ".submit("Select","Select $subtext")."  (Wildcards allowed [*])</TD></TR>"; >X+ print textfield("mbx","",48)." ".submit("Select","Select $subtext")." (Wildcards allowed [*])</TD></TR>"; >X } >X print "<TR><TD $cb ><b>Foreign User ID:</b></TD>"; >X- print "<TD $cb>".textfield("acluser")." (User ID to assign access rights)  ".submit("Set Acl")."</TD></TR>"; >X+ print "<TD $cb>".textfield("acluser")." (User ID to assign access rights) ".submit("Set Acl")."</TD></TR>"; >X >X print "<TD><b> General Rights:</b></TD><TD $cb>".radio_group('rights',[@rights],"-",'',\%rightshash)."</TD></TR>"; >X print "<TR><TD $cb><b>Specific Rights:</b></TD><TD $cb>".checkbox_group('acl',[@acls],'','',\%aclhash)."</TD></TR>"; >X@@ -580,7 +580,7 @@ >X param('aclmaxquota',$imapquota[2]); >X print "<TR><TD><$cb><B>Disk Quota Limit (KB):</b></TD><TD $cb>"; >X print textfield('aclmaxquota',$imapquota[2],20,40); >X- print "  <b>Disk Quota Used (KB):</b>  ".$imapquota[1]."  ".submit("Set Quota")."</TD></TR>"; >X+ print " <b>Disk Quota Used (KB):</b> ".$imapquota[1]." ".submit("Set Quota")."</TD></TR>"; >X } >X print "</TABLE>"; >X print "</TD></TABLE>",br; >X@@ -592,10 +592,10 @@ >X param('delmailbox',''); >X param('newmbx',''); >X param('partition',''); >X- print "<TR><TD $cb ><b>$subtext to Create:</b></TD><TD $cb>".textfield("newmbx")."  "; >X+ print "<TR><TD $cb ><b>$subtext to Create:</b></TD><TD $cb>".textfield("newmbx")." "; >X print "<b>Partition: </b>",textfield("partition") if $ismanager; >X- print"  ". submit('Create Mailbox',"Create $subtext")."  </TR>"; >X- print "<TR><TD $cb ><b>$subtext to Delete:</b></TD><TD $cb>".textfield("delmailbox")."   ".submit("Delete This Mailbox","Delete $subtext")."</tr>" if $ismanager; >X+ print" ". submit('Create Mailbox',"Create $subtext")." </TR>"; >X+ print "<TR><TD $cb ><b>$subtext to Delete:</b></TD><TD $cb>".textfield("delmailbox")." ".submit("Delete This Mailbox","Delete $subtext")."</tr>" if $ismanager; >X >X print "</TABLE>"; >X print "</TD></TABLE>"; >X@@ -1046,7 +1046,7 @@ >X if (!$rulecount) { >X print " [No Rules avalailable]<br>"; >X } >X- print "<hr><center>",submit('Save Changes'),"  ",submit("Refresh"),"  ",reset("Reset Values"),"</center>"; >X+ print "<hr><center>",submit('Save Changes')," ",submit("Refresh")," ",reset("Reset Values"),"</center>"; >X >X } # if viewrules >X if (($op eq 'addrule' || $modrule) && ($op ne 'forward')) { >X@@ -1057,8 +1057,8 @@ >X print "<center><b>New Rule Entry for user: </b>$uid</center></TD></TR><TR $cb><TD>"; >X print "<TABLE >"; >X print "<TR $cb><TD><b>Rule#: </b>[$rulecount]"; >X- print "  <b>Priority: </b>",textfield("rules.priority.$rulecount",$spriority,2); >X- print "  <b>Status: </b>",popup_menu("rules.ruletype.$rulecount",[@ruletype],'ENABLED'),"</TD><TD></TR>"; >X+ print " <b>Priority: </b>",textfield("rules.priority.$rulecount",$spriority,2); >X+ print " <b>Status: </b>",popup_menu("rules.ruletype.$rulecount",[@ruletype],'ENABLED'),"</TD><TD></TR>"; >X my @checked; >X my @checkvalues=("copy","keep"); >X push @checkvalues,"regex" if $useregex; >X@@ -1096,23 +1096,23 @@ >X param("rules.searchflg.$rulecount","$ssearchflg"); >X print popup_menu("rules.searchflg.$rulecount",[@flgsts],$ssearchflg,\%searchflghash); >X } >X- print " field(s):</b></TD><TD $cb>  'from' contains ", >X+ print " field(s):</b></TD><TD $cb> 'from' contains ", >X "</TD><TD $cb >"; >X param("rules.from.$rulecount","$sfrom"); >X print textfield("rules.from.$rulecount","$sfrom",50),"</TD></TR>"; >X >X ############# TO field >X print "<TR>"; >X- print "<TD $cb align=right> </TD><TD $cb >"; >X- print "  'to' contains ", >X+ print "<TD $cb align=right> </TD><TD $cb >"; >X+ print " 'to' contains ", >X "</TD><TD $cb >"; >X param("rules.to.$rulecount","$sto"); >X print textfield("rules.to.$rulecount","$sto",50),"</TD></TR>"; >X >X ########### SUBJECT field >X print "<TR></TD>"; >X- print "<TD $cb align=right> </TD><TD $cb>"; >X- print "  'subject' contains ", >X+ print "<TD $cb align=right> </TD><TD $cb>"; >X+ print " 'subject' contains ", >X "</TD><TD $cb>"; >X param("rules.subject.$rulecount","$ssubject"); >X print textfield("rules.subject.$rulecount","$ssubject",50),"</TD></TR>"; >X@@ -1154,26 +1154,26 @@ >X >X ############## Action REDIRECT >X param("rules.forward.$rulecount","$sdest1"); >X- print "<TD $cb> </TD><TD $cb><input type=radio $check1 name=rules.desttype.$rulecount value=\"address\"> Forward To </TD><TD $cb>"; >X+ print "<TD $cb> </TD><TD $cb><input type=radio $check1 name=rules.desttype.$rulecount value=\"address\"> Forward To </TD><TD $cb>"; >X print textfield("rules.forward.$rulecount",$sdest1,50)," (Email Address) </TD></TR><TR>"; >X >X ############### Action REPLY WITH >X if ($usereply) { >X >X param("rules.reply.$rulecount","$sdest2") if (defined $sdest2); >X- print "<TD $cb> </TD><TD $cb valign=top><input type=radio $check2 name=rules.desttype.$rulecount value=\"reply\"> Reply With </TD><TD $cb>"; >X+ print "<TD $cb> </TD><TD $cb valign=top><input type=radio $check2 name=rules.desttype.$rulecount value=\"reply\"> Reply With </TD><TD $cb>"; >X print textarea("rules.reply.$rulecount",$sdest2,2,43)," (Text Message) </TD></TR>"; >X >X } >X ############## Action Reject >X if ($usereject) { >X param("rules.reject.$rulecount","$sdest3"); >X- print "<TD $cb> </TD><TD $cb valign=top><input type=radio $check3 name=rules.desttype.$rulecount value=\"reject\"> Reject </TD><TD $cb>"; >X+ print "<TD $cb> </TD><TD $cb valign=top><input type=radio $check3 name=rules.desttype.$rulecount value=\"reject\"> Reject </TD><TD $cb>"; >X print textarea("rules.reject.$rulecount",$sdest3,2,43)," (Text Message) </TD></TR>"; >X } >X ############## Action Discard >X if ($usediscard) { >X- print "<TD $cb> </TD><TD $cb valign=top><input type=radio $check4 name=rules.desttype.$rulecount value=\"discard\"> Discard </TD><TD $cb> </TD></TR>"; >X+ print "<TD $cb> </TD><TD $cb valign=top><input type=radio $check4 name=rules.desttype.$rulecount value=\"discard\"> Discard </TD><TD $cb> </TD></TR>"; >X } >X >X ############### Action CustomCode >X@@ -1196,7 +1196,7 @@ >X print hr,"<TABLE ><TR><TD >$wild</TD></TABLE>"; >X >X $rulecount--; >X- print hr,"<center>",submit("Save Rule "),"  ",reset('Clear'),"</center>"; >X+ print hr,"<center>",submit("Save Rule ")," ",reset('Clear'),"</center>"; >X >X } # if addrule >X >X@@ -1248,7 +1248,7 @@ >X print "<TD $cb><b>Server: </b>$imapserver</TD><TD $cb><b>Userid: </b>$uid</TD>"; >X print "<TD $cb><b>Used Quota: </b>"; >X if ($percent ne "") { >X- print "[<b>$quota[1]</b> kbytes used /<b> $quota[2]</b> kbytes available.($percent\% usage)]</TD>"; >X+ print "[<b>$quota[1]</b> kbytes used /<b> $quota[2]</b> kbytes available. ($percent\% usage)]</TD>"; >X } else { >X print "<TD $cb><b>$quota[1]</b> No limits</TD>"; >X }; >X@@ -1387,7 +1387,7 @@ >X print start_form(-action=>$program_url); >X $gomodifyit = 'yes'; >X print hidden('s',$sencode_params) if $useservercookie; >X- print "<center>",submit('Save Changes'),"  ",submit("Refresh"),"  ",reset('Reset Values'),"</center>" if $op; >X+ print "<center>",submit('Save Changes')," ",submit("Refresh")," ",reset('Reset Values'),"</center>" if $op; >X param('op',$op); >X if (param('action') && param('action') eq 'deletembx') { >X &deleteimapmailbox; >X@@ -1407,7 +1407,7 @@ >X &initscripts(%scripts); >X if ($op eq 'setacl') { >X &viewacl if $useacl; >X- print "<hr><center>",submit('Save Changes'),"  ",submit("Refresh"),"  ",reset('Reset Values'),"</center>"; >X+ print "<hr><center>",submit('Save Changes')," ",submit("Refresh")," ",reset('Reset Values'),"</center>"; >X >X } >X if ($mode =~ /basic/i && $op ne 'setacl') { >X@@ -1420,7 +1420,7 @@ >X # print "printing $op<br>"; >X >X &printscript($scripts{'script'}) ; >X- print "<hr><center>",submit('Save Changes'),"  ",submit("Refresh"),"  ",reset('Reset Values'),"</center>"; >X+ print "<hr><center>",submit('Save Changes')," ",submit("Refresh")," ",reset('Reset Values'),"</center>"; >X >X >X } >END-of-websieve/files/patch-websieve.pl >echo x - websieve/files/patch-websieve.conf >sed 's/^X//' >websieve/files/patch-websieve.conf << 'END-of-websieve/files/patch-websieve.conf' >X--- websieve.conf.orig Fri Apr 25 15:55:52 2003 >X+++ websieve.conf Fri Apr 25 16:02:55 2003 >X@@ -1,10 +1,10 @@ >X #Websieve configuration file >X >X #set $useldapextras=1 to use Jules Agee's ldap administration functions >X-$useldapextras=1; >X+$useldapextras=0; >X >X #set $useauth=1 to use ldap (for ldap password changes) >X-$useauth=1; >X+$useauth=0; >X $LDAP_SERVER='localhost'; >X $LDAP_BASEDN='o=toshiba of canada,c=ca'; >X $ENCRYPT_PASS=1; >X@@ -16,17 +16,17 @@ >X # You can write you own functions to change passwords on a different auth >X # mechanism such as on a MysSql server, Qualcomm poppassd server, etc. >X >X-require "./custom.pl"; >X+#require "/usr/local/etc/websieve/custom.pl"; >X >X #secret key - CHANGE THIS to some random data!!!! >X $skey = "your secret key CEDEFEKJKIIEIOO***#KIKIDKKEUIULJLJKJ"; >X #use RC4 algorithm for encryption instead of rot13 >X $userc4=1; >X #cyrus admin user id that is used for general mailbox administration >X-$cyrusadminuid='admin'; >X+$cyrusadminuid='cyrus'; >X >X # default imap server host name >X-$imapserver='imap.toshiba.ca'; >X+$imapserver='localhost'; >X >X #make sure you set this to your program virtual name and path >X #$program_url = "/cgi-bin/websieve.pl" ; # URL for this program >X@@ -36,7 +36,7 @@ >X $imapport='143'; >X >X #your mail domain >X-$maildomain='test.toshiba.ca' ; >X+$maildomain='example.com' ; >X >X #default FQHN of the mail server for use in vacation addresses >X $mailhostappend="imap.$maildomain"; >X@@ -60,10 +60,8 @@ >X #$sieveport,$imapport,$maildomain, $imapserver and $usexxxSSL will be used instead. >X >X %server_hosts=( >X-"imap.toshiba.ca"=>['Local Server','143','2000','toshiba.ca','imap.toshiba.ca'], >X-"otherhost"=>['Some otherhost','993','2000','maildomain2','vacationhost2','ssl_imap'], >X-"mtl.toshiba.ca"=>['Mtl Server','143','2000','toshiba.ca','mtl.toshiba.ca'], >X-"otherhostname"=>['other Imap Server','143','2000','other.toshiba.ca','vacationhost3'] >X+"localhost"=>['Local Server','143','2000','example.com','example.com'], >X+"127.0.0.1"=>['Secure Server','993','2000','example.com','example.com','ssl_imap'] >X ); >X >X # show server selection option at login otherwise defaults to $imapserver >X@@ -85,7 +83,7 @@ >X $header1="Mail Account Management"; >X >X # This is the address that supports your mail server >X-$problem_email="administrator\@$maildomain" ; >X+$problem_email="postmaster\@$maildomain" ; >X >X # list of additional namespaces on IMAP server >X @namespaces = ("public2"); >X@@ -183,7 +181,7 @@ >X >X # Menu selections >X $LOGOUTURL="<a href=$program_url?op=logout>[LOGOUT]</a>" if !$LOGOUTURL; >X-$HOMEURL="<a href=/index.html>[HOME]</a>"; >X+$HOMEURL="<a href=/>[HOME]</a>"; >X $HELPURL="<a href=/mailhelp.html>[HELP]</a>"; >X $VIEWRULESURL="<a href=$program_url?op=viewrules>[View/Edit Rules]</a>"; >X $FORWARDALLURL="<a href=$program_url?op=forward>[Forward Mail]</a>"; >END-of-websieve/files/patch-websieve.conf >echo x - websieve/distinfo >sed 's/^X//' >websieve/distinfo << 'END-of-websieve/distinfo' >XMD5 (websieve-0.61.tar.gz) = 5f2d01a2479f8cdd8e2ea4fd1a09163e >END-of-websieve/distinfo >echo x - websieve/pkg-descr >sed 's/^X//' >websieve/pkg-descr << 'END-of-websieve/pkg-descr' >XA web based easy to use interface for creating Sieve scripts on an Cyrus >XIMAP mail server as well as allowing users to set access controls, create >Xnew mailboxes and view their mail quota. Also give administrators full >Xadministrative capabilities. >X >XAuthor: Alain Turbide <aturbide@toshiba.ca> >X >X >XWWW: http://sourceforge.net/projects/websieve >END-of-websieve/pkg-descr >echo x - websieve/pkg-plist >sed 's/^X//' >websieve/pkg-plist << 'END-of-websieve/pkg-plist' >Xwww/cgi-bin/websieve.pl >Xetc/websieve/websieve.conf.sample >Xetc/websieve/funclib.pl >X@dirrm etc/websieve >END-of-websieve/pkg-plist >echo x - websieve/pkg-message >sed 's/^X//' >websieve/pkg-message << 'END-of-websieve/pkg-message' >XWebsieve has been installed at <http://localhost/cgi-bin/websieve.pl> >X >XHowever, before you can use the program, you should copy the file >X"websieve.conf.sample" in %%PREFIX%%/etc/websieve to "websieve.conf" >Xedit it to suit your needs. Use "openssl rand -base64 39" to create >Xa new secret key. >END-of-websieve/pkg-message >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 51425
: 30577 |
30578