getting started with mail/openwebmail-devel

Jeremy C. Reed reed at reedmedia.net
Mon Apr 11 20:54:12 PDT 2005


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:

<VirtualHost *:80>
  ServerAdmin webmaster at 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
  <Location /openwebmail>
    SetHandler speedycgi-script
    Options ExecCGI
    allow from all
   </Location>
</VirtualHost>

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/




More information about the freebsd-questions mailing list