· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Linuxdoc Sgml/Sendmail-KLDP

sendmail À̾߱â

sendmail À̾߱â

Àå¿ìÇö(Woohyun JANG), louis@mizi.co.kr

1998³â 12¿ù 4ÀÏ
º» ±Û¿¡¼­´Â MTAÁßÀÇ ÇϳªÀÎ(ÇÏÁö¸¸ °¡Àå À¯¸íÇÏ°í, °¡Àå ¸¹ÀÌ »ç¿ëµÇ´Â) sendmail¿¡ °üÇÑ ¾ê±â¸¦ ÇÏ°í ÀÖ½À´Ï´Ù. º¸½Ã°í Àǹ®Á¡À̳ª Ʋ¸°±Û ¸ðÈ£ÇÑ ±ÛÀº Àú¿¡°Ô ¸ÞÀÏ·Î ¾Ë·ÁÁֽñ⠹ٶø´Ï´Ù.

1. sendmailÀ̶õ?

ÀÎÅͳÝÀ» Á¶±ÝÀÌ¶óµµ ½á º¸½ÅºÐÀº sendmailÀ̶õ ¸»À» µé¾îº¸¼ÌÀ» ²®´Ï´Ù. ¾Æ´Ï ¿äÁò °°ÀÌ Ã¥µéÀÌ ¸¹ÀÌ ³ª¿ÔÀ»¶§´Â ÀÎÅͳÝÀ» ¾²Áö ¾ÊÀ¸¼Åµµ sendmailÀ̶õ ¸»Àº µé¾îº¸¼ÌÀ» Áöµµ ¸ð¸¨´Ï´Ù. ¾Æ¸¶ ´ëºÎºÐÀÇ »ç¶÷µéÀº °ú¿¬ sendmailÀÌ ¹«¾ùÀ̱淡 »ç¶÷µéÀÇ ÀÔ¿¡ ¿À¸£³»¸®´ÂÁö?, ²À ½á¾ß Çϴ°ÇÁö? ¶ó´Â »ý°¢À» ÇØ º¸¼ÌÀ»ÅÙµ¥¿ä ¿©±â¿¡¼­´Â sendmailÀÌ ¹«¾ùÀÌ¸ç ¾î¶»°Ô ¼³Ä¡ÇÏ°í sendmail¿¡¼­ ¾ß±âµÇ´Â ¸î°¡Áö ¹®Á¦Á¡µé¿¡ ´ëÇØ À̾߱⸦ ÇØ º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù.

¿ì¼± sendmailÀº ÀÎÅͳݿ¡¼­ ÀüÀÚ¸ÞÀÏÀ» Àü¼ÛÇϱâ À§ÇØ »ç¿ëµÇ´Â ÇÁ·Î±×·¥À̶ó°í »ý°¢ÇÏ½Ã¸é µË´Ï´Ù. ±×·³ ÀÌ·¸°Ô ´ë´äÇϽô ºÐµéÀÌ °è½Ç²¨¿¹¿ä. "¾î! Àú´Â ÀüÀÚ¸ÞÀÏÀ» º¸³»°í ¹Þ´Âµ¥ Netscape Messanger¸¦ ¾²´Âµ¥¿ä! ±×·³ sendmailÀº ¸ô¶óµµ µÇ°Ú³×¿ä!" ÇÏÁö¸¸ Áö±Ý±îÁö ¸ð¸£¼ÌÀ»Áö ¸ð¸£Áö¸¸ Netscape Messanger°°Àº ¸ÞÀÏÇÁ·Î±×·¥À» »ç¿ëÇϽôõ¶óµµ sendmailÀº »ç¿ëÇØ ¿À¼ÌÀ» °Ì´Ï´Ù. ÀüÀÚ¸ÞÀÏ ½Ã½ºÅÛ¿¡¼­ »ç¿ëµÇ´Â ¿ë¾îÁß Netscape Messanger¿Í °°Àº ÇÁ·Î±×·¥Àº MUA(Mail User Agent)¶ó°í ºÎ¸¨´Ï´Ù. ±×¿¡ ºñÇØ sendmailÀº MTA(Mail Transfer Agent)¶ó°í ºÎ¸¨´Ï´Ù.

¿ì¼± ÀÎÅͳÝÀ¸·Î ÆíÁö¸¦ º¸³ÂÀ»¶§ ¾î¶² °æ·Î·Î Àü´ÞµÇ´ÂÁö ¾Ë¾Æº¸µµ·Ï ÇÏÁÒ. ¿©±â¿¡¼­ ¸ÞÀϼ­¹ö·Î taegu.ac.kr¸¦ »ç¿ëÇÏ´Â whjangÀ̶ó´Â »ç¿ëÀÚ°¡ kebi.com ÄÄÇ»ÅÍ¿¡ ÀÖ´Â peach¶õ »ç¿ëÀÚ¿¡°Ô ¸ÞÀÏÀ» º¸³½´Ù°í °¡Á¤Çغ¸ÁÒ. ¿ì¼± »ç¿ëÇÏ´Â MUA(¿©±â¿¡¼­´Â Netscape Messanger, ÁÙ¿©¼­ NMÀ̶ó°í ºÎ¸£°Ú½À´Ï´Ù.)´Â ¸ÞÀϼ­¹öÀÇ 25¹ø Æ÷Æ®¿¡ Á¢¼ÓÀ» ÇÕ´Ï´Ù. ¸ÞÀϼ­¹öÀÇ 25¹ø Æ÷Æ®¿¡¼­´Â MTA(¿©±â¿¡¼­ ¼³¸íÇÏ´Â sendmailÀÌ ÇØ´çµË´Ï´Ù. ÀÌÇÏ sendmailÀ̶ó°í ¾ð±ÞÇÏ°Ú½À´Ï´Ù.)°¡ ´ë±âÇÏ°í ÀÖ´Ù°¡ NMÀÌ º¸³»°íÀÚ ÇÏ´Â ¸ÞÀÏÀ» ¹Þ½À´Ï´Ù. ±×·¯¸é sendmailÀº ½ºÇ®µð·ºÅ丮(½Ã½ºÅÛ ¸¶´Ù Á¶±Ý¾¿ Ʋ¸³´Ï´Ù. Á¦°¡ »ç¿ëÇÏ´Â Solaris 2.x¿¡¼­´Â /var/spool/mqueue¸¦ »ç¿ëÇÕ´Ï´Ù.)¿¡ ¸ÞÀÏÀ» ÀúÀåÇØ µÐ ÈÄ kebi.comÀÇ 25¹ø Æ÷Æ®·Î Á¢¼ÓÇÕ´Ï´Ù. kebi.com¿¡µµ sendmailÀÌ 25¹ø Æ÷Æ®¿¡¼­ ´ë±âÇÏ°í ÀÖ°ÚÁÒ. Á¤»óÀûÀ¸·Î Á¢¼ÓÀ» ÇÑ ÈÄ taegu.ac.kr¿¡ ÀÖ´Â sendmailÀº kebi.com¿¡ ÀÖ´Â sendmail¿¡°Ô ¸ÞÀÏÀ» Àü¼ÛÇÑ ÈÄ ÀÚ½ÅÀÇ ½ºÇ®¿¡ ÀúÀåµÈ ¸ÞÀÏÀ» »èÁ¦ÇÕ´Ï´Ù. taegu.ac.kr¿¡ ÀÖ´Â sendmailÀº ´õÀÌ»ó ÇÒ ÀÏÀÌ ¾ø´Â°ÅÁÒ. ¸¸ÀÏ kebi.com¿¡ ÀÌ»óÀÌ À־ Á¢¼ÓÇÒ ¼ö ¾ø´Ù¸é ¾î¶»°Ô µÉ±î¿ä? taegu.ac.kr¿¡ ÀÖ´Â sendmailÀº ¸ÞÀÏÀ» ½ºÇ® µð·ºÅ丮¿¡ °è¼Ó °¡Áö°í ÀÖÀ¸¸ç ¼ö½Ã·Î Á¢¼ÓÀ» ½ÃµµÇÕ´Ï´Ù. ±×·¯´Ù°¡ ¸çÄ¥ÀÌ Áö³ªµµ º¸³¾ ¼ö ¾ø´Ù¸é óÀ½¿¡ ¸ÞÀÏÀ» º¸³½ »ç¶÷¿¡°Ô ¸ÞÀÏÀ» º¸³¾ ¼ö ¾ø´Ù°í µÇµ¹·Á ÁÝ´Ï´Ù.

ÀÌÁ¦ ¸ÞÀÏÀ» ¹ÞÀº kebi.com¿¡ ÀÖ´Â sendmailÀÌ ÇÏ´ÂÀÏÀ» Â÷·Ê´ë·Î »ìÆ캸ÁÒ. ¸ÞÀÏÀ» ¹ÞÀº sendmailÀº ¸ÞÀÏÀÇ µµÂøÁö°¡ ÀÚ½ÅÀÎÁö È®ÀÎÀ» ÇÕ´Ï´Ù.(sendmail.cwÆÄÀÏ ÂüÁ¶) ¸¸ÀÏ µµÂøÁö°¡ ÀÚ½ÅÀÌ ¾Æ´Ï¶ó¸é µµÂøÁö·Î ¸ÞÀÏÀ» ´Ù½Ã Àü¼ÛÇÕ´Ï´Ù. (ÀÌ °æ¿ì¿¡´Â ¾Æ·¡¿¡ ¼³¸íµå¸®°ÚÁö¸¸ relay¸¦ Çã¿ëÇϴ ȣ½ºÆ®·Î¸¸ Àü´ÞÇÒ ¼ö ÀÖ½À´Ï´Ù. ±×·¸Áö ¾ÊÀº°æ¿ì¿¡´Â ¿¡·¯¸¦ Ãâ·ÂÇÕ´Ï´Ù.) ¸¸ÀÏ ÀÚ½ÅÀÌ ¸ÞÀÏÀÇ µµÂøÁö¶ó¸é ¸ÞÀÏÀ» MDA(Mail Delivery Agent)¿¡°Ô ³Ñ°ÜÁÝ´Ï´Ù. MDA´Â ¸ÞÀÏÀ» MTA·ÎºÎÅÍ ¹Þ¾Æ¼­ ¸ÞÀϹڽºµî¿¡ ÀúÀåÇϰųª ¿øÇÏ´Â ÇÊÅ͸µÀ» ÇÒ ¼ö ÀÖ´Â ÇÁ·Î±×·¥ÀÔ´Ï´Ù. º¸Åë ±âº»ÀûÀ¸·Î »ç¿ëÇÏ´Â MDAÇÁ·Î±×·¥Àº /bin/mailÀ̸ç, ÇÑ±Û Ã³¸®¸¦ À§ÇØ procmailÀ» ÀÌ¿ëÇÏ´Â ¼­¹öµµ ¸¹ÀÌ ÀÖ½À´Ï´Ù. ¸ÞÀÏÀ» ¹ÞÀº MDA´Â ÇÊÅ͸µ °úÁ¤À» °ÅÄ£ ÈÄ »ç¿ëÀÚÀÇ ¸ÞÀϹڽº¿¡ ÀúÀåÇÕ´Ï´Ù.

ÀÌÁ¦ ¸ÞÀÏÀÇ Àü¼ÛÀº ¿Ï·áµÇ¾ú½À´Ï´Ù. »ç¿ëÀÚ´Â mutt³ª pineµîÀÇ MUA¸¦ ÀÌ¿ëÇÏ¿© ¸ÞÀÏÀ» È®ÀÎÇÒ ¼ö ÀÖÀ¸¸ç ¿ÜºÎ¿¡¼­ ¸ÞÀÏÀ» È®ÀÎÇÏ´Â °æ¿ì POP3³ª IMAPÇÁ·ÎÅäÄÝÀ» ÀÌ¿ëÇÏ¿© ¸ÞÀϹڽº¸¦ °¡Á®°¥ ¼ö ÀÖ½À´Ï´Ù. POP3³ª IMAP¿¡ °üÇÑ ³»¿ëÀº º» ±ÛÀÇ ¹üÀ§¸¦ ¹þ¾î³ª¹Ç·Î ¼³¸íÀº ÇÏÁö ¾Ê°Ú½À´Ï´Ù.

À̻󿡼­ º¸µíÀÌ sendmailÀº MTAÀÇ ¿ªÈ°À» ÇÕ´Ï´Ù. »ç¿ëÀڷκÎÅÍ ¸ÞÀÏÀ» Àü´Þ¹Þ¾Æ ´Ù¸¥ ÄÄÇ»ÅÍÀÇ MTA¿¡°Ô ³Ñ°ÜÁÖ°í, ´Ù¸¥ MTA·Î ºÎÅÍ ¹ÞÀº ¸ÞÀÏÀ» MDA¿¡°Ô ³Ñ°ÜÁÖ´Â ÀÎÅÍ³Ý ÀüÀÚ¸ÞÀÏÀÇ °¡Àå Á߽ɺο¡ À§Ä¡ÇÏ°í ÀÖ½À´Ï´Ù. ¹°·Ð MTA¿¡´Â ´Ù¾çÇÑ ÇÁ·Î±×·¥ÀÌ ÀÖÁö¸¸ sendmailÀº Ä«Å×°í¸® ų·¯(ÇØ´çºÐ¾ßÀÇ ´Ù¸¥ ÇÁ·Î±×·¥µéÀº ¾Æ¿¹ ÀØÇôÁ® ¹ö¸± ¸¸ÇÑ °æÀï·ÂÀ» °®Ãß°í ÀÚ½ÅÀÇ ÁöÀ§¸¦ È®°íÈ÷ ÇÏ´Â ÃÖ°í ¼öÁØÀÇ ÇÁ·Î±×·¥)°¡ µÉ ¼ö ÀÖ´Â ´É·ÂÀ» °®Ãß¾ú°í, ÇöÀç UNIX±â¹Ý ¸ÞÀϼ­¹öÀÇ °ÅÀÇ ´ëºÎºÐÀÌ MTA·Î sendmailÀ» ¾²°í ÀÖ½À´Ï´Ù.

2. ÄÄÆÄÀÏ ¹× ¼³Ä¡

2.1 °¡Á®¿À±â

http://www.sendmail.org¿¡¼­ ¹èÆ÷ÇÏ´Â sendmailÀÇ ¹èÆ÷ÆÇÀº 1998³â 10¿ù 31ÀÏ ÇöÀç 8.9.1aÀÌ ÃÖ½ÅÀÔ´Ï´Ù. (ÀÌ´Â sendmail 8.9.1°ú 8.9.1a·ÎÀÇ ÆÐÄ¡·Î ÀÌ·ç¾îÁ® ÀÖ½À´Ï´Ù.) ¿ì¼± ÆÄÀÏÀ» ´Ù¿î·Îµå ¹Þ¾Æ¼­ Ç®¾îµÓ´Ï´Ù.

temp $ gzip -dc sendmail.8.9.1.tar.gz | tar xvf -
temp $ cd sendmail-8.9.1/src
src $ patch < ../../sendmail.8.9.1a.patch

** Solarisµî¿¡ ±âº»ÀûÀ¸·Î µé¾îÀÖ´Â patch¸¦ »ç¿ëÇϸé Àß µÇÁö ¾Ê½À´Ï´Ù. GNU patch¸¦ ¼³Ä¡Çϼż­ »ç¿ëÇϽñ⠹ٶø´Ï´Ù.

2.2 ÄÄÆÄÀÏ

ÁÖÀÇ**) http://www.sendmail.org/compiling.html¿¡¼­´Â srcµð·ºÅ丮¿¡¼­ Á÷Á¢ make¸¦ ÀÌ¿ëÇؼ­ ÄÄÆÄÀÏ ÇÏÁö ¸»µµ·Ï ÇÏ°í ÀÖ½À´Ï´Ù. ÀÌ ´ë½Å Build ½©½ºÅ©¸³Æ®¸¦ »ç¿ëÇϵµ·Ï ±ÇÇÏ°í ÀÖ½À´Ï´Ù.

°¡Àå ½¬¿î ¹æ¹ýÀº Build½ºÅ©¸³Æ®¸¦ »ç¿ëÇÏ´Â °ÍÀÔ´Ï´Ù. ´Ü¼øÈ÷ sh Build ¶ó°í Ä¡¸é ÄÄÆÄÀÏ ÀÛ¾÷À» ¼öÇàÇÕ´Ï´Ù. (±âÁ¸¿¡ sendmailÀ» ¼³Ä¡Çß´ø »ç¶÷µéÁß¿¡´Â makesendmail ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÑ »ç¶÷µéÀÌ ¸¹Àºµ¥ ÀÌ´Â Build ½ºÅ©¸³Æ®¿Í µ¿ÀÏÇÑ ÇÁ·Î±×·¥À» °¡¸®Å°°í ÀÖÀ¸¹Ç·Î Build¸¦ »ç¿ëÇصµ ¹«¹æÇÕ´Ï´Ù. µû¶ó¼­ makesendmail´ë½Å¿¡ Build¸¦ »ç¿ëÇϱ⸦ ±ÇÇÕ´Ï´Ù.)

sendmail 8.9.1 $ cd src
src $ sh Build
Configuration: os=SunOS, rel=5.6, rbase=5, rroot=5.6, arch=sun4, sfx=
Using M4=/usr/ccs/bin/m4
Creating obj.SunOS.5.6.sun4 using ../BuildTools/OS/SunOS.5.6
Making dependencies in obj.SunOS.5.6.sun4
gcc -M -I.  -DNDBM -DNIS -DNISPLUS -DMAP_REGEX -DSOLARIS=20600  *.c >> Makefile
Making in obj.SunOS.5.6.sun4
gcc -O -I.  -DNDBM -DNIS -DNISPLUS -DMAP_REGEX -DSOLARIS=20600    -c alias.c -o alias.o

À§ÀÇ ¸Þ½ÃÁö¸¦ Àá½Ã »ìÆ캸¸é ÇöÀç ½Ã½ºÅÛÀÌ »ç¿ëÇÏ°í ÀÖ´Â ¿î¿µÃ¼Á¦(os)´Â SunOSÀ̸ç release´Â 5.6ÀÓÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù. ¶ÇÇÑ ½Ã½ºÅÛÀÇ ¾ÆÅ°ÅØÃÄ´Â sun4ÀÔ´Ï´Ù. ³ªÁß¿¡ sendmail.cfÆÄÀÏÀ» ¸¸µé¶§ »ç¿ëÇÏ´Â m4´Â /usr/ccs/bin/m4¸¦ »ç¿ëÇÏ°í ÇöÀç µð·ºÅ丮 ¾Æ·¡¿¡ obj.SunOS.5.6.sun4 µð·ºÅ丮¿¡ ¹ÙÀ̳ʸ® ÆÄÀϵéÀ» »ý¼ºÇϸç ÄÄÆÄÀÏ ¶§ »ç¿ëÇÏ´Â ÆÄÀÏÀº ../BuildTools/OS/SunOS.5.6 ÀÓÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù.

¿ì¼± Makefile¿¡ ¼Ò½ºÆÄÀÏÀÇ ÀÇÁ¸°ü°è¸¦ Ãß°¡ÇÏ°í º»°ÝÀûÀÎ ÄÄÆÄÀÏÀ» ½ÃÀÛÇÕ´Ï´Ù. (ÀÇÁ¸°ü°èÀÇ »ý¼º¿¡ °üÇÑ ³»¿ëÀº Makefile¿¡ °ü·ÃµÈ ÀڷḦ Âü°íÇϱ⠹ٶø´Ï´Ù.)

sendmailÀº ´Ù¾çÇÑ ¼³Á¤À» °¡Áö´Âµ¥ ÁÖ·Î ¸ÅÅ©·Î¸¦ »ç¿ëÇÏ¿© ¼³Á¤ÇÕ´Ï´Ù. À§¿¡¼­ »ç¿ëµÈ -DNBDM -DNIS -DNISPLUS -DMAP_REGEXµîÀÌ ±×°ÍÀÔ´Ï´Ù. ÀÌ°Í ÀÌ¿Ü¿¡µµ ¸¹Àº ¸ÅÅ©·Î°¡ ÀÖÀ¸¸ç ¿©±â¿¡¼­´Â ±×Áß¿¡¼­ Áß¿äÇѰ͸¸ ¼³¸íÇÏ°Ú½À´Ï´Ù.

  • -DNEWDB : Berkeley DBÆÐÅ°Áö¸¦ »ç¿ëÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. sendmail¿¡¼­´Â alias¿Í ÀϹÝÀûÀÎ ¸Ê(map)À» À§Çؼ­ DBÆÐÅ°Áö¸¦ ÀÌ¿ëÇϴµ¥ ÀÌ DBÆÐÅ°Áö Áß Berkeley DBÆÐÅ°Áö¸¦ »ç¿ëÇÔÀ» ÀǹÌÇÏ´Â ¸ÅÅ©·ÎÀÔ´Ï´Ù. ¸¸ÀÏ ¼³Ä¡ÇÏ°íÀÚ ÇÏ´Â ½Ã½ºÅÛ¿¡ Berkeley DBÆÐÅ°Áö°¡ ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê´Ù¸é http://www.sleepycat.com¿¡¼­ ÃֽŠ¹öÀüÀÇ ÆÐÅ°Áö¸¦ °¡Á®´Ù ¼³Ä¡ÇϽñ⠹ٶø´Ï´Ù. sendmail¿¡¼­´Â DBÆÐÅ°Áö·Î Berkeley DB¸¦ »ç¿ë±â¸¦ ±ÇÇÏ°í ÀÖ½À´Ï´Ù. ¹°·Ð ´Ù¸¥ ÆÐÅ°Áö¸¦ »ç¿ëÇÒ ¼ö ÀÖÀ¸³ª Berkeley DBÆÐÅ°Áö¸¦ ±¸Çؼ­ ¼³Ä¡ÇÏ´Â°Ô ¿©·¯¸ð·Î ÁÁ½À´Ï´Ù. ÇÊÀÚµµ óÀ½¿¡ gdbmÀ» »ç¿ëÇÏ´Ù°¡ Berkeley DB·Î ¹Ù²Ù¾ú½À´Ï´Ù.
  • -DNDBM : DBÆÐÅ°Áö·Î ¿¾³¯¿¡ »ç¿ëµÇ¾ú´ø NDBMÆÐÅ°Áö¸¦ »ç¿ëÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. (NDBM¸ÅÅ©·Î¸¦ Á¤ÀÇÇßÀ»¶§ gdbm¶óÀ̺귯¸®¸¦ ¸µÅ©ÇÕ´Ï´Ù.) ÀÌ NDBMÆÐÅ°Áö´Â ´õ ÀÌ»ó »ç¿ëµÇÁö ¾ÊÀ¸¸ç µû¶ó¼­ ¼³Ä¡ÀÚ´Â NDBM´ë½Å¿¡ NEWDB¸¦ »ç¿ëÇÏ´Â°Ô ÁÁ½À´Ï´Ù.
  • -DNIS, -DNISPLUS : °¢°¢ NIS¿Í NIS+¸¦ Áö¿øÇϱâ À§ÇØ »ç¿ëÇÕ´Ï´Ù. ¸¸ÀÏ ½Ã½ºÅÛ¿¡¼­ NIS¿Í NIS+¸¦ Áö¿øÇÑ´Ù¸é ÀÌ ¸ÅÅ©·Î¸¦ Á¤ÀÇÇؼ­ ¾²´Â°Ô ÁÁ½À´Ï´Ù.
  • -DMAP_REGEX : ½ºÆÔ¸ÞÀϵîÀ» ÇÊÅ͸µÇÒ ¶§ Á¤±Ô½Ä(Regular Expression)À» »ç¿ëÇÒ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. ÀÌ ¸ÅÅ©·Î¸¦ »ç¿ëÇÏ·Á¸é POSIXÀÇ regex()·çƾÀÌ Àְųª, FSF¿¡¼­ ¸¸µç regexp ¶óÀ̺귯¸®°¡ ¼³Ä¡µÇ¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù.

ÀÌ ¸ÅÅ©·ÎµéÀº ¿©·¯°³¸¦ ÇѲ¨¹ø¿¡ Á¤ÀÇÇؼ­ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. (½ÉÁö¾î´Â -DNEWDB¿Í -DNDBMµµ ÇѲ¨¹ø¿¡ Á¤ÀÇÇؼ­ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ¹°·Ð ÀÌ °æ¿ì¿¡´Â óÀ½¿¡ NDBMÀ¸·Î ¸¸µé¾îÁø aliasÆÄÀÏÀ» Àоî Berkeley DBÇüÅ·Π¹Ù²Ù°í Berkeley DBÇüÅ·Π°è¼Ó »ç¿ëÇÕ´Ï´Ù.) ÇÏÁö¸¸ -DNDBMÀº ¾²Áö ¸»±â¸¦ ÇÊÀÚ´Â ÃßõÇÕ´Ï´Ù. ±×¸®°í ¸¸ÀÏ -DNEWDB°¡ Build ½ºÅ©¸³Æ®¿¡ ÀÇÇؼ­ ÀÚµ¿ÀûÀ¸·Î Ãß°¡µÇÁö ¾Ê¾Ò´Ù¸é Á÷Á¢ MakefileÀ» ¼öÁ¤Çؼ­ Ãß°¡Çϵµ·Ï ÇÕ´Ï´Ù.

ÀÌ·¸°Ô MakefileÀ» ¼öÁ¤ÇÑ °æ¿ì »õ·Î ÄÄÆÄÀÏ ÇÏ´Â °ÍÀÌ ÁÁ½À´Ï´Ù. ¸¸ÀÏ ÇÁ·Î±×·¥¿¡ Àͼ÷ÇÏ´Ù¸é ÇÊÀÚ°¡ Á÷Á¢ ¾ð±ÞÇÏÁö ¾Ê¾Æµµ Àß ¾Ë°ÚÁö¸¸, ±×·¸Áö ¾ÊÀº °æ¿ì -DNEWDB¿Í °°ÀÌ ¸ÅÅ©·Î¸¦ ¼öÁ¤Çß´Ù¸é ¸ðµç ÀÌÁøÆÄÀÏÀÎ *.o¿Í sendmail¹ÙÀ̳ʸ®¸¦ »èÁ¦ÇÑ ÈÄ ´Ù½Ã Build¸¦ ½ÇÇàÇÏ°í, -ldbµîÀ¸·Î ¶óÀ̺귯¸®¸¦ Ãß°¡Çß´Ù¸é sendmail¹ÙÀ̳ʸ®¸¸ »èÁ¦ÇÑ ÈÄ ´Ù½Ã Build¸¦ ½ÇÇàÇÏ¸é µË´Ï´Ù.

¸¸ÀÏ Solaris 2.6À» »ç¿ëÇÑ´Ù¸é -DNEWDB -DNIS -DNISPLUS -DMAP_REGEX¸¦ MAPDEF¿¡ Á¤ÀÇÇÏ°í, LIBS´Â -lresolv -lsocket -lnsl -lkstat -ldbÀ» »ç¿ëÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù. ÇÊÀÚ´Â Solaris 2.6¿¡¼­ À§¿Í°°ÀÌ ¼³Á¤ÇÑ ÈÄ Àß ¾²°í ÀÖ½À´Ï´Ù. ¹°·Ð ÀÌ ¼³Á¤À» »ç¿ëÇؼ­ ÄÄÆÄÀÏ ÇÏ·Á¸é Berkeley DB°¡ ÀÌ¹Ì ¼³Ä¡µÇ¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù. ¾ÆÁ÷ Berkeley DBÆÐÅ°Áö¸¦ ¼³Ä¡ÇÏÁö ¾Ê¾Ò´Ù¸é ¿ì¼± ±×°ÍºÎÅÍ ¼³Ä¡ÇϽñ⠹ٶø´Ï´Ù.

2.3 ¼³Ä¡ ¹× sendmail.cf»ý¼º

ÇÁ·Î±×·¥ÀÇ »ý¼ºÀÌ ³¡³ª¸é obj.$os.$rel.$arch µð·ºÅ丮(¿¹¸¦µé¾î ÇÊÀÚÀÇ °æ¿ì SunOS.5.6.sun4)¿¡ µé¾î°¡¼­ ¼öÆÛÀ¯ÀúÀÇ ±ÇÇÑÀ¸·Î make installÀ» ½ÇÇàÇÏ¸é ¸Å´º¾óµîÀÇ ÆÄÀÏÀÌ ÀνºÅç µË´Ï´Ù. ±âº»ÀûÀ¸·Î sendmail ¹ÙÀ̳ʸ®´Â /usr/lib/ µð·ºÅ丮¿¡ ¼³Ä¡µË´Ï´Ù. ¼³Ä¡µÈ sendmail¹ÙÀ̳ʸ®ÀÇ ¸ðµå¿Í ¼ÒÀ¯ÀÚµîÀº ¾Æ·¡¿Í °°¾Æ¾ß ÇÕ´Ï´Ù.

/ $ ls -l /usr/lib/sendmail
-r-sr-x--x   1 root     bin       412896  6¿ù  5ÀÏ  18:04 /usr/lib/sendmail

¸¸ÀÏ À§¿Í ´Ù¸£´Ù¸é ¾Æ·¡¿Í °°ÀÌ ÀÔ·ÂÇÏ¿© Á¤È®ÇÏ°Ô ¸¸µå½Ã±â ¹Ù¶ø´Ï´Ù.

/ $ chown root /usr/lib/sendmail
/ $ chgrp bin /usr/lib/sendmail
/ $ chmod 4555 /usr/lib/sendmail

** GNU groff°¡ ¾ø´Â ½Ã½ºÅÛ¿¡¼­´Â ¸Þ´º¾óÀ» ¸¸µé¶§ ¿¡·¯°¡ ³³´Ï´Ù. GNU groff¸¦ ¼³Ä¡ÇÏ¸é ±ò²ûÇÏ°Ô(?) ÇØ°áÀÌ µÇÁö¸¸, ¿©ÀÇÄ¡ ¾ÊÀ»¶§´Â ¸Þ´º¾óÀ» ¼³Ä¡ÇÏÁö ¾Ê°í sendmail¹ÙÀ̳ʸ®¸¦ ¼öÀÛ¾÷À¸·Î ¼³Ä¡ÇÏ¿©µµ »ó°üÀÌ ¾ø½À´Ï´Ù.

ÀÌÁ¦ sendmail ¹ÙÀ̳ʸ® ÆÄÀÏÀº ¼³Ä¡¸¦ ÇßÀ¸¹Ç·Î sendmail.cf ÆÄÀÏÀ» ¸¸µé¾î¾ß ÇÕ´Ï´Ù. sendmail.cfÆÄÀÏÀº Á÷Á¢ ¼öÁ¤ÇÒ ¼ö ÀÖÀ¸³ª m4¸¦ ÀÌ¿ëÇؼ­ »ý¼ºÇÏ´Â°Ô ½±½À´Ï´Ù. cf/cf µð·ºÅ丮¿¡´Â ´Ù¾çÇÑ mcÆÄÀÏÀÌ ÀÖÀ¸¹Ç·Î ÀÚ½ÅÀÇ ½Ã½ºÅÛ¿¡ °¡Àå Àû´çÇÑ mcÆÄÀÏÀ» ¼±ÅÃÇÕ´Ï´Ù. ¿¹¸¦µé¾î ÇÊÀÚÀÇ °æ¿ì´Â Solaris 2.6À̹ǷΠgenric-solaris2.mc ÆÄÀÏÀ» »ç¿ëÇß½À´Ï´Ù. ÀÌ mcÆÄÀÏÀ» ÀÌ¿ëÇؼ­ sendmail.cfÆÄÀÏÀ» »ý¼ºÇÏ´Â ¹æ¹ýÀº ¾Æ·¡¿Í °°½À´Ï´Ù.

sendmail $ cd cf/cf
cf $ m4 ../m4/cf.m4 generic-solaris2.mc > sendmail.cf

ÀÌ sendmail.cf¸¦ /etc/mail ¿¡ º¹»çÇÑ ÈÄ /etc/sendmail.cf¸¦ /etc/mail/sendmail.cf·Î ½Éº¼¸¯ ¸µÅ©¸¦ »ý¼ºÇÕ´Ï´Ù. (ln -s /etc/mail/sendmail.cf /etc/sendmail.cf)

** LinuxÀÇ °æ¿ì¿¡´Â mcÆÄÀÏÀÌ ¾ø½À´Ï´Ù. À̶§´Â ´Ù¸¥ mcÆÄÀÏ¿¡¼­ OSTYPE¸¸ linux·Î º¯°æÇÑ ÈÄ »ý¼ºÇÏ¸é µË´Ï´Ù. Linux¿¡¼­ local mailer·Î procmailÀ» »ç¿ëÇÏ´Â ½Ã½ºÅÛ¿¡¼­ ÀϹÝÀûÀÎ mcÆÄÀÏÀº ¾Æ·¡¿Í °°½À´Ï´Ù.

VERSIONID(`linux for smtp-only setup with procmail for korean mail`)dnl
OSTYPE(linux)dnl
FEATURE(nouucp)dnl
FEATURE(local_procmail)dnl
FEATURE(access_db)dnl
MAILER(local)dnl
MAILER(smtp)dnl

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 ¿¡ ¿¡·¯ ¸Þ½ÃÁö°¡ ÀÖ´ÂÁöµµ »ìÆì º¸½Ã±â ¹Ù¶ø´Ï´Ù.

4. ÇѱÛÁö¿ø

¸ÞÀÏ¿¡¼­ »ç¿ëµÇ´Â SMTPÇÁ·ÎÅäÄÝÀº ±âº»ÀûÀ¸·Î 7bit¹®ÀÚ¸¸À» ±â¹ÝÀ¸·Î Á¦À۵Ǿú½À´Ï´Ù. ÇÏÁö¸¸ ÇѱÛÀÇ °æ¿ì EUC-KR·Î Ç¥ÇöÇϸé 8bit¸¦ »ç¿ëÇϱ⠶§¹®¿¡ ¹®Á¦°¡ »ý±æ ¼ö ÀÖ½À´Ï´Ù. µû¶ó¼­ ¸ÞÀÏ¿¡¼­ »ç¿ëÇϱâ À§ÇØ ÇѱÛÀÇ 7bit Ç¥Çö¹æ¹ýÀÎ ISO-2022-kr(RFC 1557)ÀÌ ¸¸µé¾î Á³°í ¸ÞÀÏÀÇ º»¹®¿¡ »ç¿ëµÇ¾ú½À´Ï´Ù(Çì´õ¿¡´Â EUC-KRÀ» B³ª QÀÎÄÚµù ¹æ¹ýÀ¸·Î ÀÎÄÚµùÇؼ­ »ç¿ëÇß½À´Ï´Ù.). ÇÏÁö¸¸ ´ëºÎºÐÀÇ ÇÁ·Î±×·¥¿¡¼­´Â ÇѱÛÀ» 8bitÇ¥Çö¹æ¹ýÀÎ EUC-KRÀ» »ç¿ëÇßÀ¸¹Ç·Î ÀÌ µÎ Ç¥Çö°£ÀÇ º¯È¯À» ÇØ ÁÖ´Â ÇÁ·Î±×·¥ÀÌ ÇÊ¿äÇß½À´Ï´Ù. ÀÌ ÀÛ¾÷Àº Å©°Ô MTA, MDA, MUA¿¡¼­ ÇØ ÁÙ ¼ö ÀÖ½À´Ï´Ù. MTA¿¡¼­ º¯È¯À» ÇØ ÁÖ´Â ´ëÇ¥ÀûÀÎ ÇÁ·Î±×·¥ÀÌ sendmail 8.6.12h2ÀÔ´Ï´Ù. ÀÌ ÇÁ·Î±×·¥Àº ÇÁ·Î±×·¥À¸·ÎºÎÅÍ 8bitÇ¥ÇöÀ» ÀÔ·ÂÀ¸·Î ¹Þ¾Æ¼­ ´Ù¸¥ °÷À¸·Î Àü¼ÛÇÒ¶§ ISO-2022-kr·Î º¯È¯ÇÑ ÈÄ Àü¼ÛÀ» ÇÏ°í, ³×Æ®¿÷À» ÅëÇØ ¹ÞÀº ISO-2022-kr·Î Ç¥ÇöµÈ ¸ÞÀÏÀ» EUC-KR·Î º¯È¯ ÈÄ ¸ÞÀϹڽº¿¡ ÀúÀåÇϵµ·Ï ¸¸µé¾î Á³½À´Ï´Ù. ±×·¡¼­ ¸î³âÀü±îÁö¸¸ Çصµ ´ëºÎºÐÀÇ ¸ÞÀϼ­¹ö¿¡¼­ sendmail 8.6.12h2¸¦ »ç¿ëÇß¾ú½À´Ï´Ù.

ÇÏÁö¸¸ SMTP ÇÁ·ÎÅäÄÝÀÌ 8bit¹®ÀÚ¸¦ Áö¿øÇÏ´Â ESMTP ÇÁ·ÎÅäÄÝ·Î º¯Çϸ鼭 º»¹®¿¡¼­µµ ISO-2022-kr´ë½Å¿¡ EUC-KRÀ» »ç¿ëÇϵµ·Ï Ç¥ÁØÀÌ ¹Ù²î¾ú½À´Ï´Ù. ÇÏÁö¸¸ ÀÌ ¾ÈÀ» Á¤½Ä Ç¥ÁØÀ¸·Î °øÇ¥ÇÏÁö ¾Ê¾Ò°í, ¾ÆÁ÷±îÁö ÀÎÅͳݿ¡´Â ISO-2022-kr ·Î Ç¥ÇöµÈ ¸ÞÀÏÀÌ µ¹¾Æ´Ù´Ï±â ¶§¹®¿¡ ÀÌ ¸ÞÀÏÀ» EUC-KR·Î º¯È¯ÇØ ÁÖ´Â ÀÛ¾÷ÀÌ Ãß°¡ÀûÀ¸·Î ÇÊ¿äÇÏ°Ô µÇ¾ú½À´Ï´Ù.

ISO-2022-krÀ» EUC-KR·Î º¯È¯ÇØ ÁÖ´Â ÇÁ·Î±×·¥µéÀº UNIXȯ°æ¿¡¼­´Â ¸¹ÀÌ ¸¸µé¾î Á³½À´Ï´Ù. hconv¿Í hmconv°¡ ´ëÇ¥ÀûÀÎ ÇÁ·Î±×·¥ÀÔ´Ï´Ù. ÀÌÁ¦ °ü¸®ÀÚ°¡ ÇØ Áà¾ß ÇÏ´ÂÀÏÀº sendmailÀÌ ¹ÞÀº ¸ÞÀÏÀ» ¸ÞÀϹڽº·Î ÀúÀåÇϱâ Àü¿¡ ÀÌ ÇÁ·Î±×·¥À» Åë°úÇÏ°Ô ¸¸µé¾î¼­ ISO-2022-krÀ» EUC-KR·Î º¯È¯¸¸ ÇØ ÁÖ¸é µÇ°Ô µÇ¾ú½À´Ï´Ù. ÀÌ·¸°Ô ÇÊÅ͸µÀ» °¡´ÉÇÏ°Ô ÇØ ÁÖ´Â ´ëÇ¥ÀûÀÎ ÇÁ·Î±×·¥ÀÌ procmailÀÔ´Ï´Ù.

¿©±â¿¡¼­´Â procmailÀ» ÀÌ¿ëÇÏ¿© ÇÑ±Û ¸ÞÀÏÀ» ó¸®ÇÏ´Â °úÁ¤À» ¼³¸íµå¸®°Ú½À´Ï´Ù. ¿©±â¿¡¼­ ¾Ë¾ÆµÎ¼Å¾ß ÇÒ ³»¿ëÁß¿¡ Áß¿äÇÑ ³»¿ëÀ¸·Î MDA¿¡ ´ëÇÑ ÀÌÇØÀÔ´Ï´Ù. MDA(Mail Delivery Agent)´Â MTA(Mail Transfer Agent, ´ëÇ¥ÀûÀÎ ¿¹´Â sendmailÀÔ´Ï´Ù.)°¡ ¹ÞÀº ¸ÞÀÏÀÇ ÃÖÁ¾ÀûÀÎ µµÂøÁö°¡ ÇöÀç È£½ºÆ®Àΰæ¿ì(sendmailÀÇ °æ¿ì sendmail.cw¸¦ Âü°íÇÏ¿© °áÁ¤ÇÕ´Ï´Ù.) ¸ÞÀÏÀ» MDA¿¡°Ô ³Ñ°ÜÁÝ´Ï´Ù. º¸Åë ½Ã½ºÅÛÀÇ ±âº»ÀûÀÎ MDA´Â /bin/mailÀÔ´Ï´Ù. procmailÀº /bin/mail´ë½Å¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ÇÁ·Î±×·¥À¸·Î ÇÊÅ͸µ ±â´ÉÀÌ °­·ÂÇÏ¿© ÇѱÛ󸮿¡ ÀÌ¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

¶Ç À߸ø ÀÌÇØÇϽô ºÐµéÁß¿¡ procmailÀÚü°¡ ÇÑ±Û µðÄÚµùÀ» ÇØÁØ´Ù°í ¾Ë°í °è½ÅºÐµéÀÌ ¸¹½À´Ï´Ù. ÀÌ°ÍÀº À߸øµÈ °ÍÀÔ´Ï´Ù. ½ÇÀç·Î procmailµµ ÇÑ±Û µðÄÚµùÀ» À§ÇØ ´Ù¸¥ ÇÁ·Î±×·¥(º¸Åë hcode³ª hmconv¸¦ ÀÌ¿ëÇÕ´Ï´Ù.)À» ÀÌ¿ëÇÕ´Ï´Ù. procmailÀÌ ÇÏ´ÂÀÏÀº ´Ü¼øÈ÷ ¾î¶² Çì´õ°¡ ÀÖÀ»¶§ Àû´çÇÑ ÇÁ·Î±×·¥À» ºÒ·¯ ÇÑ±Û µðÄÚµùÀ» ÇØ ÁÝ´Ï´Ù.

µû¶ó¼­ procmail»Ó¸¸ ¾Æ´Ï¶ó ÇÑ±Û µðÄÚµùÀ» À§ÇÑ ÇÁ·Î±×·¥À» ¼³Ä¡ÇÏ¼Å¾ß ÇÕ´Ï´Ù. ¿©±â¿¡¼­´Â hcode¸¦ »ç¿ëÇϵµ·Ï ÇÏ°Ú½À´Ï´Ù.

hcode´Â ftp://ftp.kaist.ac.kr/hangul/code/hcode/¿¡¼­ ±¸ÇÒ ¼ö ÀÖ½À´Ï´Ù. °¡Á®¿Â ÇÁ·Î±×·¥À» Àû´çÇÑ µð·ºÅ丮¿¡ Ç®°í ¼Ò½º µð·ºÅ丮¿¡¼­ ´Ü¼øÈ÷ make¸¦ ÀÔ·ÂÇϸé ÄÄÆÄÀÏÀÌ ¿Ï·áµË´Ï´Ù. ÄÄÆÄÀÏ °á°ú·Î »ý±ä hcode¸¦ /usr/local/bin ¿¡ º¹»çÇØ µÓ´Ï´Ù.(´Ù¸¥ µð·ºÅ丮µµ »ó°ü¾ø½À´Ï´Ù.)

±×´ÙÀ½ procmailÀ» ¼³Ä¡ÇÕ´Ï´Ù. procmailÀº ´ëºÎºÐÀÇ ftp¼­¹ö¿¡¼­ ±¸ÇÒ ¼ö ÀÖ½À´Ï´Ù. (ÀúÀÇ °æ¿ì ftp://ftp.kreonet.re.kr/pub/tools/mail/procmail/¿¡¼­ ±¸Çß½À´Ï´Ù.) ÇÁ·Î±×·¥À» ±¸ÇÑ ÈÄ µð·ºÅ丮¿¡¼­ make¸¦ ÀÔ·ÂÇÑ ÈÄ ¸Þ½ÃÁö¿¡ ³ª¿Â´ë·Î ´ë´äÇÏ¸é ¼³Ä¡ÇÒ ¼ö ÀÖ½À´Ï´Ù. ¸¸µé¾îÁø procmailÀ» ¿ª½Ã /usr/local/bin¿¡ ¼³Ä¡ÇÕ´Ï´Ù.

±×·±´ÙÀ½ /etc/procmailrc¸¦ ¾Æ·¡¿Í °°ÀÌ ¸¸µé¾î µÓ´Ï´Ù.

LOGFILE=/var/log/procmail
VERBOSE=no
PATH=/usr/local/bin:/usr/bin:/bin
SHELL=/bin/sh 

:0 B
*^.\$\)C
{
  :0 fbw
  |hmconv -u

  :0 fhw
  * ^Content-Type: text/plain
  |formail -c -I "Content-Type: text/plain; charset=EUC-KR" -I \
  "Content-Transfer-Encoding: 8bit"

  :0 Efhw
  * ^Content-Type: text/html
  |formail -c -I "Content-Type: text/html; charset=EUC-KR" -I \
  "Content-Transfer-Encoding: 8bit"

  :0 Efhw
  * !^Content-Type:
  |formail  -c -I "Content-Type: text/plain; charset=EUC-KR" -I \
  "Content-Transfer-Encoding: 8bit"

  # Note that '-c' flag has been added to formail invocation.
  # It concatenates a  header of multiple lines into a single line
  # so that a bug in 'hcode -dk -m' dealing with RFC 2047 encoded header
  # has less 'harmful' effect.

  :0 fhw
  | formail -A  \
  "X-Automatic-Korean-Mail-Conversion: iso-2022-kr to euc-kr" 

}

DROPPRIVS=yes

:0 fhw
*Content-Type:.+; charset="?EUC-KR
| formail -c | hcode -dk -m 

:0 Efhw
*^(Subject|From|Cc):.*=\?EUC-KR\?(B|Q)\?
| formail -c | hcode -dk -m

±×´ÙÀ½ sendmail¿¡¼­ MDA·Î procmailÀ» »ç¿ëÇÒ ¼ö ÀÖµµ·Ï sendmail.cfÆÄÀÏÀ» ¼öÁ¤ÇØ Áà¾ß ÇÕ´Ï´Ù. sendmail.cfÆÄÀÏ¿¡¼­ MlocalºÎºÐÀ» ã¾Æ¼­ ¾Æ·¡¿Í °°ÀÌ ¼öÁ¤ÇÏ½Ã¸é µË´Ï´Ù.

Mlocal,         P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30, R=20/40,
                T=DNS/RFC822/X-Unix,
                A=procmail -Y -a $h -d $u

ÇÏÁö¸¸ ÀÌ ¹æ¹ýº¸´Ù´Â mcÆÄÀÏ¿¡ FEATURE(local_procmail)À» Ãß°¡ÇÏ¿© sendmail.cf¸¦ »ý¼ºÇÏ´Â ¹æ¹ýÀÌ ÁÁ½À´Ï´Ù.

Á¦°¡ ¿©±â¿¡¼­´Â °£´ÜÇÏ°Ô ¼³¸íÀ» µå·ÈÁö¸¸ Á»´õ ÀÚ¼¼ÇÑ ³»¿ëÀÌ ÇÊ¿äÇϽŠºÐÀº ½ÅÁ¤½Ä´ÔÀÇ Sendmail 8.8.x ÀÌÈÄ ÆÇ°ú ProcmailÀ» ÀÌ¿ëÇÑ ÇÑ±Û ¸ÞÀÏ Ã³¸®¸¦ Âü°íÇϽñ⠹ٶø´Ï´Ù.

ÀÌ ÀÛ¾÷ÀÌ ±ÍÂú°Ô ´À²¸Áö½Å´Ù¸é À§¿¡¼­ ÇÏ´ÂÀÛ¾÷°ú µ¿ÀÏÇÑ ÀÏÀ» ÇÏ´Â ÇÑ±Û sendmailÀ» ¼³Ä¡ÇÏ½Ã¸é µË´Ï´Ù. ÇÏÁö¸¸ ÇÑ±Û sendmailÀº ¿µ¹® sendmail¿¡ ºñÇØ ¹öÀüµµ ³·°í, ¶Ç´Ù¸¥ ¿À·ù°¡ »ý±æ È®·üÀÌ ³ô±â¶§¹®¿¡ À§ÀÇ ¹æ¹ýÀ» »ç¿ëÇϽñ⠹ٶø´Ï´Ù.

5. sendmail.cf¿¡ °üÇÑ ¾ê±â

sendmailÇÁ·Î±×·¥Àº ±× ÀÚü·Î ¸Å¿ì º¹ÀâÇÑ ÇÁ·Î±×·¥ÀÔ´Ï´Ù. ¶ÇÇÑ ÇÁ·Î±×·¥ÀÇ ¼³Á¤ÆÄÀÏÀÎ sendmail.cfÀÚüµµ º¹ÀâÇϱ⠱×Áö ¾ø½À´Ï´Ù. ^^ ÀÌ ÇÁ·Î±×·¥¿¡ ´ëÇÑ ¾ê±â´Â ¿©±â¿¡¼­ ¼³¸íÇϱâ Èûµå¹Ç·Î (¼ÖÁ÷È÷ ±âÁ¸ÀÇ ±Ûº¸´Ù ´õ Àß ¼³¸íÇÒ Àڽŵµ ¾ø½À´Ï´Ù. ^^) ÀÌ»ó·Î´ÔÀÇ http://trade.chonbuk.ac.kr/~leesl/mail/¸¦ Âü°íÇϽðųª sendmailÀÇ ÀúÀÚ°¡ Á÷Á¢ Àú¼úÇÑ Ã¥(Ã¥ Á¦¸ñÀÌ ±Ý¹æ ¶°¿À¸£Áö ¾Ê³×¿ä. ±×³É sendmailÀÌÁö ½ÍÀºµ¥.. ^^)À» Âü°íÇϽñ⠹ٶø´Ï´Ù.

º¹ÀâÇÑ ¼³Á¤ÀÌ ½È´Ù¸é À§¿¡¼­ ¸¸µé¾ú´ø m4¸¦ ÀÌ¿ëÇؼ­ ¸¸µç sendmail.cf¸¦ ±×´ë·Î ÀÌ¿ëÇϼŵµ µË´Ï´Ù.

6. Third Party Relay

6.1 Third Party Relay¶õ?

Third Party Relay¶õ °£´ÜÇÏ°Ô ¸»Çؼ­ SMTP¼­¹öÀÇ »ç¿ëÀÚ°¡ ¾Æ´Ñ »ç¶÷(º¸Åë ½ºÆÔÀ» »Ñ¸®±â À§ÇÑ ¾ÇÀÇ·Î)ÀÌ SMTP¼­¹ö¸¦ ÀÌ¿ëÇÏ´Â °ÍÀÔ´Ï´Ù. µû¶ó¼­ A ÄÄÇ»ÅÍÀÇ SMTP¼­¹ö¸¦ C ÄÄÇ»ÅÍ¿¡ ÀÖ´Â »ç¿ëÀÚ°¡ B ÄÄÇ»ÅÍ·Î ¸ÞÀÏÀ» º¸³»±â À§ÇØ ÀÌ¿ëÇϴ°æ¿ì¸¦ ¸»ÇÕ´Ï´Ù. Á»´õ ÀÚ¼¼ÇÑ ¼³¸íÀº What is Third-Party Mail Relay?¸¦ Âü°íÇϽñ⠹ٶø´Ï´Ù.

¾ÆÁ÷±îÁö ¸¹Àº ¼­¹öµéÀÌ Third Party Relay¸¦ Çã¿ëÇÏ°í ÀÖÀ¸¸ç, À̶§¹®¿¡ ÀÚ½ÅÀÌ °ü¸®Çϴ ȣ½ºÆ®°¡ ½ºÆÔ »çÀÌÆ®·Î ÀνĵǴ°͵µ ¸ð¸£°í ÀÖ´Â °æ¿ì°¡ Çã´ÙÇÕ´Ï´Ù. ¿ì¼± ÀÚ½ÅÀÌ °ü¸®Çϴ ȣ½ºÆ®ÀÇ SMTP¼­¹ö°¡ Third Party Relay¸¦ Çã¿ëÇÏ´ÂÁö¸¦ üũÇÏ·Á¸é Is My Mailer Vulnerable?¿¡¼­ ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. ²À Çغ¸½Ã±â ¹Ù¶ø´Ï´Ù.

6.2 ¼³Á¤¹æ¹ý

sendmail 8.7.x ÀÌÇÏ

Third Party Relay¸¦ ¸·À¸·Á¸é Àû¾îµµ sendmail 8.8.x °¡ µÇ¾î¾ß ÇÕ´Ï´Ù. µû¶ó¼­ ÃÖ½ÅÀÇ sendmail·Î ¾÷±×·¹À̵带 ÇϽñ⠹ٶø´Ï´Ù.

sendmail 8.8.x

sendmail.cf¿¡ ¾Æ·¡¿Í °°Àº Rule setÀ» ³Ö°í sendmail.cRÆÄÀÏ¿¡ relay¸¦ Çã¿ëÇϴ ȣ½ºÆ®ÀÇ FQDNÀ̳ª IP address¸¦ ÀÔ·ÂÇÏ¸é µË´Ï´Ù. ( http://www.sendmail.org/antispam.html¿¡¼­´Â IP address¸¦ ±ÇÇÏ°í ÀÖ½À´Ï´Ù.)

FR-o /etc/sendmail.cR

Scheck_rcpt
# anything terminating locally is ok
R< $+ @ $=w >           $@ OK
R< $+ @ $=R >           $@ OK

# anything originating locally is ok
R$*                     $: $(dequote "" $&{client_name} $)
R$=w                    $@ OK
R$=R                    $@ OK
R$@                     $@ OK

# anything else is bogus
R$*                     $#error $: "550 Relaying Denied"

±×¸®°í /etc/sendmail.cRÀÇ ¼³Á¤Àº ¾Æ·¡¿Í À¯»çÇÏ°Ô ÇÏ½Ã¸é µË´Ï´Ù.

/ $ cat /etc/sendmail.cR
155.230.28.117
155.230.28.118

sendmail 8.9.x

sendmail 8.9.x¿¡¼­´Â ±âº»ÀûÀ¸·Î third party relay¸¦ ±ÝÁöÇÏ°í ÀÖ½À´Ï´Ù. ¸¸ÀÏ third party relay¸¦ Çã¿ëÇÏ·Á¸é promiscuous_relay FEATURE¸¦ mcÆÄÀÏ¿¡ Ãß°¡ÇÏ°í sendmail.cf¸¦ »ý¼ºÇÏ¸é µË´Ï´Ù. (ÇÏÁö¸¸ ÀÌ·¸°Ô ÇÒ »ç¶÷ÀÌ ÀÖ³ª¿ä? ^^)

µû¶ó¼­ sendmail 8.9.x¿¡¼­´Â sendmail.cf¿¡ Ưº°ÇÑ ¼öÁ¤¾øÀÌ relay¿¡ °üÇÑ ÆÄÀϸ¸ ¼öÁ¤ÇÏ¸é µË´Ï´Ù. ¾Æ·¡¿¡¼­´Â »ç¿ëÇÏ°í ÀÖ´Â µµ¸ÞÀÎ À̸§ÀÌ company.co.kr ÀÌ°í, È£½ºÆ® À̸§ÀÌ myhost, ip address°¡ 203.123.45.67 ÀÎ °æ¿ì¶ó°í °¡Á¤ÇÕ´Ï´Ù.

/etc/mail/access : ´©°¡ ÀÌ ¸ÞÀÏ ¼­¹ö¸¦ ¸±·¹ÀÌ ¼­¹ö·Î ÁöÁ¤Çؼ­ »ç¿ëÇÒ ¼ö Àִ°¡, ¾î¶² ÁÖ¼Ò¿¡¼­ ¿À´Â ¸ÞÀÏÀº °ÅÀýÇÒ °ÍÀΰ¡¸¦ ¼³Á¤ÇÏ´Â ÆÄÀÏÀÔ´Ï´Ù.

mail $ cat access
203.123.45      RELAY
209.1.2.3       RELAY
cyberpromo.com  REJECT

ÀÌ·¸°Ô ¼³Á¤ÇÑ °æ¿ì myhost¿Í °°Àº ¼­ºê³Ý¿¡ ÀÖ´Â ÄÄÇ»Å͵é¿Í 209.1.2.3À» »ç¿ëÇÏ´Â ÄÄÇ»ÅÍ¿¡¼­¸¸ myhost.company.co.krÀ» SMTP ¼­¹ö·Î ÁöÁ¤Çؼ­ ¸ÞÀÏÀ» º¸³¾ ¼ö ÀÖ½À´Ï´Ù. ±×¸®°í cyberpromo.com°ú cyperpromo.com µµ¸ÞÀο¡ ¼ÓÇÏ´Â ¸ðµç È£½ºÆ®¿¡¼­ ¿À´Â ¸ÞÀÏÀº °ÅÀýÇÕ´Ï´Ù. ÀÏ´Ü ÀÌ È­ÀÏÀ» ¸¸µå¼Ì´Ù¸é ÀÌÁ¦´Â DB È­ÀÏÀ» ¸¸µå¼Å¾ß ÇÕ´Ï´Ù.

/ $ cd /etc/mail
mail $ makemap hash access < access

±×¸®°í /etc/mail/access È­ÀÏÀ» ¼öÁ¤À» ÇÒ ¶§¸¶´Ù ¹Ýµå½Ã ÀÌ ÀÛ¾÷À» ÇØ ÁÖ¼Å¾ß ÇÕ´Ï´Ù. ÇÏÁö¸¸ ÀÌ ÀÛ¾÷À» ÈÄ¿¡ sendmailÀ» Á×ÀÌ°í ´Ù½Ã ¶ç¿ï ÇÊ¿ä´Â ¾ø½À´Ï´Ù.

±×¸®°í accessÆÄÀÏÀ» »ç¿ëÇÒ °æ¿ì¿¡´Â sendmail.cf¸¦ »ý¼ºÇÒ ¶§ mcÆÄÀÏ¿¡ FEATURE(access_db)¸¦ Ãß°¡ÇØ¾ß ÇÕ´Ï´Ù.

¶ÇÇÑ makemapÀÇ ¹öÀüÀÌ ³·Àº°æ¿ì ÀÛµ¿À» ÇÏÁö ¾Ê´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù. À̶§´Â sendmail ÆÐÅ°Áö¿Í ÇÔ²² µþ·Á³ª¿À´Â makemapÀ» ÄÄÆÄÀÏ ÇÑ ÈÄ ½ÃµµÇØ º¸½Ã±â ¹Ù¶ø´Ï´Ù. makemapµµ sendmail°ú ¸¶Âù°¡Áö·Î -DNEWDB¸¦ ¼±ÅÃÇØ ÁÖ¼Å¾ß ÇÕ´Ï´Ù.

/etc/mail/relay-domains : À§ÀÇ /etc/mail/access¿¡¼­ ÁöÁ¤ÇÑ °÷ ¿Ü¿¡¼­ ¸ÞÀÏ ¼­¹ö·Î ÁöÁ¤ÇÏ´Â °æ¿ì¿¡µµ, relay-domains ¿¡ µî·ÏÇÑ µµ¸ÞÀÎÀÇ È£½ºÆ®¿¡ ´ëÇؼ­´Â Çã¿ëÇÕ´Ï´Ù. relay-domains¿Í accessÆÄÀÏÀÇ Å« Â÷ÀÌÁ¡ÀÇ Çϳª´Â accessÆÄÀÏÀÇ °æ¿ì ¼öÁ¤ÈÄ sendmailÀ» ´Ù½Ã ½ÇÇàÇÒ ÇÊ¿ä°¡ ¾øÁö¸¸ relay-domainsÆÄÀÏÀº ¼öÁ¤ÈÄ sendmailÀ» ´Ù½Ã ½ÇÇàÇØ¾ß ¹Ù²ï ³»¿ëÀ» ÀνÄÇÕ´Ï´Ù. ÆíÇÑ ÆÄÀÏÀ» Çϳª Á¤Çؼ­ »ç¿ëÇÏ½Ã¸é µË´Ï´Ù. ÀúÀÇ °æ¿ì accessÆÄÀÏÀº RELAY-FROM¿¡ ÇØ´çÇϴ ȣ½ºÆ®¿¡ relay-domains´Â RELAY-TO¿¡ ÇØ´çÇϴ ȣ½ºÆ®¸¦ ¼³Á¤ÇÕ´Ï´Ù.

mail $ cat relay-domains
company.co.kr

ÀÌ °æ¿ì company.co.kr µµ¸ÞÀο¡¼­ ¿À´Â ¸ÞÀÏÀº ¸ðµÎ Á߰踦 Çã¿ëÇÕ´Ï´Ù. ¸¸ÀÏ ÀÌ ¸ÞÀÏ ¼­¹ö·Î¸¸ ¿À´Â ¸ÞÀÏÀ» ¹Þ°í ½Í´Ù¸é(´ëºÎºÐÀÇ °æ¿ì°¡ ¿©±â¿¡ ¼ÓÇÕ´Ï´Ù) access È­ÀÏ°ú relay-domains È­ÀÏÀ» 0¹ÙÀÌƮ¥¸® È­ÀÏ·Î ¸¸µé¸é µË´Ï´Ù.

ÀÌ·¸°Ô ¼³Á¤ÇÑ ÈÄ SMTP¼­¹ö°¡ third party relay¸¦ Çã¿ëÇÏ´ÂÁö Å×½ºÆ®ÇØ º¸½Ã±â ¹Ù¶ø´Ï´Ù.

7. ³­ SPAMÀÌ ½È¾î¿ä!

ÀÎÅͳÝÀÌ »ýÈ° ±í¼÷È÷ µé¾î°¡¸é °¥¼ö·Ï ÆíÇØÁö´Â Á¡ÀÌ Àִ°Íó·³ °¡²ûÀº »ç¶÷À» Â¥Áõ³ª°Ô(?) ¸¸µå´Â ÀϵéÀÌ ÀÖ½À´Ï´Ù. ¸ÞÀϵµ ¸¶Âù°¡ÁöÀä. ±×Áß¿¡¼­ »ç¶÷À» ¿­¹Þ°Ô(?) ¸¸µå´Â ´ëÇ¥ÀûÀÎ ¸ÞÀÏÀº ½ºÆÔ¸ÞÀÏÀÔ´Ï´Ù. µû¶ó¼­ ¸ÞÀϼ­¹öÀÇ °ü¸®ÀÚ¶ó¸é ½ºÆиÓ(Spammer, ½ºÆÔ¸ÞÀÏÀ» º¸³»´Â »ç¶÷)°¡ º¸³»´Â ½ºÆÔ¸ÞÀÏÀ» Â÷´ÜÇÒ ¼ö ÀÖ¾î¾ß ÇÕ´Ï´Ù. ¿©±â¿¡¼­´Â ½ºÆÔ¸ÞÀÏÀÌ ¹«¾ùÀÌ°í, ¾î¶»°Ô ¸·À»°ÍÀΰ¡¿¡ °üÇÑ ¾ê±â¸¦ ÇÏ°íÀÚ ÇÕ´Ï´Ù.

7.1 SPAM ¸ÞÀÏÀ̶õ?

°¡´ÉÇÑ »¡¸® Ãß°¡ÇÒ²²¿ä. ÁË¼Û ^^

7.2 SPAM ¸ÞÀÏÀ» ¸·À¸·Á¸é?

¸¸ÀÏ ´ÔÀÌ °ü¸®ÇÏ°í ÀÖ´Â ¸ÞÀϼ­¹öÀÇ »ç¿ëÀÚÇѸíÀÌ info@cyberpromo.com ¿¡¼­ °è¼Ó SPAM¸ÞÀÏÀ» º¸³½´Ù°í Ç×ÀǸ¦ ÇØ ¿Â´Ù¸é /etc/mail/access ¿¡ ¾Æ·¡¿Í °°ÀÌ Ãß°¡ÇÏ°í makemapÀ¸·Î access DB¸¦ Àç »ý¼ºÇϼ¼¿ä.

info@cyberpromo.com REJECT

±Ùµ¥ Á» Áö³ªº¸´Ï info2@cyberpromo.com À¸·Î À̸§À» ¹Ù²Ù¾î¼­ SPAM¸ÞÀÏÀ» °è¼Ó º¸³»´Â±º¿ä. ¿­¹Þ¾Æ¼­ cyberpromo.com ¿¡¼­ ¿À´Â ¸ÞÀÏÀ» ¸ðµÎ °ÅºÎÇÏ°í ½Í´Ù¸é ¾Æ·¡¿Í °°ÀÌ Ãß°¡Çϼ¼¿ä.

cyberpromo.com REJECT

Á» Áö³ª°í »ý°¢À» ÇØ º¸´Ï ±×³É °ÅºÎ¸¸ ÇÏ´Ï±î ³Ê¹« ½Ì°Ì±º¿ä. ¸Þ½ÃÁö¸¦ Çϳª ¶ç¿öÁÖ°í ½Í´Ù¸é ¾Æ·¡¿Í °°ÀÌ accessÆÄÀÏÀ» ¸¸µå¼¼¿ä.

cyberpromo.com 550 Spammers couldn't see sunlight here

ÀÌÁ¦ Á» ½Ã¿øÇϱº¿ä. ^^

8. °¡»ó È£½ºÆ®

´ÙÀ½°ú °°Àº »óȲÀ» °¡Á¤ÇØ º¸ÁÒ. °©Àº ÇöÀç À»°ú º´¿¡°Ô È£½ºÆ®¸¦ ÀÓ´ëÇØ ÁÖ°í ÀÖ½À´Ï´Ù. ÇÑ´ëÀÇ À¯´Ð½º ½Ã½ºÅÛ¿¡ °¢°¢ ul.co.kr°ú byung.co.krÀ̶ó´Â µµ¸ÞÀÎÀ» ÇÒ´çÇؼ­ À¥¼­ºñ½º¿Í ¸ÞÀϼ­ºñ½º¸¦ ÇØ ÁÖ°í ÀÖ½À´Ï´Ù. ÇöÀç À¥¼­ºñ½º´Â apache¼­¹öÀÇ °¡»ó È£½ºÆ®±â´ÉÀ» ÀÌ¿ëÇؼ­ Àß ¼­ºñ½º¸¦ ÇÏ°í ÀÖ¾ú´Âµ¥ °©ÀÚ±â À»°ú º´ÀÌ webmaster¶ó´Â ¸ÞÀÏ°èÁ¤À» ¶È°°ÀÌ ¿ä±¸Çß½À´Ï´Ù. Áï À»Àº webmaster@ul.co.krÀ» º´Àº webmaster@byung.co.krÀ» ¿ä±¸ÇßÁÒ. °©Àº °í¹ÎÀ» ÇÕ´Ï´Ù. ¾î¶»°Ô ÇÒ±î? ¸¸ÀÏ À̱ÛÀ» º¸°í °è½ÅºÐÀÌ °©°ú °°Àº »óȲÀ̶ó¸é ¾î¶»°Ô ÇØ°áÀ» ÇßÀ»±î¿ä?

sendmail¿¡¼­´Â ÀÌ¿Í °°Àº ¹®Á¦¸¦ ÇØ°áÇϱâ À§ÇØ °¡»ó È£½ºÆ®¸¦ Á¦°øÇÕ´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº Virtual Hosting with SendmailÀ» Âü°íÇϽñ⠹ٶø´Ï´Ù. ¿©±â¿¡¼­´Â °£´ÜÇÏ°Ô ¼³¸íÀ» µå¸®°Ú½À´Ï´Ù.

À§¿Í °°Àº°æ¿ì ÀÌ¹Ì Name Server¿¡´Â Á¤»óÀûÀ¸·Î ¼³Á¤µÇ¾î ÀÖÀ»°ÍÀ̹ǷΠName Server ¼³Á¤¹æ¹ýÀº »ý·«ÇÏ°Ú½À´Ï´Ù. ¿ì¼± sendmail.cf¸¦ ´Ù½Ã ¸¸µé¾î¾ß ÇÕ´Ï´Ù. ÀÌ¹Ì ¸¸µé¾ú´ø mcÆÄÀÏ¿¡ FEATURE(virtusertable, hash /etc/mail/virtusertable)À» Ãß°¡ÇÏ°í sendmail.cf¸¦ ´Ù½Ã »ý¼ºÇϽñ⠹ٶø´Ï´Ù.(ÀÌ ±Û¿¡¼­´Â sendmailÀÌ »ç¿ëÇÏ´Â DB´Â Berkeley DB¶ó°í °¡Á¤ÇÕ´Ï´Ù.)

ÀÌÁ¦ À»ÀÌ »ç¿ëÇÏ´Â °èÁ¤ÀÎ webulÀ» ¸¸µì´Ï´Ù.(À̸§Àº »ó°üÀÌ ¾ø½À´Ï´Ù. ¿©±â¿¡¼­´Â ÆíÀÇ»ó Á¦°¡ ÀÌ·¸°Ô Áö¾ú½À´Ï´Ù.) ±×¸®°í º´ÀÌ »ç¿ëÇÏ´Â webbyungÀ» ¸¸µì´Ï´Ù. ±×´ÙÀ½ /etc/mail/virtusertable.src ÆÄÀÏÀ» ¾Æ·¡¿Í °°ÀÌ ¸¸µì´Ï´Ù.

webmaster@ul.co.kr    webul
webmaster@byung.co.kr webbyung

±×´ÙÀ½ makemapÀ¸·Î ¾Æ·¡¿Í °°ÀÌ DBÆÄÀÏÀ» ¸¸µé¸é µË´Ï´Ù.

makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable.src

ÀÌ·¸°Ô ÇØ µÎ¸é webmaster@ul.co.krÀ¸·Î ¿À´Â ¸ÞÀÏÀº À»¿¡°Ô webmaster@byung.ac.kr·Î ¿À´Â¸ÞÀÏÀº º´¿¡°Ô °¥ ¼ö ÀÖ½À´Ï´Ù. ¾î¶§¿ä? °£´ÜÇÏÁÒ? virtusertableÀ» ÀÌ¿ëÇϸé À§¿Í °°Àº ´Ü¼øÇÑ ±â´É¿Ü¿¡µµ ´Ù¾çÇÑ ±â´ÉÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº À§¿¡¼­ ¾ð±ÞÇß´ø Virtual Hosting with SendmailÀ» Âü°íÇϽñ⠹ٶø´Ï´Ù.

9. ¹®Á¦ ÇØ°á

»ç¿ëÀÚ¸í¿¡ ´ë¹®ÀÚ°¡ µé¾îÀִ°æ¿ì ¸ÞÀÏÀ» ¹ÞÀ¸·Á¸é?

sendmailÀ» MTA·Î »ç¿ëÇϽô °æ¿ì¿¡ sendmail.cfÀÇ Mlocal·Î ½ÃÀÛÇÏ´Â ºÎºÐ¿¡ º¸½Ã¸é F=À̶ó°í µÈ ºÎºÐÀÌ ÀÖ½À´Ï´Ù. ÀÌ°÷¿¡ u¸¦ Ãß°¡ÇÏ¸é ´ë¹®ÀÚ·Î µÈ °èÁ¤¿¡¼­µµ ¸ÞÀÏÀ» ¹Þ¾Æº¼ ¼ö ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ °èÁ¤¿¡´Â ´ë¹®ÀÚ¸¦ ¾È ¾²½Ã´Â°Ô ÁÁ½À´Ï´Ù. (ƯÈ÷ NIS+¸¦ ¾µ°æ¿ì ¸»½éÀ» ¸¹ÀÌ ºÎ¸³´Ï´Ù.)

.forward°¡ ÀÛµ¿ÇÏÁö ¾Ê½À´Ï´Ù.

Sendmail 8.9.x ºÎÅÍ´Â sendmailÀÌ ÀоîµéÀÌ´Â ÆÄÀÏÀÇ ¸ðµå¸¦ °Ë»çÇÕ´Ï´Ù. ¿¹¸¦µé¾î .forward°¡ ÀÖ´Â µð·ºÅ丮(ÀϹÝÀûÀ¸·Î Ȩ µð·ºÅ丮)ÀÇ ¸ðµå°¡ ±×·ì¿¡°Ô ¾²±â°¡´ÉÇϵµ·Ï ¼³Á¤µÇ¾î ÀÖÀ¸¸é .forwardÆÄÀÏÀÚü¸¦ ÀÐÁö¾Ê½À´Ï´Ù. À̶§¹®¿¡ .forward°¡ ÀÛµ¿ÇÏÁö ¾Ê´Â´Ù°í Åõ´ú´ë´Â »ç¶÷µéÀÌ ¸¹½À´Ï´Ù. Áö±Ý »ç¿ëÇÏ°í °è½Å sendmailÀÌ 8.9.0ÀÌ»óÀ̶ó¸é ÀÚ½ÅÀÇ È¨µð·ºÅ丮¿Í ±× »óÀ§µð·ºÅ丮°¡ ±×·ì¿¡°Ô ¾²±â°¡´ÉÇϵµ·Ï µÇ¾îÀÖ´ÂÁö È®ÀÎÇØ º¸½Ã±â ¹Ù¶ø´Ï´Ù. ÀÚ¼¼ÇÑ ¾ê±â´Â DontBlameSendmail and Enhanced File Security¸¦ Âü°íÇϽñ⠹ٶø´Ï´Ù.

´º½º±×·ì¿¡ ±è°æ¿í´ÔÀÌ ¾Æ·¡¿Í °°Àº ±ÛÀ» ¿Ã·ÁÁּ̽À´Ï´Ù. ¿ª½Ã .forward°¡ ÀÛµ¿ÇÏÁö ¾Ê´Â°æ¿ì¸¦ ¼³¸íÇÏ°í ÀÖ½À´Ï´Ù. Âü°íÇϼ¼¿ä.

sendmail.cf¿¡¼­, .forward¿¡ ¿µÇâÀ» ¹ÌÄ¡´Â ºÎºÐÀº µÎ±ºµ¥ÀÔ´Ï´Ù.

# Forward file search path
O ForwardPath=$z/.forward.$w:$z/.forward

$z (/etc/passwd¸¦ lookup Çؼ­ ¾òÀº À¯Àú µð·ºÅ丮ÀÇ path) ¹ØÀÇ
.forward°¡ ForwardPath·Î ÀâÇô ÀÖ½À´Ï´Ù. ÀÌ ¿É¼ÇÀ» disable(#)½ÃÅ°¸é
forwardingÀÌ µÇÁö ¾Ê½À´Ï´Ù.

´ÙÀ½, ¿©±â¼­ $z °ªÀ» ¾ò±â À§Çؼ­ Local delivery agent´Â /etc/passwd¸¦
lookup ÇÕ´Ï´Ù. ±×·¯³ª Mlocal¿¡¼­ F=w flag°¡ ¾øÀ¸¸é MlocalÀº
/etc/passwd ¸¦ lookup ÇÏÁö ¾Ê½À´Ï´Ù.

Mlocal,         P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9,
S=10/30, R=20/ 40,
                T=DNS/RFC822/X-Unix,
                A=procmail -Y -a $h -d $u

À§ µÎ°¡Áö »çÇ×À» È®ÀÎÇØ º¸¼¼¿ä.

--
±è°æ¿í

access°¡ ÀÛµ¿ÇÏÁö ¾Ê½À´Ï´Ù.

ÀÏ´Ü sendmail.cf¸¦ ¸¸µç mc¿¡ FEATURE(access_db, hash -o /etc/mail/access)¸¦ Ãß°¡Çϼ̴ÂÁö °Ë»çÇØ º¸½Ã°í ¸¸ÀÏ ³ÖÁö ¾Ê¾Ò¾ú´Ù¸é Ãß°¡ÇÑ ÈÄ ´Ù½Ã sendmailÀ» »ý¼ºÇØ º¸½Ã±â ¹Ù¶ø´Ï´Ù.

°¡²û makemapÀÇ ¹öÀüÀÌ ³·¾Æ¼­ ¾ÈµÇ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù. À§¿Í°°ÀÌ Çߴ°æ¿ì¿¡µµ ÀÛµ¿ÇÏÁö ¾Ê´Â´Ù¸é sendmail¿¡ °°ÀÌ µé¾îÀÖ´Â makemapÀ» ÄÄÆÄÀÏÇؼ­ »ç¿ëÇÏ½Ã¸é µË´Ï´Ù. (makemap¿¡¼­µµ »ç¿ëÇÒ DBµîÀ» ¸í½ÃÇÕ´Ï´Ù. sendmailÀÇ ÄÄÆÄÀÏ°ú µ¿ÀÏÇÏ°Ô ÇÏ½Ã¸é µË´Ï´Ù.)

10. Âü°í±Û

1. À̼®Âù´ÔÀÇ Solaris 2.5.1¿ë sendmail 8.9.0 ÆÐÅ°ÁöÀÇ READMEÆÄÀÏ

2. http://www.sendmail.org/compiling.html

3. ÀÌ»ó·Î´ÔÀÇ Sendmail and Hangul Code

4. ÀÌ»ó·Î´ÔÀÇ ÇÁ¶ô¸ÞÀÏ¿¡ °üÇÏ¿©(On procmail)

5. ½ÅÁ¤½Ä´ÔÀÇ Sendmail 8.8.x¿Í ProcmailÀ» ÀÌ¿ëÇÑ ÇÑ±Û ¸ÞÀÏ Ã³¸®


ID
Password
Join
Courage is your greatest present need.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2003-08-10 11:52:30
Processing time 0.0023 sec