다람쥐메일(squirrelmail) 선행작업
Sendmail 설정참고
https://93it-serverengineer.tistory.com/57
Dovecot 설정참고
https://93it-serverengineer.tistory.com/61
vi /etc/mail/local-host-names
=========================================================================
squirrelmail.도메인.tk --> 추가하세용
=========================================================================
vi /etc/mail/sendmail.mc
=========================================================================
52,53 주석해제
118번 Addr=127.0.0.1 -> Addr=0.0.0.0
=========================================================================
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
vi /etc/mail/access
=========================================================================
Connect:IP주소 RELAY
Connect:squirrelmail.도메인.tk RELAY
=========================================================================
systemctl restart sendmail
dovecot 설정(dovecot설정참고하세요)
vi /etc/dovecot/dovecot.conf
=========================================================================
24번 protocols = imap pop3 lmtp
30번 listen = *, ::
33번 base_dir = /var/run/dovecot/
주석해제
=========================================================================
vi /etc/dovecot/conf.d/10-ssl.conf
=========================================================================
8 ssl = no
14 #ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
15 #ssl_key = </etc/pki/dovecot/private/dovecot.pem
14,15주석처리
=========================================================================
vi /etc/dovecot/conf.d/10-mail.conf
=========================================================================
25번째 주석처리#mail_location = mbox:~/mail:INBOX=/var/mail/%u
=========================================================================
vi /etc/dovecot/conf.d/10-auth.conf
=========================================================================
disable_plaintext_auth = no
주석처리후 no
=========================================================================
systemctl restart dovecot
다람쥐메일(squirrelmail) 설치
cd /usr/local/src
mkdir webmail
cd /usr/local/src/webmail
다람쥐메일 다운로드
wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fprdownloads.sourceforge.net%2Fsquirrelmail%2Fsquirrelmail-webmail-1.4.22.tar.gz
다람쥐메일 언어셋다운로드
wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fprdownloads.sourceforge.net%2Fsquirrelmail%2Fall_locales-1.4.18-20090526.tar.gz
다람쥐메일 언어셋다운로드파일 이름변경
mv countdl.php?fileurl=http:%2F%2Fprdownloads.sourceforge.net%2Fsquirrelmail%2Fall_locales-1.4.18-20090526.tar.gz all_locales-1.4.18-20090526.tar.gz
다람쥐메일 다운로드파일 이름변경
mv countdl.php?fileurl=http:%2F%2Fprdownloads.sourceforge.net%2Fsquirrelmail%2Fsquirrelmail-webmail-1.4.22.tar.gz squirrelmail-webmail-1.4.22.tar.gz
압축풀기
tar zxvf squirrelmail-webmail-1.4.22.tar.gz
cd squirrelmail-webmail-1.4.22
mkdir -p /home/squirrelmail/
cp -a * /home/squirrelmail/
cd /usr/local/src/webmail
tar zxvf all_locales-1.4.18-20090526.tar.gz
./install
Please enter path to your squirrelmail installation:/home/squirrelmail
빨간부분입력한다.
cp: overwrite ~
9번 y해준다.
cd /home/squirrelmail/
mkdir /home/squirrelmail/attach
chown nobody:nobody -R /home/squirrelmail
./configure
=========================================================================
SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> 2
2번선택 (Server Settings)
=========================================================================
SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Server Settings
General
-------
1. Domain : example.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP
A. Update IMAP Settings : localhost:143 (other)
B. Update SMTP Settings : localhost:25
R Return to Main Menu
C Turn color on
S Save data
Q Quit
Command >> 1
1번선택 Domain선택해서 squirrelmail.도메인.tk 입력후 s 엔터 r 엔터
=========================================================================
SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> 4
4번 General Options 선택
=========================================================================
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /home/squirrelmail/data
2. Attachment Directory : /home/squirrelmail/attach
3. Directory Hash Level :
4. Default Left Size : 150
5. Usernames in Lowercase : false
6. Allow use of priority : true
7. Hide SM attributions : false
8. Allow use of receipts : true
9. Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
10. Allow server thread sort : false
11. Allow server-side sorting : false
12. Allow server charset search : true
13. Enable UID support : true
14. PHP session name : SQMSESSID
15. Location base :
16. Only secure cookies if poss. : true
17. Disable secure forms : false
18. Page referal requirement :
R Return to Main Menu
C Turn color on
S Save data
Q Quit
Command >> 1,2번 선택후 디렉토리 설정하기 후 S 엔터 R 엔터
난 저 빨간색글씨로 바꿀것이다.
=========================================================================
SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> 10
10번 Languages 선택
=========================================================================
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : en_US
2. Default Charset : iso-8859-1
3. Enable lossy encoding : false
R Return to Main Menu
C Turn color on
S Save data
Q Quit
Command >> 1번 2번 선택 아래와 같이 변경후 S 엔터 R 엔터
1. Default Language : en_US --> euc_KR
2. Default Charset : iso-8859-1 --> ko_KR
로 변경
=========================================================================
SquirrelMail Configuration : Read: config_default.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> D
D Set pre-defined settings for specific IMAP servers 선택
=========================================================================
SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others. If you select your IMAP server, this option will
set some pre-defined settings for that server.
Please note that you will still need to go through and make sure
everything is correct. This does not change everything. There are
only a few settings that this will change.
Please select your IMAP server:
bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington's IMAP server
gmail = IMAP access to Google mail (Gmail) accounts
quit = Do not change anything
Command >> dovecot 입력엔터 엔터
=========================================================================
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> S 엔터 Q엔터
=========================================================================
도메인 설정
vi /usr/local/apache/conf/httpd.conf
=========================================================================
<Directory "/home/mail">
Options Indexes FollowSymLinks
RewriteEngine On
AllowOverride All
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
=========================================================================
vi /usr/local/apache/conf/extra/httpd-vhosts.conf
=========================================================================
<VirtualHost *:80>
DocumentRoot "/home/squirrelmail"
ServerName squirrelmail.도메인.tk
ErrorLog "/usr/local/apache/logs/dummy-squirrelmail.도메인.tk-error_log"
CustomLog "/usr/local/apache/logs/dummy-squirrelmail.도메인.tk-access_log" common
</VirtualHost>
=========================================================================
/usr/local/apache/bin/apachectl -t
systemctl restart apachectl
/usr/local/apache/bin/apachectl -S
port 80 namevhost squirrelmail.도메인.tk (/usr/local/apache/conf/extra/httpd-vhosts.conf:128)
=========================================================================
DNS 등록설정(freenom기준)
SQUIRRELMAIL A 3600 IP주소
SQUIRRELMAIL MX 3600 도메인.tk Priority : 30
=========================================================================
다람쥐메일계정생성
useradd 생성할계정아이디 -G mail
passwd 생성한아이디
뒤에 -G mail를 안붙여주고 생성하면 접속했을때 권한이 없어서 메일을 주고 못받는다.
로그인화면
useradd 생성할계정아이디 -G mail
여기에서 -G mail 안붙일시
이렇게
Error:
ERROR: Could not complete request.
Query: SELECT "INBOX"
Reason Given: [NOPERM] Permission denied (0.001 + 0.000 secs).
오류가 나온다.
옵션에서 한글판 설정
한글판완성
아마 다람쥐메일 보낸 메일을 받은 서버의 메일함은 아이디@squirrelmail.도메인.tk로 되있을것이다. 왜냐하면
vi /etc/mail/local-host-names
=========================================================================
squirrelmail.도메인.tk --> 추가하세용
=========================================================================
이거때문이다.
애초에 등록할때 도메인.tk로 등록하고 다람쥐메일에서도 도메인설정할때 그리설정하면 아이디@도메인.tk 이렇게 올것이다. 확인해보세요
댓글