2007. 1. 3. 17:27

FreeBSD + OpenWebmail - 또다른 설치 방법

FreeBSD + OpenWebmail - 또다른 설치 방법

Apache web server with cgi enabled
Perl 5.005 or above

CGI.pm-2.74.tar.gz (required)
MIME-Base64-2.12.tar.gz (required)
libnet-1.0901.tar.gz (required)
Text-Iconv-1.2.tar.gz (required)
libiconv-1.8.tar.gz (required if system doesn't support iconv)

CGI-SpeedyCGI-2.21.tar.gz (optional)
Compress-Zlib-1.21.tar.gz (optional)
ispell-3.1.20.tar.gz (optional)
Quota-1.4.6.tar.gz (optional)
Authen-PAM-0.12.tar.gz (optional)
ImageMagick-5.5.3.tar.gz (optional)

여기서 아파치는 CGI를 사용할수 있게 설정되 있어야한다.
ports에서 설치했다면 이미 사용할수 있게 되어있다.

http://openwebmail.com/openwebmail/download/packages/
필요한 페키지를 위의 사이트에서 다운로드 한다.


For CGI.pm do the following:

cd /tmp
tar -zxvf CGI.pm-2.74.tar.gz
cd CGI.pm-2.74
perl Makefile.PL
make
make install

ps: It is reported that Open Webmail will hang in attachment uploading
when used with older version of CGI module. We recommend using CGI
version 2.74 or above for Open WebMail.
To check the version of your CGI module :

perl -MCGI -e 'print $CGI::VERSION'


For MIME-Base64 do the following:

cd /tmp
tar -zxvf MIME-Base64-2.12.tar.gz
cd MIME-Base64-2.12
perl Makefile.PL
make
make install

ps: Though you may already have the MIME-Base64 perl module,
we recommended you install MIME-Base64 module from source.
This would enable the XS support in this module which greatly
improves the encoding/decoding speed of MIME attachment.


For libnet do the following:

cd /tmp
tar -zxvf libnet-1.0901.tar.gz
cd libnet-1.0901
perl Makefile.PL (ans 'no' if asked to update configuration)
make
make install


For Text-Iconv-1.2 do the following:

Since Text-Iconv-1.2 is actually a perl interface to the underlying iconv()
support, you have to check if iconv() support is available in your system.
Please type the following command

man iconv

If there is no manual page for iconv, your system may not support iconv().
Don't worry, you can have the iconv() support by installing libiconv package.

cd /tmp
tar -zxvf libiconv-1.8.tar.gz
cd libiconv-1.8
./configure
make
make install

Type 'man iconv' again to make sure the libiconv is successfully installed.
Then we start to install the Text-Iconv package

cd /tmp
tar -zxvf Text-Iconv-1.2.tar.gz
cd Text-Iconv-1.2
perl Makefile.PL

ps: if your system is FreeBSD, or you just installed libiconv manually,
please edit the Makefile.PL and change the LIBS and INC lines
to the following before doing 'perl Makefile.PL'

'LIBS' => ['-L/usr/local/lib -liconv'], # e.g., '-lm'
'INC' => '-I/usr/local/include', # e.g., '-I/usr/include/other'

make
make test

ps: If the 'make test' failed, it means you set wrong value for LIBS and
INC in Makefile.PL or your iconv support is not complete.
You may copy the uty/iconv.pl.fake to iconv.pl to make openwebmail work
without iconv support.

make install


INSTALL OPENWEBMAIL
-------------------
The latest released or current version is available at
http://openwebmail.com/openwebmail/

If you are using FreeBSD and install apache with pkg_add,
then just

1. chmod 4555 /usr/bin/suidperl

2. cd /usr/local/www
tar -zxvBpf openwebmail-X.XX.tgz

3. modify /usr/local/www/cgi-bin/openwebmail/etc/openwebmail.conf for your need.

4. execute /usr/local/www/cgi-bin/openwebmail/openwebmail-tool.pl --init


ps: If you are using RedHat 7.x (or most Linux) with Apache

1. cd /var/www
tar -zxvBpf openwebmail-X.XX.tgz
mv data/openwebmail html/
rmdir data

2. cd /var/www/cgi-bin/openwebmail
modify auth_unix.pl
a. set variable $unix_passwdfile_encrypted to '/etc/shadow'
b set variable $unix_passwdmkdb to 'none'

3. modify /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
a. set mailspooldir to '/var/spool/mail'
b. set ow_htmldir to '/var/www/html/openwebmail'
set ow_cgidir to '/var/www/cgi-bin/openwebmail'
c. set spellcheck to '/usr/bin/ispell'
d. change default_signature for your need
e. other changes you want

4. add
/var/log/openwebmail.log {
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
to /etc/logrotate.d/syslog to enable logrotate on openwebmail.log

5. execute /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

If you are using RedHat 6.2, please use /home/httpd instead of /var/www
ps: It is highly recommended to read the doc/RedHat-README.txt(contributed by
elitric.AT.yahoo.com) if you are installing Open WebMail on RedHat Linux.

ps: Thomas Chung (tchung.AT.openwebmail.org) maintains the rpm for all
released and current version of openwebmail, It is available at
http://openwebmail.com/openwebmail/download/redhat/rpm/
You can get openwebmail working in 5 minutes with this :)

If you are using other UNIX with apache, that is okay

Try to find the parent directory of both your data and cgi-bin directory,
eg: /usr/local/apache/share, then

1. cd /usr/local/apache/share
tar -zxvBpf openwebmail-X.XX.tgz
mv data/openwebmail htdocs/
rmdir data

2. modify /usr/local/apache/share/cgi-bin/openwebmail/etc/openwebmail.conf
a. set mailspooldir to where your system mail spool is
b. set ow_htmldir to '/usr/local/apache/share/htdocs'
set ow_cgidir to '/usr/local/apache/share/cgi-bin'
c. set spellcheck to '/usr/local/bin/ispell'
d. change default_signature for your need
e. other changes you want

3. cd /usr/local/apache/share/cgi-bin/openwebmail

modify openwebmail*.pl
change the #!/usr/bin/suidperl to the location where your suidperl is.

modify auth_unix.pl
a. set variable $unix_passwdfile_encrypted to '/etc/shadow'
b set variable $unix_passwdmkdb to 'none'

4. execute /usr/local/apache/share/cgi-bin/openwebmail/openwebmail-tool.pl --init

ps:If you are installing Open WebMail on Solaris, please put
'the path of your openwebmail cgi directory' in the first line of
file /etc/openwebmail_path.conf.

For example, if the script is located at

/usr/local/apache/share/cgi-bin/openwebmail/openwebmail.pl,

then the content of /etc/openwebmail_path.conf should be:

/usr/local/apache/share/cgi-bin/openwebmail

ps: If you are using Apache server 2.0 or later,
please edit your Apache Configuration file, replace

AddDefaultCharset ISO-8859-1

with

AddDefaultCharset off

여기서 지시하는데로 모두 설치한다.

여기 설정파일은 openwebmail.conf 파일이다.
별다른 내용은 없다. 처음 한글에서 문제가 생겼지만
다른 파일들과 비교한 결과 첫번째 라인에 오타인지 O 문자가 있어서 뺀거 밖엔 없다.
그리고 auth_module은 유닉스 페스워드를 그냥 사용하고 있다.ㅡㅡ
그리고 참고로 SpeedyCGI는 포트에서 p5-CGI-SpeedyCGI-2.21_3를 설치 하여 사용하였으나... 에러가 많아서 그냥 사용한다.


domainnames yerim.info
auth_module auth_unix.pl
mailspooldir /var/mail
dbm_ext .db
dbmopen_ext none
dbmopen_haslock no
ow_cgidir /usr/local/www/cgi-bin/openwebmail
ow_cgiurl /cgi-bin/openwebmail
ow_htmldir /usr/local/www/data/openwebmail
ow_htmlurl /openwebmail
logfile /var/log/openwebmail.log
spellcheck /usr/local/bin/ispell
smtpserver 127.0.0.1
default_language 'xy'


--
Open WebMail Project ( http://openwebmail.org)