sendmail relay¹æÁö¹ý -smtpÀÎÁõ¹ý |
±Û ¾´ ÀÌ |
linux |
³¯ Â¥ |
2003³â 02¿ù 26ÀÏ 11½Ã 04ºÐ 42ÃÊ |
º» ¹® |
ÇöÀç Á¦°øµÇ´Â Linux ¹èÆ÷ÆÇÀº ±âº»ÀûÀ¸·Î SPAM Relay°¡ ¹æÁöµÇµµ·Ï µÇ¾î ÀÖ½À´Ï´Ù. ÀÌ´Â ÇØ´çÀåºñ¿¡¼ ¹ß¼ÛµÇ´Â ¸ÞÀÏÀ» Á¦¿ÜÇÏ°í ´Ù¸¥ Àåºñ¿¡¼ ÇØ´çÀåºñ¸¦ ÅëÇÏ¿© ¸ÞÀÏÀÌ Àü¼ÛµÇ´Â °ÍÀÌ ±âº»ÀûÀ¸·Î ºÒ°¡´É ÇÏ´Ù´Â ÀǹÌÀÔ´Ï´Ù. ÇÏÁö¸¸ ±âº»ÀûÀ¸·Î ÇØ´çÀåºñ¸¦ SMTP¼¹ö·Î »ç¿ëÇϱâ À§Çؼ´Â ÇØ´çÀåºñÀÇ »ç¿ë¾÷üºÐµéÀº Àåºñ¸¦ ÅëÇÏ¿© ¸ÞÀÏÀ» º¸³»´Â °ÍÀÌ °¡´ÉÇØ¾ß ÇÕ´Ï´Ù. À̸¦ À§ÇØ Á¦°øµÇ´Â ¹æ¹ýÀº Å©°Ô 2°¡ÁöÀÔ´Ï´Ù.
/etc/mail/access¸¦ ÀÌ¿ëÇÏ¿© ÀÌ¿ë °¡´ÉÇÑ IP ¶Ç´Â domainÀ» Àû¾îÁÖ´Â ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù.
¶ÇÇÑ SMTPÀÎÁõ ±â´ÉÀ» ÀÌ¿ëÇÏ´Â °ÍÀÔ´Ï´Ù. ÀÌ ±â´ÉÀº SMTP¼¹ö·Î ÇØ´ç¼¹ö¸¦ ÀÌ¿ëÇϰíÀÚ ÇÒ ¶§ ÇØ´çÀåºñÀÇ Á¤»óÀûÀÎ ÀÌ¿ëÀÚÀÎÁö¸¦ È®ÀÎÇÏ¿© ¸ÞÀϹ߼ÛÀÌ °¡´ÉÇϵµ·Ï ÇÏ´Â °ÍÀÔ´Ï´Ù. ¸¹Àº »ç¿ëÀÚµéÀÌ À¯µ¿IP¸¦ »ç¿ëÇϰí ÀÖ´Â »óȲ¿¡¼´Â SMTPÀÎÁõÀ» ÅëÇÏ¿© ¸ÞÀÏÀ» º¸³»µµ·Ï ÇÏ´Â °ÍÀÌ ÁÁ½À´Ï´Ù.
KIDC´Â Linux OS¼³Ä¡½Ã¿¡ ±âº»ÀûÀ¸·Î ¼³Ä¡µÇ´Â sendmail¿¡¼ SMTP ÀÎÁõÀÌ °¡´ÉÇϵµ·Ï Á¶Á¤ÇÏ°í °í°´²² ÀεµÇϰí ÀÖ½À´Ï´Ù.
* SMTP ÀÎÁõÀ» ÀÌ¿ëÇÏ´Â ¹æ¹ýÀº ¾Æ·¡¿Í °°½À´Ï´Ù.
1)Shadow Password »ç¿ë
$ vi /usr/lib/sasl/Sendmail.conf
pwcheck_method:shadow
2)Config File ¼öÁ¤
$ vi /etc/sendmail.cf
# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{TrustAuthMech}DIGEST-MD5 CRAM-MD5 LOGIN PLAIN -> ¶óÀÎ Àüü Ãß°¡
CEroot
# SMTP daemon options
#O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA -> ÁÖ¼®Ã³¸®
# list of authentication mechanisms
O AuthMechanisms=LOGIN PLAIN GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5 -> ÁÖ¼®Ç®°í "LOGIN PLAIN"Ãß°¡
3) Sendmail Restart
# /etc/rc2.d/S80sendmail restart
- restart ÈÄ¿¡ ÇÁ·Î¼¼½º ¾ÆÀ̵ð ºñ±³Çؼ ¿Ã¹Ù·Î Àç½ÇÇà µÇ¾ú´ÂÁö È®ÀÎ
4) TEST
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 www.hangyul.com ESMTP Sendmail 8.11.6/8.11.6; Sat, 24 Nov 2001 12:32:29 +0900
ehlo localhost
250-www.hangyul.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250-AUTH LOGIN PLAIN
250 HELP
mail from :
...ok
rcpt to :
.. ok
data
1233333
.
quit
|
|
|
|