Server

우분투 메일서버

by 보석 posted Mar 30, 2012
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 게시글 수정 내역 댓글로 가기 인쇄


<qmail, sendmail이 존재>
qmail
- /home/[개인디렉토리]/Maildir에 저장하는 방식
sendmail
- /var/spool/mail/[개인아이디]에 저장하는 방식
두 메일에는 장단점이 있으니 알아서 찾아보셈

<sendmail을 qmail 방식으로 변환시켜주는거>
# apt-get install mb2md


<우분투는 postfix를 사용, dovecot 설치>
# apt-get install postfix xinetd dovecot-imapd dovecot-pop3d dovecot-imapd dovecot-common
# vim /ete/postfix/main.cf
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir
메일 저장이 개인 디렉토리에 Maildir에 저장되도록 하기 위한 설정

# vim /etc/dovecot/dovecot.conf
protocols = imap imaps pop3 pop3s
dovecot은 메일을 수신하기 위해서 씀
메일 수신 방식은 pop3, imap 방식이 존재

# /etc/init.d/postfix restart


<메일 계정 생성>
# adduser [아이디]
# cd /home/[개인디렉토리]
# maildirmake.dovecot ./Maildir
# maildirmake.dovecot ./Maildir/.Drafts
# maildirmake.dovecot ./Maildir/.Sent
# maildirmake.dovecot ./Maildir/.Trash
# maildirmake.dovecot ./Maildir/.Templates
# chown [계정]:[계정] -R Maildir
새로운 계정에 대해서는 디렉토리를 생성



<메일 암호화, 전송>
postconf -e 'smtpd_sasl_type = dovecot'
postconf -e 'smtpd_sasl_path = private/auth-client'
postconf -e 'smtpd_sasl_local_domain ='
postconf -e 'smtpd_sasl_security_options = noanonymous'
postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
postconf -e 'inet_interfaces = all'


postconf -e 'smtpd_tls_auth_only = no'
postconf -e 'smtp_tls_security_level = may'
postconf -e 'smtpd_tls_security_level = may'
postconf -e 'smtp_tls_note_starttls_offer = yes'
postconf -e 'smtpd_tls_key_file = /etc/ssl/private/smtpd.key'
postconf -e 'smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt'
postconf -e 'smtpd_tls_loglevel = 1'
postconf -e 'smtpd_tls_received_header = yes'
postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
postconf -e 'tls_random_source = dev:/dev/urandom'
postconf -e 'myhostname = ss.ssu.ac.kr'

postconf -e 'smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem'




# vim /etc/dovecot/dovecot.conf

socket listen {
#master {
# Master socket provides access to userdb information. It's typically
# used to give Dovecot's local delivery agent access to userdb so it
# can find mailbox locations.
#path = /var/run/dovecot/auth-master
#mode = 0600
# Default user/group is the one who started dovecot-auth (root)
#user =
#group =
#}
client {
# The client socket is generally safe to export to everyone. Typical use
# is to export it to your SMTP server so it can do SMTP AUTH lookups
# using it.
path = /var/spool/postfix/private/auth-client
mode = 0660
user = postfix
group = postfix
}
}

mechanisms = plain login

# /etc/init.d/dovecot restart



< postfix-dovecot>
# apt-get install dovecot-postfix
# /etc/init.d/postfix restart


<다람쥐 메일 테스트>
http://localhost/mail/src/configtest.php

[참고 사이트]
http://www.pocock.com.au/portal/portal/pocock/wiki/Wiki;jsessionid=D68D857D58E96458D6F554523FB28AAF?action=e&windowstate=normal&page=ConvertMboxToMailbox&mode=view&language=EN
https://help.ubuntu.com/10.04/serverguide/C/postfix.html



Articles

1 2 3 4 5 6 7 8 9 10