From owner-freebsd-ports@FreeBSD.ORG Sun Sep 23 10:43:05 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2EBA16A417 for ; Sun, 23 Sep 2007 10:43:05 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id E503413C469 for ; Sun, 23 Sep 2007 10:43:04 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.14.1/8.14.1) with ESMTP id l8NAgvX1072224; Sun, 23 Sep 2007 11:42:59 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <46F64331.5040202@infracaninophile.co.uk> Date: Sun, 23 Sep 2007 11:42:57 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: Martin Schweizer References: <46F23776.4080503@infracaninophile.co.uk> <380ccfd60709210136v2a90cf1ehaff94ab66bce0f98@mail.gmail.com> <46F3DB2C.4010408@infracaninophile.co.uk> <380ccfd60709211011u1c4a17f5ofd20843d4c4b683@mail.gmail.com> In-Reply-To: <380ccfd60709211011u1c4a17f5ofd20843d4c4b683@mail.gmail.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Sun, 23 Sep 2007 11:42:59 +0100 (BST) X-Virus-Scanned: ClamAV 0.91.2/4365/Sun Sep 23 10:50:53 2007 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-ports@freebsd.org Subject: Re: mail/websieve -- doesn't get along with apache22 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2007 10:43:05 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Martin Schweizer wrote: > Hello Matthew > > If I can help you in any way drop me a mail. > > Regards, > > > 2007/9/21, Matthew Seaman : > Martin Schweizer wrote: >>>> Hello Matthew >>>> >>>> Sorry for the delay. I use now websieve since two years. I found some >>>> pitfalls while the installation. I attache you my comments which I >>>> send to ports@ in the past. Hope this helpls. >>>> >>>> PS: I also looking to contact the developers for future releases but >>>> they do not get answers. >>>> >>>> >>>> Kind regards, >>>> >>>> After more the one successfully installation I found some problems in >>>> the actualy ports (from yesterday): >>>> >>>> - while building websieve make wants download every time the old apache port >>>> >>>> Makefile >>>> ********* >>>> [snip] >>>> >>>> RUN_DEPENDS= ${SITE_PERL}/IMAP/Admin.pm:${PORTSDIR}/mail/p5-IMAP-Admin \ >>>> ${SITE_PERL}/IMAP/Sieve.pm:${PORTSDIR}/mail/p5-IMAP-Sieve >>>> .endif >>>> ## RUN_DEPENDS+= ${LOCALBASE}/www/cgi-bin:${PORTSDIR}/${APACHE_PORT} >>>> >>>> PKGMESSAGE= ${WRKDIR}/pkg-message >>>> >>>> [snip] >>>> >>>> I alway commented out "RUN_DEPENDS..." This was already dealt with in ports/116493 -- I've taken out any dependency on a particular HTTP server. As this is bog standard perl CGI scripting, it should work with just about every webserver out there. >>>> >>>> - ... also while building make would copy websieve.pl to >>>> /usr/local/www/cgi-bin but it create a file called cgi-bin in >>>> /usr/local/www >>>> >>>> >>>> - websieve.pl: Also dealt with by making the port install into ${WWWDIR} -- which will evaluate to /usr/local/www/websieve in most cases. >>>> [snip] >>>> >>>> #creates global variables $mode,@rules,@mailboxes,@quota and %vacation; >>>> # get quota >>>> @quota=&getquota("INBOX") if ($havequota || !$useprocmail); >>>> if ($IMAPERROR = /no errors/i && !$ismanager && $IMAPERROR) { >>>> $error=$IMAPERROR; >>>> &closeimap; >>>> &closesieve; >>>> &incorrect_login; >>>> exit; >>>> } >>>> >>>> [snip] >>>> >>>> >>>> In the port there is here ("if ($IMAPERROR =~ /no..." ) a tile sign >>>> but for successfully login you have to remove this. >>>> >>>> See also http://www.linuxnetmag.com/en/issue8/printm8sieve1.html Hmmm... yes. My German isn't as good as it should be, and Google auto-translation produces quite odd results if you tell it to translate perl code from German into English... Anyway, the correct fix is to change that 'if' statement to: if ($IMAPERROR !~ /no errors/i && !$ismanager && $IMAPERROR) { Your fix of using '=' is actually assigning $IMAPERROR with the result of comparing the default variable ($_) against the regexp /no errors/i -- which happens to always return False, so the test will never succeed even if there is some error condition that needs to be handled. I've updated the PR. >>>> - error "base64 decoding..." in /var/log/messages >>>> >>>> Sep 7 15:47:22 acsvfbsd04 imap[547]: login: mail3 [192.168.10.6] >>>> martin plaintext User logged in >>>> Sep 7 15:47:22 acsvfbsd04 sieve[548]: badlogin: mail3[192.168.10.6] >>>> PLAIN error base64 decoding string >>>> Sep 7 15:47:34 acsvfbsd04 imap[547]: login: mail3 [192.168.10.6] root >>>> plaintext User logged in >>>> Sep 7 15:47:34 acsvfbsd04 sieve[551]: badlogin: mail3[192.168.10.6] >>>> PLAIN error base64 decoding string >>>> >>>> Here you have to edit in /usr/local/lib/perl5/site_perl/5.8.8/IMAP >>>> the file Sieve.pm: >>>> >>>> Old: >>>> $encode=encode_base64($userpass); >>>> >>>> New: >>>> $encode=encode_base64($userpass, ''); >>>> >>>> See also http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2006-June/091540.html This seems to have already been fixed in the IMAP::Sieve module I have installed from ports. >>>> >>>> - If you change the location from /var/imap to another location (f.e. >>>> to /usr/imap >>>> because you need more disk space), you'll get the following message >>>> in /var/log/messages: >>>> >>>> Sep 7 16:05:25 acsvfbsd04 imap[656]: login: acsvfbsd04 [192.168.10.6] >>>> martin plaintext User logged in >>>> Sep 7 16:05:25 acsvfbsd04 sieve[682]: IOERROR: creating directory >>>> /var/imap: Permission denied >>>> Sep 7 16:05:25 acsvfbsd04 sieve[682]: mkdir /var/imap: Permission denied >>>> Sep 7 16:05:25 acsvfbsd04 sieve[682]: error in actions_setuser() >>>> >>>> Websieve wants to creat some file in /var/imap everytime you log in. I >>>> create an symlink like this: >>>> >>>> lrwxr-xr-x 1 cyrus cyrus 18 7 Sep 16:23 imap -> /usr/imap/var/imap >>>> >>>> Afterwoods I works like a charme. Ah -- this isn't websieve. It's timsieved -- the bit of Cyrus IMAPd that websieve connects to. It will create a hashed directory tree under /var/imap/sieve/ to hold the source and the byte-compiled versions of user sieve scripts -- but it needs that top level directory to be created initially: mkdir -p /var/imap/sieve chown -R cyrus:cyrus /var/imap/sieve For some reason, doing that is unaccountably missing from the action of the /usr/local/cyrus/bin/mkimap script. There are still some more bugs to work out, but with these patches the port is now installing something basically functional. Unfortunately ENOTIME for me to do much else with this. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG9kMx8Mjk52CukIwRCER6AJ4r0dT42m3cFNIyG7CHvGdmEHlEcQCfWXuL kJ7vRfZK9/GM3y26K5wDHrA= =cRvA -----END PGP SIGNATURE-----