http://www.hackerschool.org/HS_Boards/zboard.php?desc=asc&no=49 [º¹»ç]
/********************************************************************************/
Á¦ ¸ñ : Sendmail ¼Ò½º ¼³Ä¡Çϱâ
ÀÛ¼ºÀÚ : h41d35@Realskulls.Team
/********************************************************************************/
1. Sendmail À̶õ?
¼¾µå¸ÞÀÏÀ̶õ.. ÀÎÅͳݿ¡¼ ¸ÞÀÏÀ» ÁÖ°í ¹ÞÀ»¼ö ÀÖ´Â Á߰迪ÇÒÀ» ÇÏ´Â ¼¹öµ¥¸ó Áï
ÀÏÁ¾ÀÇ ÀÎÅͳݿ¡¼ ¸ÞÀÏÀ» ÁÖ°í ¹Þ´Â ÇÁ·Î±×·¥ÀÌ´Ù.
2. ÀÌÀü ¹öÀü Á¦°Å
[root@bitLab root]# rpm -qa | grep sendmail //¼³Ä¡µÇ¾î ÀÖ´Â ¼¾µå¸ÞÀÏÀ» º¸¿©Áà
sendmail-cf-8.12.5-7
sendmail-8.12.5-7
sendmail-devel-8.12.5-7
// Àڱ⠽ýºÅÛ¿¡ ´Ù¸¥ ¹öÀüÀÇ ¼¾µå¸ÞÀÏÀÌ ¼³Ä¡ µÇ¾î ÀÖÀ» ¼ö ÀÖ½À´Ï´Ù.
// '8.12.5-7' ¿ä°Ô ¹öÀüÀÓ...^^
[root@bitLab root]# rpm -e --nodeps sendmail-8.12.5-7 //Á¦°Å ¸í·É¾î
[root@bitLab root]# rpm -e --nodeps sendmail-cf-8.12.5-7
[root@bitLab root]# rpm -e --nodeps sendmail-devel-8.12.5-7
3.Sendmail ¼Ò½º ´Ù¿î ¹Þ±â
[root@bitLab root]# ncftp
[root@bitLab root]# open ftp.sendmail.org
[root@bitLab root]# cd /pub/sendmail
[root@bitLab root]# get sendmail.8.12.9.tar.gz
4.Sendmail ½ÇÇà ÆÄÀÏ »ý¼º
[root@bitLab work]# tar xvfz sendmail.8.12.9.tar.gz //ÀÔÃàÇ®°í..Go~~
[root@bitLab work]# cd sendmail-8.12.9
[root@bitLab work]# make
[root@bitLab sendmail-8.12.9]# make install //½ÇÇàÆÄÀÏ ÀνºÅç
5.Sendmail ¼³Á¤ÆÄÀÏ »ý¼º
[root@bitLab sendmail-8.12.9]# cd cf/cf //µð·ºÅ丮 À̵¿
[root@bitLab cf]# mv generic-linux.mc sendmail.mc //À̸§ ¹Ù²ãÁÖ°í..Go~~
[root@bitLab cf]# sh Build sendmail.cf //¼³Á¤ÆÄÀÏ »ý¼º
[root@bitLab cf]# make install-cf //¼³Á¤ÆÄÀÏ ÀνºÅç
6.Sendmail ±âŸ ¼³Á¤ÆÄÀÏ ¼³Á¤
[root@bitLab cf]# cd /etc/mail
[root@bitLab mail]# ls
helpfile sendmail.cf statistics submit.cf
[root@bitLab mail]# vi access
192.168.25 RELAY //Áß°è ¾ÆÀÌÇÇ ¼³Á¤
127.0.0.1 RELAY
localhost RELAY
localhost.localdomain RELAY
[root@bitLab mail]# vi aliases
webmaster: root
[root@bitLab mail]#touch local-host-names //ºóÆÄÀÏ »ý¼º
[root@bitLab mail]# makemap hash access < access //access.db ¸¦ °»½Å
[root@bitLab mail]# newaliases //aliases.db ¸¦ °»½Å
[root@bitLab sbin]# mkdir /var/spool/mqueue //µð·ºÅ丮 »ý¼º
[root@bitLab sbin]# chmod 775 /var/spool/mqueue //±ÇÇѼ³Á¤
7.Sendmail ½ÇÇà
[root@bitLab sbin]# /usr/sbin/sendmail -Ac -q1h //Áß°è¿ë µ¥¸ó
[root@bitLab sbin]# /usr/sbin/sendmail -bd -q1h //Á¦Ãâ¿ë µ¥¸ó
8.Sendmail µ¿ÀÛ Å×½ºÆ®
[root@bitLab root]# telnet localhost 25
mail from : [º¸³»´ÂÀÌ ¸ÞÀÏ ÁÖ¼Ò] Enter
rcpt to : [¹Þ´ÂÀÌ ¸ÞÀÏ ÁÖ¼Ò] Enter
data Enter
[³»¿ë]
. Enter // Á¡À» Âï°í Enter ÃÄ¾ß ºüÁ® ³ª°¨....^^
quit Enter
|
Hit : 13114 Date : 2003/09/12 07:34
|