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

7. qmail µ¥¸óÀ» À§ÇÑ µð·ºÅ丮¿Í ÆÄÀϵéÀ» »ý¼º.

# 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

# vi /var/qmail/supervise/qmail-send/run 
-----------------------------------
#!/bin/sh
exec /var/qmail/rc
-----------------------------------

# vi /var/qmail/supervise/qmail-send/log/run 
---------------------------------------------------------------
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t /var/log/qmail
---------------------------------------------------------------

# vi /var/qmail/supervise/qmail-smtpd/run 
--------------------------------------------------------
#!/bin/sh
exec /usr/local/bin/softlimit -m 2000000 \
        /usr/local/bin/tcpserver -v -p -x/etc/tcp.smtp.cdb \
        -u 505 -g 506 0 25 /var/qmail/bin/qmail-smtpd 2>&1
--------------------------------------------------------
À§ÀÇ "-u 505 -g 506" ¿¡¼­ 505´Â alias ÀÇ UID (user ID)ÀÌ°í, 506Àº GID (group ID)ÀÌ´Ù. ÄÄÇ»Å͸¶´Ù µî·ÏµÇ´Â alias ÀÇ UID¿Í GID´Â ´Ù¸£¹Ç·Î, /etc/passwd ÆÄÀÏÀ» ÂüÁ¶Ç϶ó. ±×¸®°í, À§¿¡¼­ º¸ÀÌ´Â "\"±âÈ£´Â ¶óÀÎÀÌ ¹Ù²î¾úÀ½À» ³ªÅ¸³»´Â ±âÈ£ÀÌ´Ù. ¿ø·¡ À§ÀÇ ÆÄÀÏÀ» ÇÑ ÁÙ·Î ¸¸µé¾î¾ß ÇÏÁö¸¸, ±×·¯¸é º¸±â°¡ ¾î·Æ±â ¶§¹®¿¡ ¿©·¯ ÁÙ·Î ¸¸µé±â À§Çؼ­ Ãß°¡µÈ °ÍÀÌ´Ù.
# vi /var/qmail/supervise/qmail-smtpd/log/run 
----------------------------------------------------------------------
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t /var/log/qmail/smtpd
----------------------------------------------------------------------
ÀÌ·¸°Ô ÆíÁýÇÑ ÆÄÀϵ鿡 ½ÇÇà ±ÇÇÑÀ» ÁØ´Ù.
# 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

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