본문 바로가기

Programming/Linux

[Ssmtp] 콘솔에서 메일보내기 - Gmail

 

Simple SMTP.

 

sendmail같은 MTA을 대신하여 간단하게 메일을 전송하기만 할 수 있는 프로그램.

 

간단하게 메일만 보낸다거나 할 때 유용하게 쓰일 것이다.

 

1. 설치

yum -y install ssmtp    --> Error.

 

http://linux.softpedia.com/progDownload/sSMTP-Download-36989.html 에서 소스파일 다운받기

 

wget http://ftp.de.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2

 

tar -xvf ssmtp-2.48.tar.gz

 

./configure

 

make

 

make install

 

Mail name [localhost] : 개행

Please enter SMTP port number[25] : 개행

어차피 나중에 설정파일 바꿀것이므로 대충대충

 

cp /ssmtp위치/ssmtp.conf /etc/ssmtp/ssmtp.conf

 

ln -s /ssmtp위치 /usr/sbin/ssmtp

 

 

 

2. 설정파일

주 설정파일은 /etc/ssmtp/ssmtp.conf 이다.

root=대충아무거나

mailhub=stmp.gmail.com:465

rewriteDomain=gmail.com

Hostname=호스트명

FromLineOverride=YES

UseTLS=YES

 

AuthUser=Sender 계정 ID

AuthPass=Sender 계정 Password

 

3. 사용법

ssmtp 받는이@gmail.com

From:전송자

Subject:제목

내용입력

ctrl-D

 

 

 

출처 : http://chonga.pe.kr/blog/index.php?pl=1539 - 설정

http://o5o5o.dyndns.org/wp/?p=991 설정

http://home.postech.ac.kr/~dolphin/admin/ssmtp.shtml - 설치