´ÙÀ½ ÀÌÀü Â÷·Ê

3. Ãß°¡ÀûÀÎ ÀÛ¾÷µé

3.1 sendmail.cwÀÇ »ý¼º

/etc/mail/sendmail.cw¿¡ ¸ÞÀÏÀ» ¹ÞÀ» ¼ö Àִ ȣ½ºÆ® À̸§À» Àû½À´Ï´Ù. ÀÌ°÷¿¡ ÀûÀº À̸§À¸·Î ¸ÞÀÏÀÌ µé¾î¿À¸é ´õ ÀÌ»ó ´Ù¸¥°÷À¸·Î ¸ÞÀÏÀ» º¸³»Áö ¾Ê°í MDA(Mail Delivery Agent, ¸ÞÀÏÀ» MTA¿¡°Ô¼­ ¹Þ¾Æ ¸ÞÀϹڽº¿¡ ÀúÀåÇÏ´Â ÇÁ·Î±×·¥)·Î Àü´ÞÇÕ´Ï´Ù. º¸Åë FQDN(Fully Qualified Domain Name)À» Àû°í ¸¸ÀÏ ¿©·¯°³ÀÇ È£½ºÆ® À̸§À» »ç¿ëÇÑ´Ù¸é ¸ðµÎ Àû¾îÁà¾ß ÇÕ´Ï´Ù.

/ $ cd /etc/mail
mail $ cat sendmail.cw
hostname.domain.com
hostname2.domain.com

3.2 µð·ºÅ丮 ¸ðµåº¯È¯

sendmail 8.9.x ¿¡¼­´Â º¸¾È»ó ¸î°¡Áö µð·ºÅ丮ÀÇ ¸ðµå¸¦ °Ë»çÇؼ­ Àû´çÇÏÁö ¾Ê´Ù¸é sendmailÀÚü°¡ ½ÇÇàÀÌ ¾ÈµË´Ï´Ù. µû¶ó¼­ ¾Æ·¡¿Í °°ÀÌ ÀÔ·ÂÇØ ÁÖ¾î¾ß ÇÕ´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº DontBlameSendmail and Enhanced File Security¸¦ Âü°íÇϽñ⠹ٶø´Ï´Ù.

/ $ chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
/ $ chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue

ÀÌ°Í ¿Ü¿¡µµ À¯Àúµð·ºÅ丮¿¡ ±×·ìÀÌ ¾²±â°¡´ÉÇϰųª, other°¡ ¾²±â °¡´ÉÇÏ´Ù¸é .forward°¡ ÀÛµ¿ÇÏÁö ¾Ê½À´Ï´Ù. ¸¸ÀÏ ÀÏ¹Ý »ç¿ëÀÚÀÇ .forwardÆÄÀÏÀÌ ÀÛµ¿ÇÏÁö ¾ÊÀ¸¸é ±× »ç¿ëÀÚ È¨ µð·ºÅ丮ÀÇ ¸ðµå¸¦ È®ÀÎÇϽñ⠹ٶø´Ï´Ù.

3.3 /etc/hostsÆÄÀÏ

Âü°í·Î /etc/hosts ÆÄÀÏÀÇ ÇüÅ°¡ ´ëºÎºÐ ¾Æ·¡¿Í °°ÀÌ µÇ¾îÀÖ½À´Ï´Ù.

/ $ cat /etc/hosts
127.0.0.1       localhost       
155.230.28.125  khaki   loghost
155.230.28.115  purple

ÇÏÁö¸¸ ÀÌ ÆÄÀÏÀ» ¾Æ·¡¿Í °°ÀÌ ¼öÁ¤ÇϽñ⠹ٶø´Ï´Ù. (Â÷ÀÌÁ¡Àº ¾Æ½Ã°ÚÁÒ? ^^)

/ $ cat /etc/hosts
127.0.0.1       localhost       
155.230.28.125  khaki.ce.kyungpook.ac.kr        khaki   loghost
155.230.28.115  purple.ce.kyungpook.ac.kr       purple

3.4 Å×½ºÆ®

ÀÌ·¸°Ô ¼³Á¤À» ¸ðµÎ ¸¶Ä¡¼Ì´Ù¸é ´ÙÀ½°ú °°ÀÌ Çؼ­ ¿¡·¯ ¸Þ½ÃÁö°¡ ¾ø´ÂÁö¸¦ È®ÀÎÇØ º¸½Ã±â ¹Ù¶ø´Ï´Ù.

/ $ /usr/lib/sendmail -bi

ÀÌ ¶§ ¿¡·¯ ¸Þ½ÃÁö°¡ ¾ø¾î¾ß ÇÕ´Ï´Ù. ¸¸ÀÏ ¿¡·¯ ¸Þ½ÃÁö°¡ ³µ´Ù¸é /var/log/syslog È­ÀÏÀÇ µÞºÎºÐÀ» º¸½Ã±â ¹Ù¶ø´Ï´Ù. ¸¸ÀÏ º° ¹®Á¦°¡ ¾ø´Ù¸é ÀÌÁ¦ sendmailÀ» ´Ù½Ã ¶ç¿ì½Ã¸é µË´Ï´Ù.

3.5 µ¥¸ó ¶ç¿ì±â

/ $ /usr/lib/sendmail -bd -q1h

±×¸®°í ¹Ýµå½Ã /var/log/syslog ¸¦ È®ÀÎÇϽðí, ¸ÞÀÏÀ» º¸³»°í ¹Þ´Â Å×½ºÆ®¸¦ Áö±Ý ¹Ù·Î ÇØ ÁÖ¼¼¿ä. ±×¸®°í /var/log/syslog ¿¡ ¿¡·¯ ¸Þ½ÃÁö°¡ ÀÖ´ÂÁöµµ »ìÆì º¸½Ã±â ¹Ù¶ø´Ï´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê