Å¥¸ÞÀÏÀ» ¼³Ä¡ÇÏ´Â °ÍÀ» ¼³¸íÇÕ´Ï´Ù. °æÇèÀÖ´Â ½Ã½ºÅÛ¾Öµå¹ÎÀº ¼Ò½º¹èÆ÷ÆÇ¿¡ ÀÖ´Â INSTALLÀÇ Áö½Ã»çÇ×À» µû¶ó¼ Å¥¸ÞÀÏÀ» ¼³Ä¡ÇÒ ¼ö ÀÖ½À´Ï´Ù. INSTALLÁö½Ã»çÇ×Àº °ø½Ä ¼³Ä¡Áö½Ã»çÇ×ÀÔ´Ï´Ù. ±×°ÍÀº º»¹®¼ÀÎ lwqÀÇ Áö½Ã»çÇ׺¸´Ù º¹ÀâÇÏ°í, Àд »ç¶÷ÀÌ °æÇèÀÖ´Â ½Ã½ºÅÛ¾Öµå¹Î°ú ¸á¾Öµå¹ÎÀ̶ó°í ¿©±é´Ï´Ù.
----------------------------------------------------------------------------- À¯ÀÇÁ¡: ´ÙÀ½ÀÇ Áö½Ã»çÇ×À» ÀÐÀ¸½Å´Ù¸é ÀüüÇ׸ñÀ» ÀÐ¾î¼ Àüü°úÁ¤À» ÀÍÈ÷½Ã±â ¹Ù¶ø´Ï´Ù. -----------------------------------------------------------------------------
¹Ì¸®ÄÄÆÄÀÏµÈ ¹èÆ÷ÆÇ°ü·Ã ¶óÀ̼¾½ÌÁ¦¾à¶§¹®¿¡, Å¥¸ÞÀÏÀº º¸Åë ¼Ò½ºÄÚµå¹èÆ÷ÆÇÀ¸·Î ¼³Ä¡ÇÕ´Ï´Ù.
¼Ò½ºÄÚµå¿Í ¹ÙÀ̳ʸ®¸¦ ±¸ºÐÇϽñ⠾î·Æ´Ù¸é, ÁýÀ¸·Î ÇÇÁö¸¦ ¹è´ÞÇÑ´Ù°í °¡Á¤ÇϽʽÿÀ. ¹ÙÀ̳ʸ®¹öÀüÇÇÀÚ´Â Áï½Ã ¸ÔÀ» ¼ö ÀÖ°Ô ¹è´ÞµË´Ï´Ù. ¼Ò½ºÄÚµåÇÇÀÚ´Â ¹Ð°¡·ç, È¿¸ð, Ä¡Áî, ÅäÇÎ, ±×¸®°í ¿ä¸®¹æ¹ý µîÀ» Æ÷ÇÔÇÑ ÀåºñÀÏü·Î ¹è´ÞµË´Ï´Ù. ¼Ò½ºÄڵ弳ġ´Â ÀÏÀ» Á»´õ ¸¹ÀÌ ÇØ¾ß ÇÏÁö¸¸, Áö½Ã»çÇ×À» öÀúÇÏ°Ô µû¸£¸é, ±× °á°ú´Â °°°Å³ª ´õ ÁÁ½À´Ï´Ù. Á÷Á¢ ¸¸µé¾î ¸Ô´Â ÇÇÀÚ´Â ´õ ½Å¼±ÇÏ°í, ÁÁ¾ÆÇÏ´Â ÅäÇÎÀ» ¸ÂÃç¸ÔÀ» ¼ö ÀÖÀ¸¸ç, ÀÚ½ÅÀÌ ¸¸µç ÇÇÀÚ¿¡ ´ëÇØ, ±×°ÍÀÌ ¾î¶»°Ô ¸¸µé¾îÁ³´Â Áö¿¡ ´ëÇØ ´õ ¸¹ÀÌ ¾Ë°Ô µË´Ï´Ù.
¼Ò½ºÄڵ弳ġ¸¦ ÀÚµ¿À¸·Î ÇÏ´Â ¹æ¹ýÀ» Á¦°øÇÏ´Â ¿î¿µÃ¼Á¦µµ ÀÖ½À´Ï´Ù. ÇÇÀÚ·Î ´Ù½Ã ºñÀ¯ÇÏÀÚ¸é, ´ÜÃ߸¸ ´©¸£¸é ÇÇÀÚ°¡ ÀúÀý·Î ±¸¿öÁöµµ·Ï Àç·á¿Í Áö½Ã»çÇ×À» ÆÐÅ°ÁöÇÏ´Â °ÍÀÔ´Ï´Ù.
ÈǸ¢ÇÏÁö ¾Ê½À´Ï±î?
½ÇÁ¦·Î´Â ±×·¸°Ô ÁÁÁö¸¸Àº ¾Æ´Ñ ¹æ¹ýÀÔ´Ï´Ù. ÆÐÅ°Áö·Î ¹±â°¡ ¸Å¿ì Èûµé°í, »ý°¢´ë·Î ¿òÁ÷ÀÌÁö ¾ÊÀ» ¼ö°¡ ÀÖ½À´Ï´Ù. ¶ÇÇÑ ±×°Íµµ ¼ÒÇÁÆ®¿þ¾îÀ̹ǷÎ, ´Ù¸¥°Íµéó·³, ¹÷ÀÌ ÀÖÀ» ¼öµµ ÀÖ½À´Ï´Ù. ¹÷ÀÌ ¾ø´õ¶óµµ, ±× Æí¸®ÇÔÀº ±× ¸¸ÇÑ ´ë°¡¸¦ Ä¡·ç°Ô µË´Ï´Ù. ½º½º·Î ¸¸µé¾îº¸´Â ÇÇÀÚÀÇ ÀÌÁ¡ÀÎ ÀÚ½ÅÀÇ ±âÈ£¿¡ ¸ÂÃç¼ ÅäÇÎÀ» Á¶Á¤ÇÏ°í, ÇÇÀÚ°¡ ¾î¶»°Ô ¸¸µé¾îÁö°í, ¾î¶»°Ô ÀÛ¿ëÇÏ´Â Áö µîÀ» ÀÒ°Ô µË´Ï´Ù.
Å¥¸ÞÀÏÀÌ ÇÇÀÚ¶ó¸é, ½º½º·Î ÄÄÆÄÀÏÇغ¼ ¼öµµ ÀÖÀ»Áö ¸ð¸¨´Ï´Ù. ±×·±µ¥, ÇÇÀÚ°¡ ¾Æ´Õ´Ï´Ù. º¹ÀâÇÑ ½Ã½ºÅÛÀÌ µÇ¾î³ö¼ Àß ¿î¿µÇÏ·Á¸é ¼³Ä¡ÀÚ¿Í À¯ÁöÀÚ´Â Àß ÀÌÇØÇØ¾ß ÇÕ´Ï´Ù. ÀÚµ¿¼³Ä¡ Å¥¸ÞÀÏÀÌ ¼öµ¿¼³Ä¡ÆǺ¸´Ù ¼³Ä¡Çϱ⿡ ½±½À´Ï´Ù¸¸, ¼öµ¿¼³Ä¡ÆÇÀÌ ¼³Á¤ÇÏ°í ¹®Á¦Á¡À» ÇØ°áÇÏ´Â µ¥ ½±½À´Ï´Ù. ½Ã½ºÅÛ¿¡ Å¥¸ÞÀÏÀ» Çѹø¸¸ ¼³Ä¡ÇÏ¸é µÇÁö¸¸, ¶§¶§·Î Àç¼³Á¤ÇؾßÇÒ ¼öµµ ÀÖ°í, »ý°¢´ë·Î ¸áÀÌ È帣Áö ¾Ê´Â ÀÌÀ¯¸¦ ÆľÇÇØ¾ß ÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
ÀÌ·¡¼, Àú´Â Å¥¸ÞÀÏÀ» RedHatÀ̳ª ±âŸ ÀÚµ¿¼³Ä¡¹øµéÀÌ ¾Æ´Ñ ¼Ò½ºÅ©µå tarball·Î ¼³Ä¡ÇϽñ⸦ ±Ç°íÇÕ´Ï´Ù.
Å¥¸ÞÀÏÀ» ½Ã½ºÅÛ¿¡ ¼³Ä¡Çϱâ Àü¿¡, Å¥¸ÞÀϼ³Ä¡¸¦ óÀ½À¸·Î ÇÑ´Ù¸é, ¸î°¡Áö °í·Á»çÇ×ÀÌ ÀÖ½À´Ï´Ù.
Å¥¸ÞÀÏÀº ´ëºÎºÐÀÇ À¯´Ð½º¿Í À¯´Ð½º·ù ½Ã½ºÅÛ¿¡ ¼³Ä¡µÇ°í ¿î¿µµË´Ï´Ù¸¸ ¸î°¡Áö ÇÊ¿ä»çÇ×ÀÌ ÀÖ½À´Ï´Ù.
¿À¿ìÄÉÀÌ, ÀÌÁ¦ Å¥¸ÞÀÏÀ» ¼³Ä¡ÇÒ ¼ö ÀÖµµ·Ï ÇÊ¿ä»çÇ׿¡ ¸Â´Â ½Ã½ºÅÛÀ» ÁغñÇϼ̱º¿ä. ù¹ø° ´Ü°è´Â Å¥¸ÞÀÏ°ú ´Ù¸¥ ¾Öµå¿ÂÀÇ ¼Ò½ºÄڵ带 ´Ù¿î·ÎµåÇÏ´Â °ÍÀÔ´Ï´Ù. Å¥¸ÞÀÏÀº ´ç¿¬È÷ ÇÊ¿äÇÏ°í¿ä, ucspi-tcp¿Í daemontoolsµµ ÇÊ¿äÇÒ °ÍÀÔ´Ï´Ù.
À¥ºê¶ó¿ìÀú³ª FTP Ŭ¶óÀ̾ðÆ®¸¦ ÀÌ¿ëÇؼ ÀÌ ÆÄÀϵéÀ» °¡Á®¿À¼¼¿ä.
ù¹ø° ÇÒÀÏÀº ÇÁ·Î±×·¥À» ÄÄÆÄÀÏÇϱ⿡ ÇÊ¿äÇÑ ÅøÀ» °®Ãß¾ú´Â ÁöÀÇ È®ÀÎÀÔ´Ï´Ù. ÀÌ°ÍÀ» °áÁ¤ÇÏ´Â °ÍÀº »ç¿ëÁßÀÎ À¯´Ð½ºÁ¾·ù¿¡ µû¸¨´Ï´Ù. ¸»¾¸µå¸± ¼ö ÀÖ´Â °¡Àå ½¬¿î ¹æ¹ýÀº, º¸ÀåµÇÁö´Â ¾ÊÁö¸¸, Çغ¸´Â °Ì´Ï´Ù.
----------------------------------------------------------------------------- À¯ÀÇÁ¡: À̰͵éÁß Çϳª¶óµµ Åë°úÇϸé, ´ÙÀ½ Ç׸ñÀ¸·Î ³Ñ¾î°¡¼Åµµ µË´Ï´Ù. -----------------------------------------------------------------------------
$ cc cc: No input files specified $
¿©±â±îÁö ¿À¼ÌÀ¸¸é, ÀÌ¹Ì C ÄÄÆÄÀÏ·¯¿Í tarballÀ» ÁغñÇϽŠ°Ì´Ï´Ù. Ÿº¼À» ÀÛ¾÷ÇÏ½Ç µð·ºÅ丮·Î º¹»çÇϰųª ¿Å±â¼¼¿ä. /usr/local/src°¡ ÁÁÀºµ¥, ÀÌ °æ¿ì¿¡´Â /usr/local/src/qmail¸¦ ¼¼ ÆÐÄÉÁö ¸ðµÎ¿¡ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
mkdir -p /usr/local/src/qmail mv *.tar.gz /usr/local/src/qmail
/usr/local/src/qmail¿¡ ¼¼ ÆÐÄÉÁö°¡ ÀüºÎ ÀÖÀ¸¹Ç·Î, ±×°ÍµéÀ» Ǫ½Ê½Ã¿À. ·íÀÌ ¾Æ´Ï¶ó¸é ¿©±â¿¡¼´Â ·íÀÌ µÇ¼Å¾ß ÇÕ´Ï´Ù. ÇÁ·ÒÆ®¿¡¼ ´ÙÀ½°ú °°ÀÌ Çϼ¼¿ä:
su - cd /usr/local/src/qmail gunzip qmail-1.03.tar.gz tar xvf qmail-1.03.tar gunzip ucspi-tcp-0.84.tar.gz tar xvf ucspi-tcp-0.84.tar gunzip daemontools-0.61.tar.gz tar xvf daemontools-0.61.tar rm *.tar # ¿©À¯°ø°£ÀÌ ¾øÀ» ¶§ ÇÏ´Â ¼±ÅûçÇ×
qmail-1.03, ucspi-tcp-0.84, daemontools-0.61 µîÀÇ ¼·µð·ºÅ丮°¡ »ý±é´Ï´Ù. qmail-1.03 µð·ºÅ丮·Î °¡½Ã¸é ½ÃÀÛÇÏ°Ú½À´Ï´Ù.
cd qmail-1.03
ÇÊ¿äÇÑ ¼·µð·ºÅ丮´Â Å¥¸ÞÀÏ ¼³Ä¡ ÇÁ·Î±×·¥ÀÌ ¸¸µé¹Ç·Î, Å¥¸ÞÀÏ È¨µð·ºÅ丮¸¸ ¸¸µé¾î ÁÖ¸é µË´Ï´Ù.
mkdir /var/qmail
±×·¯¸é ´ÙÀ½ Ç׸ñÀ¸·Î °©´Ï´Ù.
------------------------------------------------------------------------------ À¯ÀÇÁ¡: Å¥¸ÞÀÏÆÄÀϵéÀ» /var°¡ ¾Æ´Ñ ´Ù¸¥ °÷¿¡ ³õ°í ½ÍÀ¸½Ã¸é, /var/qmailµð·ºÅ丮¿¡ ±×°÷À» °¡¸®Å°´Â ½Éº¼¸¯ ¸µÅ©¸¦ ¸¸µå½Ã¸é µË´Ï´Ù. ¿¹¸¦ µé¸é, ´ÙÀ½°ú °°ÀÌ ÇÏ½Ã¸é µË´Ï´Ù. mkdir /var/qmail ln -s /usr/man /var/qmail/man mkdir /etc/qmail ln -s /etc/qmail /var/qmail/control ln -s /usr/sbin /var/qmail/bin --------------------------------------------------------------------------------
ÇÊ¿äÇÑ »ç¿ëÀÚ¿Í ±×·ìÀ» ¸¸µå´Â °¡Àå ½¬¿î ¹æ¹ýÀº ÀÛÀº ½ºÅ©¸³Æ®¸¦ ¸¸µé¾î¼ ÇÏ´Â °ÍÀÔ´Ï´Ù. ¼Ò½ºµð·ºÅ丮¿¡ INSTALL.ids ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù. °Å±â¿¡´Â ¿©·¯ ÇÁ·§Æû¿¡ ÇØ´çÇÏ´Â ¸í·ÉÇàÀÌ Àִµ¥, ±× ÆÄÀÏÀ» ´Ù¸¥ À̸§À¸·Î º¹»çÇؼ ÆíÁýÇÏ¸é ºü¸£°í ½±½À´Ï´Ù.
cp INSTALL.ids IDS
ÁÁ¾ÆÇϽô ¿¡µðÅÍ·Î ÇÊ¿äÇÑ ÇàÀ» »©°í ´Ù Áö¿ó´Ï´Ù. ¿¹¸¦ µé¸é, ÆíÁýÈÄ¿¡ FreeBSD¿¡ ´ëÇÑ IDS´Â ´ÙÀ½°ú °°½À´Ï´Ù.
pw groupadd nofiles pw useradd alias -g nofiles -d /var/qmail/alias -s /nonexistent pw useradd qmaild -g nofiles -d /var/qmail -s /nonexistent pw useradd qmaill -g nofiles -d /var/qmail -s /nonexistent pw useradd qmailp -g nofiles -d /var/qmail -s /nonexistent pw groupadd qmail pw useradd qmailq -g qmail -d /var/qmail -s /nonexistent pw useradd qmailr -g qmail -d /var/qmail -s /nonexistent pw useradd qmails -g qmail -d /var/qmail -s /nonexistent
½ÇÇàÇÏ·Á¸é, chmod¸¦ ½á¼ ½ÇÇàÆÄÀÏ·Î ¸¸µå½Ã°Å³ª sh·Î ½ÇÇàÇϽʽÿÀ.
chmod 700 IDS ./IDS
/bin/sh IDS
½ºÅ©¸³Æ®ÀÇ ½ÇÇàÀÌ ¿Ï·áµÇ¾î »ç¿ëÀÚ¿Í ±×·ìÀÌ »ý±â¸é ´ÙÀ½Ç׸ñÀ¸·Î °©´Ï´Ù.
±×·¯³ª, INSTALL.ids¿¡ ÇØ´ç ½Ã½ºÅÛÀÌ ¾øÀ¸¸é ¾îÂÁ´Ï±î? ¼öµ¿À¸·Î ±×°ÍµéÀ» ¸¸µé¾î¾ß ÇÕ´Ï´Ù. ÁÁ¾ÆÇÏ´Â ¿¡µðÅ͸¦ »ç¿ëÇؼ /etc/groupÀ» ÆíÁýÇϼ¼¿ä. ´ÙÀ½ µÎ ÁÙÀ» ±× ÆÄÀϳ¡¿¡ ÷°¡ÇϽʽÿÀ.
qmail:*:2107: nofiles:*:2108:
------------------------------------------------------------------------- À¯ÀÇÁ¡: 2107°ú 2108ÀÌ »ç¿ëÁßÀÎ °ÍÀÌ ¾Æ´ÔÀ» È®ÀÎÇÏ¼Å¾ß ÇÕ´Ï´Ù. -------------------------------------------------------------------------
´ÙÀ½À¸·Î´Â, vipw¸¦ ÀÌ¿ëÇؼ ´ÙÀ½ ÁÙµéÀ» ±× ÆÄÀÏÀÇ ³¡¿¡ ºÙÀ̽ʽÿÀ. (´ëºÎºÐÀÇ ½Ã½ºÅÛ¿¡ vipw°¡ ÀÖÁö¸¸, ¾øÀ¸¸é ¿¡µðÅÍ·Î /etc/passwd¸¦ ÆíÁýÇÕ´Ï´Ù.)
alias:*:7790:2108::/var/qmail/alias:/bin/true qmaild:*:7791:2108::/var/qmail:/bin/true qmaill:*:7792:2108::/var/qmail:/bin/true qmailp:*:7793:2108::/var/qmail:/bin/true qmailq:*:7794:2107::/var/qmail:/bin/true qmailr:*:7795:2107::/var/qmail:/bin/true qmails:*:7796:2107::/var/qmail:/bin/true
------------------------------------------------------------------------------------ À¯ÀÇÁ¡: 7790-7796ÀÌ »ç¿ëÁßÀÌÁö ¾Ê´Â´Ù´Â °Í°ú 2107°ú 2108ÀÌ À§¿¡¼ ¸¸µç ±×·ì¾ÆÀ̵ð¿Í °°´Ù´Â °ÍÀ» È®ÀÎÇϽʽÿÀ. ------------------------------------------------------------------------------------
ÀÌ·± °ÍµéÀ» ÇØ´çÆÄÀÏÀÇ ³¡¿¡¸¸ ÷°¡ÇØ¾ß ÇÏ´Â °ÍÀº ¾Æ´ÏÁö¸¸, ±×·¡¾ß ¼³¸íÇϱⰡ Á¦ÀÏ ½±½À´Ï´Ù.
´ÙÀ½ Ç׸ñÀ¸·Î °¡½Ç Áغñ°¡ µÇ¼Ì±º¿ä.
ÀÌÁ¦ Å¥¸ÞÀÏÀ» ÄÄÆÄÀÏÇÏ½Ç Áغñ°¡ µÇ¾ú½À´Ï´Ù.
'ÄÄÆÄÀÏȯ°æÀ» °ËÁõÇÑ´Ù'Ç׸ñ¿¡¼, C ÄÄÆÄÀÏ·¯¸¦ ÁöÁ¤Çϼ̽À´Ï´Ù. ±×°ÍÀÌ cc°¡ ¾Æ´Ï°Å³ª µð·ºÅ丮°¡ PATHȯ°æº¯¼ö¿¡ ÀÖÁö ¾ÊÀ¸¸é conf-cc¿Í conf-ld¸¦ ÆíÁýÇϽʽÿÀ. ÄÄÆÄÀÏ·¯°¡ gccÀÌ°í, PATH¿¡ ÀÖ´Ù°í Çϸé, conf-cc¿Í conf-ld¸¦ °¡º±°Ô ÆíÁýÇÏ°í, cc¸¦ gcc·Î ¹Ù²Ù½Ê½Ã¿À.
±×·¸°Ô ÇϼÌÀ¸¸é ¸í·ÉÇà ÇÁ·ÒÆ®¿¡ ´ÙÀ½°ú °°ÀÌ Çϼ¼¿ä.
make setup check
ÄÄÆÄÀÏÀÌ ³¡³ª¸é, ¼³Ä¡Èļ³Á¤À» ÇÏ¼Å¾ß ÇÕ´Ï´Ù. ÀÌ ÀÏÀ» ½±°Ô ÇØÁÖ´Â ½ºÅ©¸³Æ®°¡ µÎ¾î°³ ÀÖ½À´Ï´Ù.
DNS°¡ Á¦´ë·Î ¼³Á¤µÇ¾ú´Ù¸é, ´ÙÀ½ ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇϱ⸸ ÇÏ¸é µË´Ï´Ù.
./config
¾î¶² ÀÌÀ¯·Î config°¡ DNS¿¡¼ hostnameÀ» ãÁö ¸øÇϸé, config-fast script¸¦ ½ÇÇàÇÏ¼Å¾ß ÇÕ´Ï´Ù.
./config-fast È£½ºÆ®³×ÀÓ.¿ÏÀü.°æ·Î
¿¹¸¦ µé¸é, µµ¸ÞÀÎÀÌ example.comÀÌ°í, ´ç½ÅÄÄÇ»ÅÍÀÇ È£½ºÆ®³×ÀÓÀÌ dolphinÀ̶ó¸é, config-fast¸¦ ´ÙÀ½°ú °°ÀÌ ½ÇÇàÇÕ´Ï´Ù.
./config-fast dolphin.example.com
Å¥¸ÞÀÏÀÌ ½Ã½ºÅÛ¿¡ ¼³Ä¡µÇ¾î¼ °¡µ¿µÉ Áغñ°¡ µÇ¾ú½À´Ï´Ù! ´ÙÀ½Ç׸ñÀº Å¥¸ÞÀÏÀ» °¡µ¿ÇÏ°í ½ÃÇèÇÏ´Â ´Ü°è¸¦ ¾È³»ÇÕ´Ï´Ù.
¸ÕÀú¹ø¿¡ qmail, ucpsi-tcp, daemontools Ÿº¼À» Ç®¾ú½À´Ï´Ù. ¿¹Á¦¿¡¼ ±×°ÍµéÀ» /usr/local/src/qmail¿¡ Ç®¾ú½À´Ï´Ù. ÀÚ ucpsi-tcpµð·ºÅ丮·Î ¿Å±é½Ã´Ù.
cd /usr/local/src/qmail/ucspi-tcp-0.84
'ÄÄÆÄÀÏÀ» Çϼ¼¿ä'Ç׸ñ¿¡¼, conf-cc¿Í conf-ld¸¦ °íÄ¡¼ÌÀ¸¸é, ÀÌ µð·ºÅ丮¿¡¼µµ ¶È°°ÀÌ ÇØÁÝ´Ï´Ù.
±×·±µÚ¿¡ ´ÙÀ½°ú °°ÀÌ ÇϽʽÿÀ.
make make setup check
daemontools ÄÄÆÄÀϵð·ºÅ丮·Î ÀÌÅëÇÕ´Ï´Ù.
cd /usr/local/src/qmail/daemontools-0.61
¶Ç Çѹø, conf-cc¿Í conf-ld¸¦ qmail°ú ucspi-tcp ÄÄÆÄÀϽà °íÃÆÀ¸¸é, ÀÌ µð·ºÅ丮¿¡¼µµ ¶È°°ÀÌ ÇÕ´Ï´Ù.
±×¸®°í ´ÙÀ½°ú °°ÀÌ ÇÕ´Ï´Ù.
make make setup check
/var/qmail/bootµð·ºÅ丮¿¡´Â ¿©·¯°¡Áö ¼³Á¤¿¡ ´ëÇÑ º»º¸±â Å¥¸ÞÀÏ º× ½ºÅ©¸³Æ®°¡ ÀÖ½À´Ï´Ù. /var/spool/mail ´ë $HOME/Mailbox, procmail ¶Ç´Â dot-forward¸¦ ÀÌ¿ëÇϱâ, ±×¸®°í À̰͵éÀÇ ´Ù¾çÇÑ °áÇÕ. Çѹø ºÎ´ã¾øÀÌ °ËÅäÇغ¸½Ã±â ¹Ù¶ø´Ï´Ù. ¿ì¸®´Â ¼³Ä¡¸¦ À§Çؼ ´ÙÀ½À» ÀÌ¿ëÇÏ°Ú½À´Ï´Ù.:
#!/bin/sh # Using stdout for logging # Using control/defaultdelivery from qmail-local to deliver messages by default exec env - PATH="/var/qmail/bin:$PATH" \ qmail-start "`cat /var/qmail/control/defaultdelivery`"
¿¡µðÅÍ·Î À§ÀÇ ³»¿ëÀ» /var/qmail/rc·Î ¸¸µå½Ã°í, ´ÙÀ½°ú °°ÀÌ ¸í·ÉÇÕ´Ï´Ù.
chmod 755 /var/qmail/rc mkdir /var/log/qmail
ÀÌÂë¿¡¼, .qmailÆÄÀÏÀÌ Àü´ÞÇÏÁö ¸øÇÏ´Â ¸Þ¼¼Áöµé¿¡ ´ëÇÑ ±âº»Àü´Þ¸ðµå¸¦ °áÁ¤ÇØ¾ß ÇÕ´Ï´Ù. ´ÙÀ½ÀÇ Å×ÀÌºí¿¡ ¸î°¡Áö °øÅë¼±ÅÃÀÌ °£·«È÷ ¿¹½ÃµÇ¾î ÀÖ½À´Ï´Ù.
Mailbox format Name Location defaultdelivery Comments mbox Mailbox $HOME ./Mailbox most common, works with most MUA's maildir Maildir $HOME ./Maildir/ more reliable, less MUA support mbox username /var/spool/mail See INSTALL.vsm traditional UNIX mailbox
Á¤º¸¸¦ ´õ ¿øÇϽøé INSTALL.mbox, INSTALL.maildir, INSTALL.vsm µîÀ» º¸½Ê½Ã¿À.
±âº» ¸áº¹½º ÇüŸ¦ °í¸£½Ã·Á¸é, À§ÀÇ Å×À̺íÀÇ defaultdelivery °ªÀ» /var/qmail/control/defaultdelivery¿¡ Àû¾î³ÖÀ¸½Ê½Ã¿À. ¿¹) Ç¥ÁØ Å¥¸ÞÀÏ Mailbox Àü´ÞÀ» ¼±ÅÃÇϽ÷Á¸é ´ÙÀ½°ú °°ÀÌ ÇÕ´Ï´Ù.
echo ./Mailbox >/var/qmail/control/defaultdelivery
---------------------------------------------------------------------------------- À¯ÀÇÁ¡: defaultdelivery´Â Ç¥ÁØ Å¥¸ÞÀÏ ÅëÁ¦ ÆÄÀÏÀÌ ¾Æ´Õ´Ï´Ù. À§ÀÇ /var/qmail/rcÆÄÀÏÀÇ Æ¯Â¡ÀÔ´Ï´Ù. ----------------------------------------------------------------------------------
/var/qmail/rc ½ºÅ©¸³Æ®¸¦ ¼öµ¿À¸·Î ½ÇÇàÇÏ¼Å¾ß Çϸé, Å¥¸ÞÀÏÀº ºÎºÐ°¡µ¿ÇÕ´Ï´Ù. ±×·¯³ª, ¿ì¸®´Â Å¥¸ÞÀÏÀÌ ½Ã½ºÅÛÀÌ ºÎÆÃÇÒ¶§¸¶´Ù ÀÚµ¿À¸·Î °¡µ¿Çϱ⸦ ¿øÇÏ°í, ½Ã½ºÅÛÀÌ Á¤ÁöÇÒ ¶§´Â ±ú²ýÇÏ°Ô ²¨Áö±â¸¦ ¿øÇÕ´Ï´Ù.
ÀÌ°ÍÀº startup/shutdown½ºÅ©¸³Æ®¸¦ ´ÙÀ½°ú °°ÀÌ ÀÛ¼ºÇÏ¸é µË´Ï´Ù.
#!/bin/sh PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin export PATH case "$1" in start) echo -n "Starting qmail: svscan" cd /var/qmail/supervise env - PATH="$PATH" svscan & echo $! > /var/run/svscan.pid echo "." ;; stop) echo -n "Stopping qmail: svscan" kill `cat /var/run/svscan.pid` echo -n " qmail" svc -dx /var/qmail/supervise/* echo -n " logging" svc -dx /var/qmail/supervise/*/log echo "." ;; stat) cd /var/qmail/supervise svstat * */log ;; doqueue|alrm) echo "Sending ALRM signal to qmail-send." svc -a /var/qmail/supervise/qmail-send ;; queue) qmail-qstat qmail-qread ;; reload|hup) echo "Sending HUP signal to qmail-send." svc -h /var/qmail/supervise/qmail-send ;; pause) echo "Pausing qmail-send" svc -p /var/qmail/supervise/qmail-send echo "Pausing qmail-smtpd" svc -p /var/qmail/supervise/qmail-smtpd ;; cont) echo "Continuing qmail-send" svc -c /var/qmail/supervise/qmail-send echo "Continuing qmail-smtpd" svc -c /var/qmail/supervise/qmail-smtpd ;; restart) echo "Restarting qmail:" echo "* Stopping qmail-smtpd." svc -d /var/qmail/supervise/qmail-smtpd echo "* Sending qmail-send SIGTERM and restarting." svc -t /var/qmail/supervise/qmail-send echo "* Restarting qmail-smtpd." svc -u /var/qmail/supervise/qmail-smtpd ;; cdb) tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp chmod 644 /etc/tcp.smtp* echo "Reloaded /etc/tcp.smtp." ;; help) cat <<HELP stop -- stops mail service (smtp connections refused, nothing goes out) start -- starts mail service (smtp connection accepted, mail can go out) pause -- temporarily stops mail service (connections accepted, nothing leaves) cont -- continues paused mail service stat -- displays status of mail service cdb -- rebuild the tcpserver cdb file for smtp restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it doqueue -- sends qmail-send ALRM, scheduling queued messages for delivery reload -- sends qmail-send HUP, rereading locals and virtualdomains queue -- shows status of queue alrm -- same as doqueue hup -- same as reload HELP ;; *) echo "Usage: $0 {start|stop|restart|doqueue|reload|stat|pause|cont|cdb|queue|help}" exit 1 ;; esac exit 0
ÀÌ ½ºÅ©¸³Æ®´Â http://Web.InfoAve.net/~dsill/qmail-script-dt61.txt¿¡¼µµ ±¸ÇÒ ¼ö ÀÖ½À´Ï´Ù.
------------------------------------------------------------------------------------- À¯ÀÇÁ¡: ½Ã½ºÅÛÀÌ ÀçºÎÆÃÇÑ´ÙÀ½¿¡ Å¥¸ÞÀÏÀÌ °ð ¾ø¾îÁö¸é, ½ºÅ©¸³Æ®ÀÇ "start"Ç׸ñ¿¡ ÀÖ´Â env ¸í·ÉÀ» nohupÀ¸·Î µ¡ºÙÀÔ´Ï´Ù. ¿¹) nohup env - PATH="$PATH" svscan & -------------------------------------------------------------------------------------
¿¡µðÅÍ·Î ½ºÅ©¸³Æ®¸¦ ¸¸µé°Å³ª À¥ºê¶ó¿ìÀú·Î ´Ù¿î·ÎµåÇؼ ½Ã½ºÅÛÀÇ init.dµð·ºÅ丮¿¡ ¼³Ä¡ÇϽôµ¥, ´ÙÀ½°ú °°Àº Àå¼Ò°¡ µË´Ï´Ù.
½ºÅ©¸³Æ®¸¦ qmailÀ̶ó°í À̸§ºÙÀ̽ʽÿÀ. ½ºÅ©¸³Æ®¸¦ ¸î°³ÀÇ rcµð·ºÅ丮¿¡ ¸µÅ©½ÃÅ°¼Å¾ß ÇÕ´Ï´Ù. ÀÌ µ¥·ºÅ丮µéÀº rcN.d°°ÀÌ µÇ¾îÀִµ¥, NÀº Àû¿ë runlevelÀÔ´Ï´Ù. ±âµ¿µð·ºÅ丮 ±¸Á¶°¡ º¹ÀâÇؼ º» ¹®¼¿¡´Â ´Ù·çÁö ¾Ê½À´Ï´Ù. ±×·¯´Ï °£´ÜÇÑ Áö½Ã»çÇ×ÀÌ ¸¾¿¡ Â÷Áö ¾ÊÀ¸½Ã¸é ½Ã½ºÅÛ¹®¼¸¦ ÂüÁ¶ÇϽʽÿÀ. rc µð·ºÅ丮´Â ´ÙÀ½Áß ÇϳªÀÏ °Ì´Ï´Ù.
¸µÅ©¸¦ ¸¸µå½Ã´Âµ¥, ´ÙÀ½°ú °°ÀÌ ÇϽʽÿÀ. RCDIR¸¦ ½Ã½ºÅÛÀÇ rc µð·ºÅ丮ÀÇ Àå¼Ò·Î ¹Ù²Ù½Ê½Ã¿À.
ln -s ../init.d/qmail RCDIR/rc0.d/K30qmail ln -s ../init.d/qmail RCDIR/rc1.d/K30qmail ln -s ../init.d/qmail RCDIR/rc2.d/S80qmail ln -s ../init.d/qmail RCDIR/rc4.d/S80qmail ln -s ../init.d/qmail RCDIR/rc5.d/S80qmail ln -s ../init.d/qmail RCDIR/rc6.d/K80qmail
-------------------------------------------------------------------------------------- À¯ÀÇÁ¡: Àü´Ü°èÀÇ ¼ýÀÚ´Â ¸Å¿ì ½Ã½ºÅÛ¿¡ ÀÇÁ¸ÇÕ´Ï´Ù. ±×·¸Áö¸¸ ´Ù¼Ò À¯¿¬ÇÕ´Ï´Ù. SendmailÀÌ ÇöÀç ¼³Ä¡µÇ¾î ÀÖÀ¸¸é, "find RCDIR -name "*sendmail" -print" ¸í·ÉÀ» ½ÇÇàÇÏ¸é ½Ã½ºÅÛ¿¡ Àû¿ëÇÒ ¼ö ÀÖ´Â ¼ýÀÚ¸¦ ¾Ë·ÁÁÝ´Ï´Ù. --------------------------------------------------------------------------------------
ÀÌÁ¦ Å¥¸ÞÀϼºñ½º¸¦ À§ÇØ °¨µ¶µð·ºÅ丮¸¦ ¸¸µå½Ê½Ã¿À.
mkdir -p /var/qmail/supervise/qmail-send/log mkdir -p /var/qmail/supervise/qmail-smtpd/log chmod +t /var/qmail/supervise/qmail-send chmod +t /var/qmail/supervise/qmail-smtpd
/var/qmail/supervise/qmail-send/runÆÄÀÏÀ» ¸¸µå½Ê½Ã¿À.
#!/bin/sh exec /var/qmail/rc
/var/qmail/supervise/qmail-send/log/runÆÄÀÏÀ» ¸¸µå½Ê½Ã¿À.
#!/bin/sh exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t /var/log/qmail
/var/qmail/supervise/qmail-smtpd/runÆÄÀÏÀ» ¸¸µå½Ê½Ã¿À.
#!/bin/sh QMAILDUID=`id -u qmaild` NOFILESGID=`id -g qmaild` exec /usr/local/bin/softlimit -m 2000000 \ /usr/local/bin/tcpserver -v -p -x /etc/tcp.smtp.cdb \ -u $QMAILDUID -g $NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd 2>&1
/var/qmail/supervise/qmail-smtpd/log/runÆÄÀÏÀ» ¸¸µå½Ê½Ã¿À.
#!/bin/sh exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t /var/log/qmail/smtpd
runÆÄÀϵ鿡 ½ÇÇà°¡´ÉÀ» ºÎ¿©ÇÕ´Ï´Ù.
chmod 755 /var/qmail/supervise/qmail-send/run chmod 755 /var/qmail/supervise/qmail-send/log/run chmod 755 /var/qmail/supervise/qmail-smtpd/run chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
±×·± ´ÙÀ½¿¡, ·Î±×µð·ºÅ丮¸¦ ¸¸µì´Ï´Ù.
mkdir -p /var/log/qmail/smtpd chown qmaill /var/log/qmail /var/log/qmail/smtpd
±âµ¿½ºÅ©¸³Æ®¿¡ ½ÇÇà±ÇÇÑÀ» ºÎ¿©ÇÏ°í, ½ÇÇà°æ·Î¿¡ ÀÖ´Â µð·ºÅ丮·Î ¸µÅ©ÇÕ´Ï´Ù.
# substitute the correct location of your rc dir on the next two lines chmod 755 /etc/init.d/qmail ln -s /etc/init.d/qmail /usr/local/sbin
·ÎÄÃÈ£½ºÆ®°¡ SMTP¸¦ ÅëÇؼ ¸áÀ» »ðÀÔ (inject)Çϵµ·Ï ÇÕ´Ï´Ù.
echo '127.:allow,RELAYCLIENT=""' >>/etc/tcp.smtp /usr/local/sbin/qmail cdb
Å¥¸ÞÀÏ°ú ÇöÁ¸ÇÏ´Â MTA, ´ë°³ Sendmail, µÎ°³¸¦ »ç¿ëÇÒ ¼öµµ ÀÖÁö¸¸, ±×·¸°Ô ÇÏÁö ¾ÊÀ» °ÍÀ» °·ÂÈ÷ ±Ç°íÇÕ´Ï´Ù. ±×¸®°í, ¼ÖÁ÷È÷ ¸»Çؼ, ÀÌ ±ÛÀ» ÀÐ°í °è½Å´Ù¸é, ±×°Ô ¹«¾ùÀ» ¶æÇÏ´Â Áö ¸ð¸£½Ç °Ì´Ï´Ù. :-)
ÇöÁ¸ MTA°¡ SendmailÀ̶ó¸é, init.d ½ºÅ©¸³Æ®¸¦ stopÀμö¸¦ ÁÖ¾î ½ÇÇàÇÏ¿© ¸ØÃâ ¼ö ÀÖ½À´Ï´Ù. ¿¹) ´ÙÀ½ Áß Çϳª°¡ À¯È¿ÇÒ °Ì´Ï´Ù.
/etc/init.d/sendmail stop /sbin/init.d/sendmail stop /etc/rc.d/init.d/sendmail stop
init.d/sendmail ½ºÅ©¸³Æ®¸¦ ãÀ» ¼ö ¾ø´Ù¸é, "ps -ef|grep sendmail" ¶Ç´Â "ps waux|grep sendmail"À» »ç¿ëÇؼ sendmailÀÇ PID¸¦ ¾Ë¾Æ³½ µÚ¿¡, ´ÙÀ½°ú °°ÀÌ Çؼ ¸ØÃä´Ï´Ù.
kill PID-of-sendmail
MTA°¡ SendmailÀÌ ¾Æ´Ï¸é, ÇØ´ç¹®¼¿¡¼ ¹Ù¸¥ ¸ØÃã ÀýÂ÷¸¦ Âü°íÇϽʽÿÀ.
½Ã½ºÅÛ¿¡¼ ±âÁ¸ÀÇ MTA¸¦ ¿ÏÀüÈ÷ Á¦°ÅÇÏ´Â °Íµµ °í·ÁÇغ¼ ¸¸ÇÕ´Ï´Ù. Àû¾îµµ init.d ½ºÅ©¸³Æ®¸¦ ¹«·ÂÇÏ°Ô ÇÏ¸é ½Ã½ºÅÛÀÌ ÀçºÎÆÃÇÒ ¶§ ´Ù½Ã´Â °¡µ¿ÇÏÁö ¾Ê½À´Ï´Ù.
·¹µåÇÞ¸®´ª½º¿¡¼´Â ´ÙÀ½°ú °°ÀÌ Çؼ SendmailÀ» Á¦°ÅÇÕ´Ï´Ù.
rpm -e --nodeps sendmail
³¡À¸·Î, ±âÁ¸ÀÇ /usr/lib/sendmailÀ» Å¥¸ÞÀÏÆÇÀ¸·Î ¹Ù²ß´Ï´Ù.
mv /usr/lib/sendmail /usr/lib/sendmail.old # ¿¡·¯¸¦ ¹«½ÃÇϼ¼¿ä mv /usr/sbin/sendmail /usr/sbin/sendmail.old # ¿¡·¯¸¦ ¹«½ÃÇϼ¼¿ä chmod 0 /usr/lib/sendmail.old /usr/sbin/sendmail.old # ¿¡·¯¸¦ ¹«½ÃÇϼ¼¿ä ln -s /var/qmail/bin/sendmail /usr/lib ln -s /var/qmail/bin/sendmail /usr/sbin
ÀÌÁ¦´Â Å¥¸ÞÀÏ°¡µ¿ÀÌ °¡±õ½À´Ï´Ù. ³¡´Ü°è´Â ½Ã½ºÅÛ¾Ù¸®¾î½º¸¦ µÎ¾î°³ ¸¸µå´Â °ÍÀÔ´Ï´Ù.
¸ðµç Å¥¸ÞÀϼ³Ä¡¿¡¼´Â ½Ã½ºÅÛ¾Ù¸®¾î½º¸¦ ¼¼°³ ¸¸µé¾î¾ß ÇÕ´Ï´Ù.
¾Ù¸®¾î½º ¸ñÀû postmaster RFC 821 ¿ä±¸»çÇ×À̸ç, ¸á¾Öµå¹Î (´ç½Å)À» °¡¸®Åµ´Ï´Ù. mailer-daemon ¹Ù¿î½º¸á¿¡ ´ëÇÑ »ç½Ç»óÀÇ Ç¥ÁؼöÃëÀÎ root Ư±Ç°èÁ¤¿¡¼ ¿Â ¸áÀ» ½Ã½ºÅÛ¾Öµå¹Î¿¡°Ô º¸³½´Ù.
ÀÌ ¾Ù¸®¾î½ºµéÀ» ¸¸µé·Á¸é, ±×°Íµé ÇϳªÇϳª°¡ ¾îµð¿¡ ³õ¿©Á®¾ß ÇÏ´Â Áö (·ÎÄûç¿ëÀÚ, ¶Ç´Â ¿ø°ÝÁÖ¼Ò) °áÁ¤ÇÏ°í, .qmailÆÄÀÏÀ» ¸¸µé¾î¼ °®´Ù³õÀ¸¸é µË´Ï´Ù. ¿¹¸¦ µé¾î, ·ÎÄûç¿ëÀÚ dave´Â ½Ã½ºÅÛ°ú ¸áÀÇ ¾Öµå¹ÎÀ̶ó°í ÇÏ¸é ´ÙÀ½°ú °°ÀÌ ÇÕ´Ï´Ù.
echo dave > /var/qmail/alias/.qmail-root echo dave > /var/qmail/alias/.qmail-postmaster ln -s .qmail-postmaster > /var/qmail/alias/.qmail-mailer-daemon chmod 644 /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-postmaster
¸¶Áö¸·À¸·Î, Å¥¸ÞÀÏÀ» °¡µ¿ÇÕ´Ï´Ù.
/usr/local/sbin/qmail start
Å¥¸ÞÀÏÀÌ Áö±ÝÂë ¿îÇàÇÏ°í ÀÖÀ»°Ì´Ï´Ù. TEST.deliver, TEST.receive¿¡ ÀÖ´Â Áö½Ã»çÇ×À» µû¸£½Ã¸é Á¦´ë·Î ÀÛµ¿ÇÏ°í ÀÖ´Â Áö °Ë»çÇÒ ¼ö ÀÖ½À´Ï´Ù. À̵é Áö½Ã»çÇ×À» ÀÌ¿ëÇϸé, ·Î±×´Â splogger°¡ ¾Æ´Ñ accustamp¿Í cyclog°¡ ¸¸µç´Ù´Â °ÍÀ» ¾Ë¾ÆµÎ½Ê½Ã¿À.