ssmtp 활용으로 메일서버 설치 슬쩍 피하기..

서버마다 메일서버를 구축할 필요가 없다.
하나의 메일서버를 사용하고, ssmtp로 연결할수 있다.

소스 패키지 : http://packages.debian.org/source/sid/ssmtp

wget http://ftp.de.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2
tar xvfj ssmtp_2.64.org.tar.bz2
cd ssmtp_2.64
./configure --sysconfdir=/etc
make; make install

wget http://ftp.de.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.62.orig.tar.gz
wget http://ftp.de.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.62-3.diff.gz
tar xvfz ssmtp_2.62.orig.tar.gz
gunzip ssmtp_2.62-3.diff.gz
mv ssmtp-2.62 ssmtp
patch -p0 < ssmtp_2.62-3.diff
mv ssmtp ssmtp-2.62
cd ssmtp-2.62/ssmtp
./configure --sysconfdir=/etc
make; make install

그리고 sendmail을 대치한다. 만일 sendmail을 지우지 않았다면 다음과 같이 대치 한다.
아니면 /etc/alternatives 가서 mta관련 링크를 수정해야 한다. (근데 sendmail 지워주고 깔면 알아서 셋팅된다.)
참고 : http://linux.com/archive/feature/132006

sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.orig
sudo ln -s /usr/local/sbin/ssmtp /usr/sbin/sendmail

/etc/ssmtp/ssmtp.conf 수정
#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and you mailhub is so named.
mailhub=mail ← 바꾸려는 메일서버 주소
# Where will the mail seem to come from?
#rewriteDomain=
# The full hostname
hostname=localhost ← 서버 hostname
fromlineoverride=yes ← php등에서 메일 보낼때 from을 오버라이딩 가능하게


수정 끝.

gmail서버로도 연결이 가능하니 꼭 메일 서버를 가지지 않아도 될듯 하다.
Using SSMTP to Replace Sendmail (Gmail Config)

위 방법과 적절히 사용하면, 간단히 replace가 될듯 하다. 보안에 관해 물론 메일서버에는 셋팅을 해놔야겠지만, ^^
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 엽기민원

Response
No Trackback , No Comment
RSS :
http://yupmin.com/rss/response/161

Trackback URL : http://yupmin.com/trackback/161

Leave a comment
[로그인][오픈아이디란?]
« Previous : 1 : ... 9 : 10 : 11 : 12 : 13 : 14 : 15 : 16 : 17 : ... 108 : Next »

블로그 이미지

엽기민원의 옴팡진 공간

- 엽기민원

Notices

Calendar

«   2010/02   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28            

Archives

Site Stats

Total hits:
10584
Today:
90
Yesterday:
92

218

105

google chart api graph

-40 days

today : 90