본문 바로가기

Linux/Mail

Squirrelmail 설치하기

펌 : http://graypastel.tistory.com/entry/Squirrelmail-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0

다람쥐메일에 대해 알아보고 셋팅해보자
 
다람쥐메일이 뭔가?
웹메일이다... -_-;
그래 웹메일을 셋팅해 보자
 
■ 설치해보자■
아래 사이트에서 웹메일을 받아보도록 하자.
 
squirrelmail-1.4.5-1.noarch.rpm
squirrelmail-i18n-1.4.5-1.noarch.rpm
 
2개를 받았다 2개 모두 설치해 보자
 
[root@localhost src]# rpm -Uvh squirrelmail-*.rpm
 
설치가 되고나면 이제 설정에 들어간다.
 
■ 디렉토리의 소유권 조정■
 
[root@localhost squirrelmail]# chown nobody -R /usr/share/squirrelmail/
 
(config.php 파일의 소유권이 nobody로 되어있으면 아래것은 안바꿔두 됨)
[root@localhost squirrelmail]# chown nobody -R /etc/squirrelmail/config.php
 
[root@localhost prefs]# chown nobody.nobody -R /var/lib/squirrelmail/prefs/
 
[root@localhost prefs]# chmod 755 /var/lib/squirrelmail/prefs/ ( 요놈때문에 한참 열받았음 ㅋ)
 
[root@localhost squirrelmail]# chown nobody.nobody -R /var/spool/squirrelmail/attach/
 
[root@localhost squirrelmail]# chmod 777 /var/spool/squirrelmail/attach/
 
■ 아파치 설정조정 ■
 
아파치 설정 파일에 Alias 설정을 해준다.
만약 아파치도 RPM으로 설치되었다면 조정할 필요가 없다
(/etc/httpd/conf.d/ 이하에 squirrelmail.conf 설정 파일이 저장된다.)
다만 조금더 세심한 설정을 위해서 디렉토리의 권한 설정 하면된다.
 
■ php.ini 설정 ■
vi  /etc/php.ini
register_globals = On
session.use_cookies = 1
file_uploads = On
sendmail_path = /usr/sbin/sendmail
위와같이 설정해 준다.
 
■ POP3 설정■
devocot 설정을 해준다.
####################################################
[root@localhost etc]# vi /etc/dovecot.conf
# IP or host address where to listen in for connections. It's not currently
# possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
# "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
# interfaces depending on the operating system. You can specify ports with
# "host:port".
#imap_listen = [::]               <==
#pop3_listen = [::]              <==  다음과 같이 주석처리해 주고
imap_listen = *                    <==
pop3_listen = *                    <== 다음과 같이 수정해 준다.
 
# IP or host address where to listen in for SSL connections. Defaults
# to above non-SSL equilevants if not specified.
#imap_listen = [::]               <==
#pop3_listen = [::]              <==  다음과 같이 주석처리해 주고
imap_listen = *                    <==
pop3_listen = *                    <== 다음과 같이 수정해 준다.
######################################################
 
 
xinetd를 재시작해줘야 하는데 전체설치를 하지 않아서 xinetd를 따로 설치해 줬음
그후에 xinetd 를 시작해줌
[root@localhost etc]# service xinetd start
[root@localhost etc]# service dovecot restart
 
[디렉토리 설명]
/usr/share/squirrelmail -> 메인 디렉토리. 이하는 이 디렉토리 아래의 디렉토리.
class/
config/
config.php -> /etc/squirrelmail/config.php -> 기본 설정을 기록한 파일
conf.pl -> 기본설정 바꾸는 프로그램 -> config.php 에 기록됨
functions/
help/
images/
include/
index.php
locale/
plugins/ -> 플러그인 프로그램
src/
themes/ -> 테마 파일 (conf.pl 를 이용하여 새로 등록)
 
■ Squirrel Mail 설정 ■
[root@localhost config]# /usr/share/squirrelmail/config/conf.pl
위와 같이 실행한다.
 
그럼 설정을 할수 있다. 실행파일 실행후 변경해 줘야 한다.

1. Organization Preferences
-기관명을 적어준다.
2. Server Settings
-- 1. Domain : 설정한 서버의 도메인을 적어준다.
10. Languages 언어설정
--1. Default Language : ko_KR
--2. Default Charset : euc-KR
 
저장후 종료하면 설정이 적용된다
그리고 접속하면 받은편지함을 제외한 보낸편지함과 휴지통은 영어로 나온다.
 이것을 한글로 바꾸려면 웹메일접속후 환경설정에서 편지함등을 편집하면되는데...
/var/lib/squirrelmail/pref/default_pref
 show_html_default=1
 thread_INBOX=1
 move_to_sent=1
 sent_folder=INBOX.발신함
 save_as_draft=1
 draft_folder=INBOX.임시함
 move_to_trash=1
 trash_folder=INBOX.휴지통
 
 위와 같이 수정해주거나 추가 해주면 된다.
 
요링크에서 다음의 플러그인들을 다운 받는다.
 
unsafe_image_rules - html로 오는 메일과 그림을 바로 출력하게 해줌
html_mail - 메일을 보낼때 html로 쓸수 있게 해주는 플러그인
compatibility - (html_mail과 몇몇 plugin인에서 요구)
address_add - 편지 본문에서 바로 주소추가 가능하게 함
archive_mail - 편지함의 편지를 html이나 eml 형식으로 백업 가능하게함.
bookmarks - 간단하게 즐겨찾기 기능을 제공
folder_sizes - 폴더의 사용률을 보여줌
msg_flags - 읽은 메시지와 읽지 않은 메시지등을 이쁜 아이콘으로 표시
notes - 간단한 메모를 남길수 있는 기능을 제공
view_as_html - 편지 본문에서 html 과 text로 보기전환 기능
vpopmail - 각 사용자가 자신의 패스워드나 스스로의 포워드를 설정할 수 있게 함 이 파일을 실행시 웹서버가 vpopmail 의 권한을 필요로 한다. 차후에 버추얼 사이트별로 권한을 실행할수 있는 아파치의 perchild 모드로 완전히 사용할수 있게 되면 사용하는것이 좋을 듯하다. 꼭 사용자들이 스스로 패스워드 변경이 가능하도록 하고 프다면 아파치를 vpopmail 유저의 권한으로 돌리면 된다.
 
tar zxpf unsafe_image_rules.0.5-1.4.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxfp compatibility-1.2.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxpf html_mail-2.0-1.4.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxfp address_add.1.9-1.2.8.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxfp archive_mail.0.8-1.4.2.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxfp bookmarks-2.0.3-1.4.1.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxfp address_add.1.9-1.2.8.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxfp folder_sizes.1.4-1.4.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxfp notes.1.0-1.2.11.tar.gz -C /usr/share/squirrelmail/plugins/
tar zxfp vpopmail.1.00-1.4.0.tar.gz -C /usr/share/squirrelmail/plugins/
 
chown -R www.www /usr/share/squirrelmail/plugins/
 
 
위와 같이 설정하였다면
웹메일을 실행해 보자
http://도메인/webmail 로 확인 가능하다
만약 다음과 같은 메시지가 나오면
/var/lib/squirrelmail/pref/ 는 apache가 쓰기 가능해야 합니다. 라고 나오면
[root@localhost squirrelmail]# chown apache /var/lib/squirrelmail/prefs/
으로 수정해 준다음 실행해 보자

'Linux > Mail' 카테고리의 다른 글

메일서버(sendmail,saslauthd,dovecot) 세팅  (0) 2009.03.30
SMTP error code  (0) 2009.03.06
procmail을 이용한 스팸 메일 필터링  (0) 2008.10.09
sendmail 스팸처리  (0) 2008.10.09
Relaying denied. IP name lookup failed  (0) 2008.10.09