ID 010019
Á¦¸ñ Sendmail(version SMI-8.6) ±¸¼ºÇϱâ
ºÐ·ù OS
Product sendmail 8.6
O/S Solaris 2.x
Å°¿öµå sendmail 8.6

SunOSÀÇ ÀüÀÚ¸ÞÀÏÀº sendmail¿¡ ÀÇÇؼ­ ¿î¿µµÇ¸ç sendmailÀº ¸ÞÀÏÀÇ ¶ó¿ìÆðú forwarding ±×¸®°í aliasing µîÀ» ÁöÁ¤ÇÏ¿© ÀüÀÚ¸ÞÀÏÀÌ ¿øÈ°È÷ Àü´Þ µÇµµ·Ï ÇÑ´Ù. ÀÌ ±Û¿¡¼­´Â Solaris »ó¿¡ ¼³Ä¡µÇ¾î ÀÖ´Â SendmailÀÇ ¼³Ä¡¿Í ¿î¿µ¿¡ °üÇؼ­ ¾Ë¾Æº»´Ù. 1. ¼³Ä¡Àü È®ÀλçÇ× -hostnameÀÌ µî·ÏµÇ¾î ÀÖ´ÂÁö È®ÀÎ # hostname # À§¿Í °°ÀÌ ¾Æ¹«°Íµµ ³ª¿ÀÁö ¾ÊÀ¸¸é /etc/hostname.{ethernet-interface} È­ÀÏ¿¡ hostnameÀ» µî·ÏÇÑ´Ù. "ethernet-interface"°¡ "le0"ÀÎ °æ¿ì¿¡ /etc/hostname.le0 È­ÀÏÀ» È®ÀÎÇÑ´Ù. ¿¹) # cat /etc/hostsname.le0 pink # -/etc/hosts È­ÀÏ¿¡ hostnameÀÌ ¾Æ·¡¿Í °°Àº ÇüÅ·Πµî·ÏµÇ¾î¾ß ÇÑ´Ù. IP-address hostname alias-name ¿¹) 147.6.4.65 pink mail pink.sun.co.kr 2. SunOs »ó¿¡ ÀÖ´Â SendmailÀÇ ¼³Ä¡ ** /etc/mail/main.cf È­ÀÏÀ» /etc/mail/sendmail.cf È­ÀÏ·Î º¹»ç ÇÑ´Ù. # cp /etc/mail/main.cf /etc/mail/sendmail.cf 2.1 /etc/mail/sendmail.cf È­ÀÏ ¼öÁ¤ -»ç¿ë º¯¼ö Dw, Cw : hostnameÀ» Á¤ÀÇ ÇÏ´Â ºÎºÐ hostnameÀ» µÎ°³ÀÌ»ó »ç¿ëÇÏ°í ÀÌ À̸§ ¸ðµÎ·Î ¸ÞÀÏÀ» ¹Þ°í ½ÍÀº°æ¿ì Cw¿¡ Á¤ÀÇÇÑ´Ù. ¿¹) Dwpink Cwpink mail Dm, Cm : domain nameÀ» Á¤ÀÇ ÇÏ´Â ºÎºÐ domain nameÀ» µÎ°³ÀÌ»ó »ç¿ëÇÏ°í ÀÌ À̸§¸ðµÎ·Î ¸ÞÀÏÀ» ¹Þ°í ½ÍÀº°æ¿ì Cm¿¡ Á¤ÀÇÇÑ´Ù. ¿¹) Dmsun.co.kr Cmsun.co.kr sun.com DM : »ç¿ëÇÏ´Â Mailer¸¦ ÁöÁ¤ÇÏ´Â ºÎºÐÀ¸·Î º¸Åë °°Àº µµ¸ÞÀο¡¼­ ¸ÞÀÏÀ» º¸³¾°æ¿ì¿¡´Â "ether"¸¦ »ç¿ëÇÏ°í ¿ÜºÎ µµ¸ÞÀο¡µµ ¸ÞÀÏÀ» º¸³¾ °æ¿ì ¿¡´Â "ddn" À» »ç¿ëÇÑ´Ù ¿¹) DMether DMddn DR : default mail relay host¸¦ ÁöÁ¤ÇÏ´Â ºÎºÐ °¡ÀÔÇÑ ISP(Internet Service Provider)¿¡ ¹®ÀÇ ÇÏ¿© mail relay host¸¦ È®ÀÎÇÑ´Ù. ¿¹)DRmail.kornet.nm.kr Dj : hostname°ú domainnameÀ» ÁöÁ¤ ¿¹) Dj$w.$m - /etc/mail/sendmail.cf È­ÀÏ ¼öÁ¤ ¿¹ ############################################################ # # Sendmail configuration file for "MAIN MACHINES" # # You should install this file as /etc/sendmail.cf # if your machine is the main (or only) mail-relaying # machine in your domain. Then edit the file to # customize it for your network configuration. # # See the manual "System and Network Administration for the Sun # Workstation". Look at "Setting Up The Mail Routing System" in # the chapter on Communications. The Sendmail reference in the # back of the manual is also useful. # # @(#)main.mc 1.17 90/01/04 SMI # ### local info # delete the following if you have no sendmailvars table Lmmaildomain # my official hostname Dwpink Cwpink Dmsun.co.kr Cmsun.co.kr # You have two choices here. If you want the gateway machine to identify # itself as the DOMAIN, use this line: #Dj$m # If you want the gateway machine to appear to be INSIDE the domain, use: Dj$w.$m # if you are using sendmail.mx (or have a fully-qualified hostname), use: #Dj$w # major relay mailer DMddn # major relay host DRmail.kornet.nm.kr CRmail.kornet.nm.kr ################################################# - mailÀ» º¸³¾¶§ DR¿¡ ÁöÁ¤µÈ mail relay host¸¦ °ÅÄ¡Áö ¾Ê°í DNS¿¡ Á¤ÀÇµÈ mail exchanger(MX)¸¦ ÀÌ¿ëÇØ direct·Î ¸ÞÀÏÀ» º¸³»°í ½ÍÀº °æ¿ì¿¡´Â ¾Æ·¡¿Í °°ÀÌ sendmail.cfÈ­ÀÏÀÇ ¾à 400 ~ 405¹ø ¶óÀÎÀÇ ³»¿ëÀ» º¯°æÇÑ´Ù. º¯°æÀü # Replace following with above to only forward "known" top-level domains R$*<@$*.$+>$* $#$M $@$R $:$1<@$2.$3>$4 user@any.domain # if you are on the DDN, then comment-out both of the the lines above # and use the following instead: #R$*<@$*.$+>$* $#ddn $@ $2.$3 $:$1<@$2.$3>$4 user@any.domain º¯°æÈÄ # Replace following with above to only forward "known" top-level domains #R$*<@$*.$+>$* $#$M $@$R $:$1<@$2.$3>$4 user@any.domain # if you are on the DDN, then comment-out both of the the lines above # and use the following instead: R$*<@$*.$+>$* $#ddn $@ $2.$3 $:$1<@$2.$3>$4 user@any.domain 2.2 Sendmail Daemon »ì¸®±â #/usr/lib/sendmail -bd -q1h -bd : daemonÀ̶ó´Â °ÍÀ» ¸í½Ã -q1h : Queue interval ÁöÁ¤ mail Àü¼Û½Ã error°¡ ³ª¸é /usr/spool/mqueue µð·ºÅ丮¿¡ ½×ÀÌ°Ô µÇ´Âµ¥ ¿©±â¿¡ ½×ÀÎ ¸ÞÀÏÀ» Àç Àü¼ÛÇÏ´Â Áֱ⸦ Á¤ÇÏ´Â °ÍÀ¸·Î 1½Ã°£À̸é "q1h", 30ºÐÀ̸é "q30m" À̶ó°í ÁöÁ¤ÇÏ¸é µÈ´Ù. 3. ¸ÞÀÏ Àü¼Û Å×½ºÆ® -¸ÞÀÏ¿¡´Â /bin/mail°ú /bin/mailxÀÇ µÎ°¡Áö ¹öÁ¯ÀÌ Àִµ¥ /bin/mailx°¡ ±â´É»ó »ç¿ëÇϱâ ÆíÇÏ°Ô µÇ¾îÀÖÀ¸¹Ç·Î ÀÌ°ÍÀ» »ç¿ëÇÏ´Â °ÍÀÌ ÁÁ´Ù. -Å×½ºÆ® # /bin/mailx -v »ó´ë¹æÀüÀÚ¸ÞÀÏÁÖ¼Ò À§¿Í°°ÀÌ ÇÏ¸é ¸ÞÀÏÀÌ Àü¼ÛµÇ´Â °úÁ¤ÀÌ º¸¿©Áö´Âµ¥ ÀÌ °æ¿ì Á¦ÀÏ ¸¶Áö¸·¿¡ "sent"¶ó°í ³ª¿À¸é Á¤»óÀûÀ¸·Î ¹è´ÞÀÌ µÈ°ÍÀÌ´Ù. ¿¹) hsbyunÀ̶ó´Â »ç¿ëÀÚ°¡ pink.sun.co.kr À̶ó´Â ½Ã½ºÅÛ¿¡¼­ root@kum.kaist.ac.kr·Î ¸ÞÀÏÀ» º¸³»´Â °æ¿ì # /bin/mailx -v root@kum.kaist.ac.kr Subject: test test mail . EOT # root@kum.kaist.ac.kr... Connecting to kum.kaist.ac.kr via ether... Trying 128.134.1.1... connected. 220 kum.kaist.ac.kr Sendmail 4.1/KUM-0.1 ready at Fri, 2 Apr 93 14:25:38 KST >>> HELO pink.sun.co.kr 250 kum.kaist.ac.kr Hello pink.sun.co.kr pleased to meet you >>> MAIL From:<hsbyun@pink.sun.co.kr> 250 <hsbyun@pink.sun.co.kr>... Sender ok >>> RCPT To:<root@kum.kaist.ac.kr> 250 <root@kum.kaist.ac.kr>... Recipient ok >>> DATA 354 Enter mail, end with "." on a line by itself >>> . 250 Mail accepted >>> QUIT 221 kum.kaist.ac.kr delivering mail root@kum.kaist.ac.kr... Sent6À