From owner-freebsd-questions@FreeBSD.ORG Tue Apr 12 03:54:12 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE49616A4CE; Tue, 12 Apr 2005 03:54:12 +0000 (GMT) Received: from pilchuck.reedmedia.net (pilchuck.reedmedia.net [209.166.74.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id A830643D46; Tue, 12 Apr 2005 03:54:11 +0000 (GMT) (envelope-from reed@reedmedia.net) Received: from reed by pilchuck.reedmedia.net with local-esmtp (Exim 3.12 #1 (Debian)) id 1DLCTW-0000kd-00; Mon, 11 Apr 2005 20:54:06 -0700 Date: Mon, 11 Apr 2005 20:54:06 -0700 (PDT) From: "Jeremy C. Reed" To: leeym@FreeBSD.org, Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: getting started with mail/openwebmail-devel X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: reed@reedmedia.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2005 03:54:12 -0000 If there is a more appropriate list to ask these questions, please point me to it. Also, please carbon-copy me on any replies. I have installed openwebmail many times over the past four years -- mostly on Debian Linux and OpenBSD systems from source and also using Debian packages. A few years ago I patched openwebmail to take advantage of virtual users (separate passwd files and mail spool directories per domain.) At that time, I was quite familiar with the openwebmail code. So today, I attempted to install and use ports/mail/openwebmail-devel. What should be a 30 minute job has now been almost two hours. This was on a 5.2 box. I cvsup'd my ports. My first problem was that installing www/p5-CGI-SpeedyCGI port requires apxs in path -- so I added /usr/local/sbin to my path and it installed. Then I installed openwebmail-devel. I saw my httpd.conf was modified to add: LoadModule speedycgi_module libexec/apache2/mod_speedycgi.so I added the following for my apache config: ServerAdmin webmaster@txis.net DocumentRoot /usr/local/www/openwebmail ServerName mail.foo Alias /openwebmail /usr/local/www/cgi-bin/openwebmail ErrorLog /var/log/httpd/openwebmail.error_log CustomLog /var/log/httpd/openwebmail.access_log Combined SetHandler speedycgi-script Options ExecCGI allow from all I created an /usr/local/www/openwebmail directory and placed a single html file to point to http://mail.foo/openwebmail/openwebmail.pl The first time it ran, my browser said the socket unexepectedly closed. My apache error log had: [Mon Apr 11 22:46:06 2005] [error] mod_speedycgi failed: mod_speedycgi2[76803]: open temp file: Permission denied Google did not help. I had a look at openwebmail.pl. It has: #!/usr/local/bin/speedy_suidperl -T -- -T/var/run/speedy_login Well my apache children are running as www:www. So I made /var/run/speedy and chowned it www:www. Then I modified that file to use -T /var/run/speedy/speedy_login So it got past that. My next error was about logs. It was unable to create the log file. So I created a directory for the logs and chowned it to www:www and edited the openwebmail.conf to use that log directory. Then my next error was: '/usr/local/www/cgi-bin/openwebmail/openwebmail.pl' must setuid to root I have: ns: {180} % ls -l /usr/local/www/cgi-bin/openwebmail/openwebmail.pl -r-sr-xr-x 1 root mail 35887 Apr 11 22:46 /usr/local/www/cgi-bin/openwebmail/openwebmail.pl (I changed from 4755 to 4555 to see if that mattered.) ns: {181} % ls -l /usr/local/bin/speedy_suidperl -rwsr-xr-x 1 root wheel 39504 Apr 11 21:30 /usr/local/bin/speedy_suidperl Any ideas on what to do next? Where is the documentation for quickly using openwebmail-devel port with Apache and SpeedyCGI? Also, please carbon-copy me on any replies. Thank you, Jeremy C. Reed BSD News, BSD tutorials, BSD links http://www.bsdnewsletter.com/