2008. 12. 2. 13:28

OpenWebmail on FreeBSD 설치가이드

openWebmail 설치가이드

SMTP (Mail) 서버 오픈소스 진영에서 메일 서버는 sendmail, qmail, postfix의 삼각구도라고 볼 수 있습니다.
sendmail은 처음부터 있었다는 점과 다양한 설정이 가능하다는 장점을 지니고 있지만 그만큼 많은 보안 문제가 발생하고 있습니다.

그 대안으로 djbdns의 제작자가 만든 qmail과 IBM에서 공개한 소스로 개발되고 있는 postfix가 있습니다.

여기서는 간편하게 설정이 가능한 postfix를 이용토록 하겠습니다.

 

공식버젼인 postfix 포트를 설치하고 웹메일을 위해 vm-pop3d와 OpenWebmail을 설치하겠습니다.

FreeBSD에는 Port라는 설치 개념이 있기에, 아주 편리하게 OpenWebmail을 설치할수 있습니다.

 

# cd /usr/ports/mail/postfix

 

# make install clean

 

PHP에서와 같이 모듈을 선택하는 목록이 나옵니다.

 

대부분 선택없이 설치하면 되지만, 선택없이 설치하게 되면,
웹메일만 사용하는 경우가 되겠다..

(여기서 잠깐, 만약 메일 사용자들에게 인증을 통한
SMTP 기능을 부여하고 싶다면, 아래를 따라 한다.
cd /usr/ports/mail/postfix
에서 make 하여 SASL2, TLS 를 선택하고 엔터 한다.
그리고 나서 다시 make install clean 해준다.
설치가 끝나고 나면,
cd /usr/local/lib/sasl2

echo "pwcheck_method: saslauthd" > smtpd.conf
mkdir deactivated
mv *ntml* deactivated

ldd /usr/local/libexec/postfix/smtpd

/usr/local/libexec/postfix/smtpd:

libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x280a0000)        
libpam.so.2 => /usr/lib/libpam.so.2 (0x280b2000)        
libcrypt.so.2 => /lib/libcrypt.so.2 (0x280b9000)        
libssl.so.3 => /usr/lib/libssl.so.3 (0x280d1000)        
libcrypto.so.3 => /lib/libcrypto.so.3 (0x280fe000)        
libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x281f0000)        
libc.so.5 => /lib/libc.so.5 (0x281fc000)

sasl2 에 ssl 들어가 있으니 됫고~

cd /usr/local/etc/postfix
mkdir ssl ; cd ssl
openssl req -new -x509 -nodes -out smtpd.pem -keyout smtpd.pem -days 3650
정보 대강 적어주고~

vi /usr/local/etc/postfix/main.cf
myhostname 이랑 mydomain, mydestination 적어주고 맨 밑으로 가서

# sasl config
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =      #여긴비워두기
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
# tls config
smtp_use_tls = yes
smtpd_use_tls = yes
#smtpd_tls_auth_only = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_cert_file = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_CAfile = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

다음을 추가.

cd /usr/local/etc/rc.d
./saslauthd.sh start

(saslauthd.sh가 없었습니다. 그래서 검색해본 결과 saslauthd.sh 는 cyrus-sasl2-saslauthd 패키지를 설치해야 나타납니다. (/usr/port/security)

sasl 은 sasldb2.db를 이용하느냐 아니면 pwcheck를 이용하느냐에 따라 달라지는데 후자의 경우에는 cyrus-sasl2-saslauthd를 설치해야 합니다. 그리고 위의 Xandy님의 말씀데로 하면 sasl-auth가 구현됩니다.

아..saslauthd.sh도 조금 수정해야 합니다.
-a pam 을 -a getpwent로 수정해줍니다...
saslauthd_flags=${saslauthd_flags:-"-a pam"}    # Flags to saslauthd program

saslauthd_flags=${saslauthd_flags:-"-a getpwent"}       # Flags to saslauthd program

)

ln -s /usr/local/sbin/postfix postfix.sh
./postfix.sh start
자 일단 postfix 떳으니 테스트만 남았구려

telnet localhost smtp

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 zr.to ESMTP Postfix
EHLO foobar.com
250-zr.to
250-PIPELINING
250-SIZE 10240000250-VRFY
250-ETRN250-STARTTLS
250-AUTH LOGIN PLAIN OTP DIGEST-MD5 CRAM-MD
5250-AUTH=LOGIN PLAIN OTP DIGEST-MD5 CRAM-MD5
250-XVERP
250 8BITMIME

저대로 나오믄 대충 끝! 윈도에서 아웃룩 같은걸로 이제 테스트해보고 별일없으면 계속쓰기

postfix 설정에 관한건 몇가지 건너 뛰었으니 그부분은
자신이 알아서 하시오 ㅡ,.ㅡ (aliases, access 기타 이딴 파일들)



)

설치 도중 두번 사용자의 입력을 묻습니다.

설치 스크립트가 postfix란 유저와 mail이란 그룹을 추가하길 원하는가와 Postfix를 기본 메일러로 활성화할 것인가 하는 것이므로 둘다 y라고 하십시오.

그리고 직접 작업해줘야하는 사항이 나오는데 이것은 FreeBSD 시스템이 기본으로 sendmail을 시스템로그 등에서 사용하기 때문에 이것을 postfix로 대체하기 위한 사항입니다.

 

(postfix나 qmail에서는 sendmail의 이름을 가진 sendmail 대체 툴을 지원합니다.)

 

다음을 /etc/rc.conf 에 추가합니다.

 

# vi /etc/rc.conf

 

*** /etc/rc.conf ***

sendmail_enable="YES"

sendmail_flags="-bd"

sendmail_outbound_enable="NO"

sendmail_submit_enable="NO"

sendmail_msp_queue_enable="NO"

*****************

 

그리고 다음을 실행해줍니다.

 

# cd /usr/local/etc/rc.d

# ln -s /usr/local/sbin/postfix postfix.sh

 

이번엔 /etc/periodic.conf 에 다음을 추가해줍니다.

기본으로는 /etc 안에 periodic.conf 라는 파일이 없습니다.

이는 FreeBSD가 일일 관리 사항(daily maintenance)을 sendmail 전용으로 보고하기 때문입니다.

이를 비활성하는 것입니다.

 

# vi /etc/periodic.conf

 

*** /etc/periodic.conf ***

daily_clean_hoststat_enable="NO"

daily_status_mail_rejects_enable="NO"

daily_status_include_submit_mailq="NO"

daily_submit_queuerun="NO"

**********************

 

이제 드디어 postfix 설정을 합니다.

/usr/local/etc/postfix 안에 설정파일들이 있으며 여러 샘플 파일들이 있으므로 필요에 따라 참고하시면 됩니다.

# cd /usr/local/etc/postfix

# vi main.cf

 

*** /usr/local/etc/postfix ***

mydomain = mydomain.com

myorigin = $mydomain

alias_maps = hash:/etc/mail/aliases

 

************************

alias_maps 의 경우는 main.cf의 기본 설정과 FreeBSD 시스템과 차이가 있어서 적어줍니다.

aliases 파일을 수정 한 후에는 항상 다음 명령으로 aliases 데이터베이스를 업데이트해줍니다.

 

# /usr/local/sbin/postalias /etc/mail/aliases

 

여기까지처럼만하면 도메인을 하나만 가진 서버에 대한 설정으로 충분합니다.

가상 호스팅으로 다중 도메인을 써야할 경우에는 http://www.freebsddiary.org/postfix.php 를 참조하시기 바랍니다.

 

이제 vm-pop3d를 설치합니다.

 

# cd /usr/ports/mail/vm-pop3d

# make install clean

# cd /usr/local/etc/rc.d

# cp vm-pop3d.sh.example vm-pop3d.sh

 

웹메일을 위한 OpenWebmail가 Postfix와 vm-pop3d와 함께 유자가 같아야 하기 때문에 vm-pop3d의 구동시 유저 아이디를 지정해주어야 합니다.

 

# vi vm-pop3d.sh [ -x /usr/local/sbin/vm-pop3d ] && /usr/local/sbin/vm-pop3d -d && echo -n " vm-pop3d"

 

위의 부분을 다음과 같이 고쳐줍니다.

 

[ -x /usr/local/sbin/vm-pop3d ] && /usr/local/sbin/vm-pop3d -d -u postfix && echo -n " vm-pop3d"

 

이번엔 마지막으로 OpenWebmail을 설치합니다.

 

# cd /usr/ports/mail/openwebmail

# make install clean

 

이제 http://서버 주소/cgi-bin/openwebmail/openwebmail.pl

 

로 접속을 하고 로그인을 하면 처음 로그인을 했다며 설정을 하라는 화면이 나옵니다.

 

Continue 버튼을 누르면 설정 화면이 나옵니다. 윗부분의 Charset은 euc-kr 로 선택해주고 나머지는 읽어보고 구미에 맞춰 설정해줍니다.

 

혹시 윗부분의 From: 에 이메일 주소가 도메인명.도메인명.com 과 같은 식으로 제대로 나오지 않는다면 다음과 같이 해주십시오.

 

# cd /usr/local/www/cgi-bin/openwebmail/etc/

 

# vi openwebmail.conf domainnames auto

 

를 찾아서 domainnames mydomain.com 로 고쳐주면 됩니다.

 

이것은 좋은 해결책은 되지 못하겠지만 도메인을 하나만으로 운영할 경우에는 간편한 편법이 될 수 있겠습니다.

좋은 방법을 알고 계시면 알려주시기 바랍니다.

(기본설정으로 해서 메일을 보낼때 메일이 주고 받지 못하게 되면,

 

vi /usr/local/etc/postfix/main.cf 의 아래부분에서
한 부분을 주석을 제거한다.

# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
#mydestination = $myhostname, localhost.$mydomain
mydestination = $myhostname, localhost.$mydomain $mydomain
#mydestination = $myhostname, localhost.$mydomain, $mydomain,
#       mail.$mydomain, www.$mydomain, ftp.$mydomain


vi /usr/local/www/cgi-bin/openwebmail/etc/openwebmail.conf 의

domainnames를 세팅해준다. 

오픈웹메일을 사용하면서
계정사용자의 메일 용량 문제와 대용량(10메가이상) 메일을
수신하지 못하는 경우에는
vi /usr/local/etc/postfix/main.cf 에 아래의 값을 세팅해준다...

mailbox_size_limit = 0
message_size_limit = 20000000
2007. 7. 3. 15:26

Openwebmail설치후WeRecommendThatYouUpdateYourPerlPackageIfYouHaveThe”perl-suid”PackageInstalled

Describe Openwebmail설치후WeRecommendThatYouUpdateYourPerlPackageIfYouHaveThe”perl-suid”PackageInstalled. here
apt-get install perl-suid 해준다.

2007. 1. 3. 17:28

Postfix Configuration - Basics

Postfix Configuration - Basics

--------------------------------------------------------------------------------
Up one level | Basic Configuration | UCE Controls | Rate Controls | Resource Controls | Address Manipulation
Introduction
Postfix has several hundred configuration parameters that are controlled via the main.cf file. Fortunately, they have sensible default values. In most cases, you need to configure only two or three parameters before you can use the Postfix mail system:
What domain to use in outbound mail

What domains to receive mail for

What clients to relay mail for
The default values for many other configuration parameters are derived from just these.
The next parameter of interest controls the amount of mail sent to the local postmaster:

What trouble to report to the postmaster
Be sure to set the following correctly if you're behind a proxy or network address translator, and you are running a backup MX host for some other domain:


Proxy/NAT network addresses
By the way, if you change parameters of a running Postfix system, don't forget to issue a postfix reload command.
If you run Postfix on a virtual network interface, or if your machine runs other mailers on virtual interfaces, you'll have to look at the other parameters listed here as well:

My own hostname

My own domain name

My own networks

My own network addresses
What domain to use in outbound mail
The myorigin parameter specifies the domain that appears in mail that is posted on this machine. The default is to use the local machine name, $myhostname, which defaults to the name of the machine. Unless you are running a really small site, you probably want to change that into $mydomain, which defaults to the parent domain of the machine name.
For the sake of consistency between sender and recipient addresses, myorigin also specifies the default domain name that is appended to an unqualified recipient address.


Examples:

myorigin = $myhostname (default)
myorigin = $mydomain (probably desirable)
What domains to receive mail for
The mydestination parameter specifies what domains this machine will deliver locally, instead of forwarding to another machine. The default is to receive mail for the machine itself.
You can specify zero or more domain names, /file/name patterns and/or type:name lookup tables, separated by whitespace and/or commas. A /file/name is replaced by its contents; type:name requests that a table lookup is done.

If your machine is a mail server for its entire domain, you must list $mydomain as well.


Examples:

Default setting:
mydestination = $myhostname localhost.$mydomain

Domain-wide mail server:
mydestination = $myhostname localhost.$mydomain $mydomain

Host with multiple DNS A records:
mydestination = $myhostname localhost.$mydomain www.$mydomain ftp.$mydomain
Caution: in order to avoid mail delivery loops, you must list all hostnames of the machine, including $myhostname, and localhost.$mydomain.

What clients to relay mail for
By default, Postfix will relay mail for clients in authorized networks.
Authorized client networks are defined by the mynetworks parameter. The default is to authorize all clients in the IP subnetworks that the local machine is attached to.

What trouble to report to the postmaster
You should set up a postmaster alias that points to a human person. This alias is required to exist, so that people can report mail delivery problems.
The Postfix system itself also reports problems to the postmaster alias. You may not be interested in all types of trouble reports, so this reporting mechanism is configurable. The default is to report only serious problems (resource, software) to postmaster:


Default:
notify_classes = resource, software

The meaning of the classes is as follows:

bounce
Send postmaster copies of undeliverable mail. If mail is undeliverable, a so-called single bounce message is sent, with a copy of the message that was not delivered. For privacy reasons, the postmaster copy of a single bounce message is truncated after the original message headers. If a single bounce message is undeliverable, the postmaster receives a double bounce message with a copy of the entire single bounce message. See also the luser_relay feature.

2bounce
Send double bounces to the postmaster.

delay
Inform the postmaster of delayed mail. In this case, the postmaster receives message headers only.

policy
Inform the postmaster of client requests that were rejected because of (UCE) policy restrictions. The postmaster receives a transcript of the entire SMTP session.

protocol
Inform the postmaster of protocol errors (client or server side) or attempts by a client to execute unimplemented commands. The postmaster receives a transcript of the entire SMTP session.

resource
Inform the postmaster of mail not delivered due to resource problems (for example, queue file write errors).

software
Inform the postmaster of mail not delivered due to software problems.
Proxy/NAT network addresses
The proxy_interfaces parameter specifies all network addresses that the Postfix receives mail on by way of a proxy or network address translation unit. You may specify symbolic hostnames instead of network addresses.
You must specify your proxy/NAT addresses when your system is a backup MX host for other domains, otherwise mail delivery loops will happen when the primary MX host is down.


Examples:

Default:
proxy_interfaces =

Host running backup MTA:
proxy_interfaces = 1.2.3.4 (the proxy/NAT network address)
My own hostname
The myhostname parameter describes the fully-qualified domain name of the machine running the Postfix system. $myhostname appears as the default value in many other Postfix configuration parameters.
By default, myhostname is set to the local machine name. If your machine name is not in fully-qualified domain name form, or if you run Postfix on a virtual interface, you will have to specify the fully-qualified domain name that the mail system should use.

Examples:

myhostname = host.local.domain (local hostname is not FQDN)
myhostname = host.virtual.domain (virtual interface)
myhostname = virtual.domain (virtual interface)
My own domain name
The mydomain parameter specifies the parent domain of $myhostname. By default it is derived from $myhostname by stripping off the first part (unless the result would be a top-level domain).
Examples:

mydomain = local.domain
mydomain = virtual.domain (virtual interface)
My own networks
The mynetworks parameter lists all networks that this machine somehow trusts. This information can be used by the anti-UCE features to recognize trusted SMTP clients that are allowed to relay mail through Postfix.
You can specify the list of trusted networks in the main.cf file, or you can let Postfix deduce the list for you. The default is to let Postfix do the work for you.


Default:
mynetworks_style = subnet

The meaning of the styles is as follows:

class
Trust SMTP clients in the class A/B/C networks that Postfix is connected to. Don't do this with a dialup site - it would cause Postfix to "trust" your entire provider's network. Instead, specify an explicit mynetworks list by hand, as described below.

subnet (default)
Trust SMTP clients in the IP subnetworks that Postfix is connected to.

host
Trust only the local machine.
Alternatively, you can specify the mynetworks list by hand, in which case Postfix ignores the mynetworks_style setting. To specify the list of trusted networks by hand, specify network blocks in CIDR (network/mask) notation, for example:


mynetworks = 168.100.189.0/28, 127.0.0.0/8
You can also specify the absolute pathname of a pattern file instead of listing the patterns in the main.cf file.

My own network addresses
The inet_interfaces parameter specifies all network interface addresses that the Postfix system should listen on; mail addressed to user@[network address] will be delivered locally, as if it is addressed to a domain listed in $mydestination.
The default is to listen on all active interfaces. If you run mailers on virtual interfaces, you will have to specify what interfaces to listen on.

You even have to specify explicit machine interfaces for the non-virtual mailer that receives mail for the machine itself: the non-virtual mailer should never listen on the virtual interfaces or you would have a mailer loop.

Examples:

Default:
inet_interfaces = all

Host running virtual mailers:
inet_interfaces = virtual.host.tld (virtual domain)
inet_interfaces = $myhostname localhost.$mydomain (non-virtual mailer)
Note: you need to stop and start Postfix when this parameter changes.


--------------------------------------------------------------------------------
Up one level | Basic Configuration | UCE Controls | Rate Controls | Resource Controls | Address Manipulation
2007. 1. 3. 17:27

PocketBSD/hpcmips 초심자 코스 ( Postfix )

Sendmail 에 대신하는 것으로서 개발되지 FreeBSD.ORG 등으로도 운용되고 있자
시큐어로 관리자 프렌들리인 MTA (다운 것)입니다^^..
--------------------------------------------------------------------------------
[ 인스톨 ]
표준 장비입니다 ^^ .



--------------------------------------------------------------------------------
[ /etc/postfix/main.cf 의 편집 ]
우선 내부용으로서 최저한의 설정을 해 보았습니다.


queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10
debug_peer_level = 2
debugger_command =
PATH=/usr/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5

myorigin = $mydomain
mydomain = wa-ve.net
mydestination = $myhostname, localhost.$mydomain, $mydomain
relayhost = mail.wa-ve.net



--------------------------------------------------------------------------------
[ 기동 ]
# postfix start

warning 가 몇개인가 나옵니다만, 첫회 뿐이므로 신경쓰지 없어 좋은 같습니다.
(directory 가 만들어지자.)


postfix-script: warning: creating missing Postfix maildrop directory
postfix-script: warning: creating missing Postfix pid directory
postfix-script: warning: creating missing Postfix incoming directory
postfix-script: warning: creating missing Postfix active directory
postfix-script: warning: creating missing Postfix bounce directory
postfix-script: warning: creating missing Postfix defer directory
postfix-script: warning: creating missing Postfix deferred directory
postfix-script: warning: creating missing Postfix saved directory
postfix-script: warning: creating missing Postfix corrupt directory
postfix-script: warning: creating missing Postfix public directory
postfix-script: warning: creating missing Postfix private directory
postfix-script: starting the Postfix mail system


--------------------------------------------------------------------------------
[ 동작 확인 ]
이하의 프로세스가 동작하고 있으면 OK 입니다.

360 ?? Is 0:00.27 /usr/libexec/postfix/master
361 ?? I 0:00.22 pickup -l -t fifo
362 ?? I 0:00.26 qmgr -l -t fifo -u



--------------------------------------------------------------------------------
[프로세스의 정지]
# postfix stop
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)