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

QMAIL·Î ¸ÞÀϼ­¹ö ±¸ÃàÇϱâ ( ¸ÞÀÏ forwarding °ú pop3¼³Á¤±îÁö..)

QMAIL·Î ¸ÞÀϼ­¹ö ±¸ÃàÇϱâ ( ¸ÞÀÏ forwarding °ú pop3¼³Á¤±îÁö..)

Á¤°è¿Á -qmail-¼³Ä¡ hook7346@hsd.hackerslab.org

¹®»óÁØ -qmail-pop3¼³Ä¡ dakeshi@hsd.hackerslab.org

2001.2.5
ÀÌ¹Ì ½Ç·ÂÀÖ´Â ¸¹Àº ºÐµéÀÌ qmail¿¡ °üÇÑ ¹®¼­¸¦ ¾²¼ÌÁö¸¸, ³ª °°Àº Ãʺ¸ÀÚ¿¡°Ô´Â ³Ê¹« ¾î·Á¿î ¸»ÀÌ ¸¹°í, µû¶óÇϱâ Èûµç ¸éÀÌ ¸¹¾Ò´Ù. ( http://kldp.org ¿¡ °¡¸é, qmail ¼³Ä¡°ü·Ã ¹®¼­¸¦ ±¸ÇÒ ¼ö ÀÖ´Ù.) ±×·¡¼­, ³ª´Â ±×°£ÀÇ °æÇèÀ» ±â¹ÝÀ¸·Î ÇÏ¿©, µû¶óÇϱ⸸ ÇÏ¸é ¹Ù·Î µÉ ¼ö ÀÖ´Â qmail ¼³Ä¡ ¸Å´º¾óÀ» ¾²±â·Î Çß´Ù. ÀÌ ¹®¼­´Â ÃæºÐÇÑ °ËÁõÀ» ¹Þ¾Ò´Ù°í ÇÒ ¼ö´Â ¾øÁö¸¸, ¿©·¯ ´ëÀÇ i386°è¿­ ÄÄÇ»Åͻ󿡼­ ½ÇÇèµÇ¾ú´Ù. ½ÇÇèÇÑ ¸®´ª½º¹èÆ÷ÆÇÀº "¿Í¿ì¸®´ª½º 6.2 ¾÷µ¥ÀÌÆ®" ¿Í "¿µ¹® RedHat 7.0"ÀÌ´Ù. ÀÌ ¹®¼­¸¦ º¸°í, ´Ù¸¥ Á¾·ùÀÇ ¸®´ª½º ¹èÆ÷ÆÇ¿¡¼­ ¼º°øÇÏ¿´´Ù¸é, ÇÊÀÚ¿¡°Ô À̸ÞÀÏ·Î ¾Ë·ÁÁֱ⠹ٶõ´Ù. ¶Ç´Â, ¹ö±×³ª ¼öÁ¤»çÇ×ÀÌ ÀÖ´Ù¸é ¿ª½Ã À̸ÞÀÏ·Î ¾Ë·ÁÁֱ⠹ٶõ´Ù. ±×·¯ÇÑ »çÇ×µéÀº ÀÌ ¹®¼­¸¦ »õ·Ó°Ô ¸¸µå´Âµ¥ Ãß°¡µÉ °ÍÀÌ´Ù.(°øÇåÀÚÀÇ À̸§°ú ÇÔ²²..) ¶Ç Çϳª, Âü°í»çÇ×ÀÌ Àִµ¥, ¾îµð±îÁö³ª ÀÌ ¹®¼­´Â qmailÀ» ¼³Ä¡ÇÏ°í µ¿ÀÛÇÏ´Â °Í¿¡¸¸ ÁÖ¾ÈÁ¡À» µÎ¾ú´Ù. ¿©·¯ °¡Áö·Î ÀÚ±â»çÁ¤¿¡ ¸Â°Ô º¯È¯ÇÏ´Â ¹®Á¦¿¡ ´ëÇؼ­´Â ÃæºÐÇÑ ¼³¸íÀ» ÇÏÁö ¾Ê°í ÀÖ´Ù´Â °ÍÀÌ´Ù. ÀÌ ¹®¼­¸¦ º¸°í qmail ¸ÞÀϼ­¹ö¸¦ ¸¸µå´Â °Í¿¡ ¼º°øÇÏ°í ³ª¼­ ÀÚ½ÅÀÇ È¯°æ¿¡ ¸Â°Ô ¼³Á¤ÇÏ´Â °Í¿¡ ´ëÇؼ­´Â, kldp.org¿¡ ÀÖ´Â ´Ù¸¥ qmail °ü·Ã¹®¼­µéÀ» Âü°íÇϱ⠹ٶõ´Ù. ÇÊÀÚ´Â ÀÌ ¹®¼­¿¡ ´ëÇÑ ÃæºÐÇÑ µ¡ºÙÀÓÀ» °èȹÇÏ°í ÀÖÁö¸¸, ¾ðÁ¦Âë ¸¸µé¾îÁúÁö´Â º»Àεµ ¾à¼ÓÀ» ¸øÇÏ°Ú´Ù. ±×·³,µû¶óÇϱ⸸ ÇÏ¸é ¼º°øÇÒ ¼ö ÀÖ´Â qmail ¼³Ä¡¸¦ ½ÃÀÛÇØ º¸ÀÚ !! ¹Ýµå½Ã ÇÊ¿äÇÑ °Í : DNS µî·Ï È£½ºÆ® (DNS¿¡ À̸§ÀÌ µî·ÏµÇ¾îÁø È£½ºÆ®°¡ ¹Ýµå½Ã ÇÊ¿äÇÏ´Ù. ¸¸¾à ¾ø´Ù¸é, ¸ÞÀϼ­¹ö¸¦ ¸¸µé ¼ö°¡ ¾ø´Ù. ÀÌ Á¡Àº ´©±¸³ª ´Ù ¾Ë°í ÀÖÀ¸¸®¶ó »ý°¢ÇÑ´Ù.)

1. qmail ¼Ò½º ¹Þ¾Æ¿À±â

qmailÀ» ¼³Ä¡ÇÏ°í, pop3 ±îÁö ¼³Á¤Çϱâ À§Çؼ­ ÇÊ¿äÇÑ ÆÐÅ°Áö´Â ´ÙÀ½°ú °°´Ù.

qmail , ucspi-tcp , daemontools , rblsmtpd , qmail-103.patch , checkpassword

À§ÀÇ °ÍµéÀº ¸ðµÎ http://www.qmail.org ¿¡¼­ ¹ÞÀ» ¼ö Àְųª ¸µÅ©¸¦ ãÀ» ¼ö ÀÖ´Ù.

http://www.qmail.org/top.html

http://cr.yp.to/rblsmtpd.html

http://cr.yp.to/ucspi-tcp/install.html

http://cr.yp.to/daemontools/install.html

ftp://ftp.dti.ad.jp/pub/FreeBSD/ports/distfiles/qmail-103.patch

ftp://ftp.fujitsu.co.jp/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/checkpassword-0.81.tar.gz

À§ÀÇ »çÀÌÆ®¿¡µµ ¾øÀ¸¸é ftp search¸¦ ÇØÁÖ´Â

http://filewatcher.org¿¡ °¡¼­ ã¾Æº¸±æ ¹Ù¶õ´Ù. ÀÚÁÖ ¸µÅ©°¡ ±ú¾îÁö´Â ¹®Á¦·Î ÇÏ¿©, ÇÊÀÚ°¡ Á÷Á¢ ÆÄÀϵéÀ» ¿Ã·Á³õ¾Ò´Ù. http://hsd.hackerslab.org/~hook7346/qmail.html (DeadLink ?)¿¡ °¡¸é ¹ÞÀ» ¼ö ÀÖ´Ù.

ÇöÀçÀÇ ¹öÀüµéÀº ´ÙÀ½°ú °°´Ù. qmail-1.03.tar.gz rblsmtpd-0.70.tar.gz ucspi-tcp-0.88.tar.gz daemontools-0.70.tar.gz qmail-103.patch checkpassword-0.81.tar.gz

2. ·çÆ®±ÇÇÑÀ¸·Î º¯°æÇÑ µÚ, (ÀÌÈÄ°úÁ¤Àº °è¼Ó ·çÆ®±ÇÇÑÀ̾î¾ß ÇÑ´Ù.) ÀÓÀÇÀÇ µð·ºÅ丮¿¡¼­ ¼Ò½º¸¦ Ǭ´Ù. ³» °æ¿ì´Â /root/temp/ µð·ºÅ丮ÀÌ´Ù.

$ su
password:
# cd /root/temp/
# cp [¼Ò½º¸¦ ´Ù¿î¹ÞÀº µð·ºÅ丮]/qmail-1.03.tar.gz  /root/temp/
# cp [¼Ò½º¸¦ ´Ù¿î¹ÞÀº µð·ºÅ丮]/rblsmtpd-0.70.tar.gz  /root/temp/
# cp [¼Ò½º¸¦ ´Ù¿î¹ÞÀº µð·ºÅ丮]/ucspi-tcp-0.88.tar.gz  /root/temp/
# cp [¼Ò½º¸¦ ´Ù¿î¹ÞÀº µð·ºÅ丮]/daemontools-0.70.tar.gz  /root/temp/

# tar -zxf qmail-1.03.tar.gz
# tar -zxf rblsmtpd-0.70.tar.gz
# tar -zxf ucspi-tcp-0.88.tar.gz
# tar -zxf daemontools-0.70.tar.gz
±×·¯¸é, °¢°¢ÀÇ qmail-1.03 rblsmtpd-0.70 ucspi-tcp-0.88 daemontools-0.70 ¶ó´Â ÇÏÀ§ µð·ºÅ丮°¡ »ý±ä´Ù.
  • ¿©±â¼­, ¿Ö checkpassword ´Â ¼Ò½º¸¦ Ç®Áö ¾Ê´ÂÁö ±Ã±ÝÇØ ÇÒ ¼öµµ ÀÖ´Â »ç¶÷ÀÌ ÀÖÀ» °ÍÀÌ´Ù.
  • ÀÌÀ¯´Â ÀÏ´Ü qmail ÀÌ ¼º°øÇØ¾ß pop3¸¦ ¸¸µé ¼ö ÀÖ´Ù´Â °ÍÀÌ´Ù. pop3 ÀÇ ¼³Ä¡´Â ¾ÆÁÖ °£´ÜÇϹǷÎ,
  • qmail ¼³Ä¡ ¼º°øÀÌÈÄ¿¡ ´Ù·ê °ÍÀÌ´Ù.

3. qmail ¼³Ä¡¸¦ À§ÇÑ µð·ºÅ丮¸¦ »ý¼ºÇÑ´Ù.

ÇÊ¿äÇÑ ÇÏÀ§µð·ºÅ丮´Â qmailÀÌ ÀÚµ¿À¸·Î ¸¸µé±â ¶§¹®¿¡, qmailÀÇ È¨µð·ºÅ丮¸¸ ¸¸µé¾î ÁÖ¸é µË´Ï´Ù.

# mkdir /var/qmail

Âü°í»çÇ× : qmailÀ» /var°¡ ¾Æ´Ñ ´Ù¸¥ °÷¿¡ ³õ°í ½ÍÀ¸½Ã¸é, /var/qmail µð·ºÅ丮¿¡
        ±×°÷À» °¡¸®Å°´Â ½Éº¼¸¯ ¸µÅ©¸¦ ¸¸µå½Ã¸é µË´Ï´Ù. 
        ¿¹¸¦ µé¸é, ´ÙÀ½°ú °°ÀÌ ÇÏ½Ã¸é µË´Ï´Ù.

        mkdir /var/qmail
        ln -s /usr/man /var/qmail/man                   -->  man DIRÀ» /usr/man À¸·Î ¸µÅ©
        mkdir /etc/qmail
        ln -s /etc/qmail /var/qmail/control                -->  control DIRÀ» /etc/qmail ·Î ¸µÅ©
        ln -s /usr/sbin /var/qmail/bin                    -->  bin DIRÀ» /usr/sbin À¸·Î ¸µÅ©

4. qmail ½ÇÇàÀ» À§ÇÑ À¯Àú¿Í ±×·ìÀ» »ý¼ºÇÑ´Ù.

/root/temp/qmail-1.03/INSTALL.ids ÆÄÀÏÀ» ÆíÁýÇÑ´Ù. ´ÙÀ½°ú °°ÀÌ ¸®´ª½º Ç׸ñµé¸¸ ³²±â°í ³ª¸ÓÁö´Â ±ú²ýÇÏ°Ô Áö¿î´Ù.

groupadd nofiles
useradd -g nofiles -d /var/qmail/alias alias
useradd -g nofiles -d /var/qmail qmaild
useradd -g nofiles -d /var/qmail qmaill
useradd -g nofiles -d /var/qmail qmailp
groupadd qmail
useradd -g qmail -d /var/qmail qmailq
useradd -g qmail -d /var/qmail qmailr
useradd -g qmail -d /var/qmail qmails 

#cd /root/temp/qmail-1.03
# sh INSTALL.ids 
ÇØÁÖ¸é ÇÊ¿äÇÑ À¯Àú¿Í ±×·ìÀÌ »ý¼ºµÈ´Ù.
  • groupadd useradd ¶ó´Â ¸í·É¾î°¡ ¾ø´Ù°í ³ª¿À´Â °æ¿ì°¡ Àִµ¥, ±× °æ¿ì¿¡´Â ´ÙÀ½°ú °°ÀÌ PATH º¯¼ö¸¦ °»½ÅÇØ ÁÖ¸é µÈ´Ù.
# PATH=/usr/sbin:$PATH
# export PATH
À̹ø¿¡´Â oversize DNS ÆÐÄ¡¸¦ Àû¿ëÇÑ´Ù. ÀÌ ÆÐÄ¡´Â RFCÀÇ ±Ç°í¾ÈÀ» ¹«½ÃÇÏ°í 512¹ÙÀÌÆ®º¸´Ù Å« UDP DNS ÀÀ´äÀ» µÇµ¹·ÁÁÖ´Â ÀϺΠISP¾÷üµé(AOL, hanmail.net °°Àº °÷) ¶§¹®¿¡ ÇÊ¿äÇÑ °ÍÀÌ´Ù. qmailÀÇ DNS resolve ¶óÀ̺귯¸®´Â RFC¿Í ȣȯµÇµµ·Ï µÇ¾îÀÖÀ¸¹Ç·Î RFC¿Í ȣȯµÇÁö ¾Ê°Ô Àü´ÞµÇ´Â ¸Þ½ÃÁö¿¡´Â ÀÀ´äÇÏÁö ¸øÇÑ´Ù. ´ÙÀ½ÀÇ ÆÐÄ¡´Â qmailÀÌ ±×·¯ÇÑ ºÒ¹ýÀûÀÎ DNSÀÇ ÀÀ´ä¿¡ Á¤È®ÇÏ°Ô ¼öÇàÇϵµ·Ï ÇÑ´Ù. ÆÐÄ¡´Â ´ÙÀ½°ú °°ÀÌ ÇÑ´Ù.(¹Ýµå½Ã qmailÀÇ ¼Ò½º µð·ºÅ丮¿¡¼­ ÇÒ °Í.)
#patch -p1 < ./qmail-103.patch

5. qmail °ú ¿¬°ü ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.

# cd /root/temp/qmail-1.03/
# make
# make setup check
qmailÀ» À§ÇÑ ´Ù¸¥ ÇÁ·Î±×·¥µéµµ ÄÄÆÄÀÏÇÏ°í ¼³Ä¡ÇÑ´Ù. (ucspi-tcp , daemontools , rblsmtpd)
# cd /root/temp/ucspi-tcp-0.88/
# make
# make setup check

# cd /root/temp/daemontools-0.70/
# make
# make setup check

# cd /root/temp/rblsmtpd-0.70/
# make
# make setup check

6. ±âº» control ÆÄÀϵéÀÇ ¼³Á¤À» À§ÇÏ¿©, qmail config Çϱâ

# cd /root/temp/qmail-1.03/
# ./config
Á¤»óÀûÀÎ ½ÇÇà°á°ú´Â ´ÙÀ½°ú °°´Ù.
[root@chsd qmail-1.03]# ./config
Your hostname is chsd.
Your host's fully qualified name in DNS is chsd.chonnam.ac.kr.
Putting chsd.chonnam.ac.kr into control/me...
Putting chonnam.ac.kr into control/defaultdomain...
Putting ac.kr into control/plusdomain...
Checking local IP addresses:
127.0.0.1: Adding localhost to control/locals...
168.131.34.167: Adding chsd.chonnam.ac.kr to control/locals...
If there are any other domain names that point to you,
you will have to add them to /var/qmail/control/locals.
You don't have to worry about aliases, i.e., domains with CNAME records.
Copying /var/qmail/control/locals to /var/qmail/control/rcpthosts...
Now qmail will refuse to accept SMTP messages except to those hosts.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!
[root@chsd qmail-1.03]#
¸¸¾à, À§¿Í °°Àº ¸Þ½ÃÁö°¡ ³ª¿ÀÁö ¾Ê´Â´Ù¸é, ´ç½ÅÀÇ Network ¼³Á¤ ¹× DNS ¼³Á¤¿¡ ¹®Á¦°¡ ÀÖ´Â °æ¿ìÀÌ´Ù. DNS ¼­¹ö¿¡ À̸§ÀÌ Á¤»óÀûÀ¸·Î µî·ÏµÇ¾î ÀÖ´Ù¸é, Network ¼³Á¤À» Àß »ìÆ캸¾Æ¾ß ÇÑ´Ù.

Àß »ìÆ캸¾Æ¾ß ÇÒ ¼³Á¤ÆÄÀÏÀº ´ÙÀ½°ú °°´Ù.

/etc/resolv.conf
search chonnam.ac.kr       <--- ƯÈ÷, ÀÌ ÁÙÀÌ ¾ø¾î¼­, ¹®Á¦¸¦ °ÞÀº °æ¿ì°¡ ÀÖ´Ù. 
nameserver 168.126.63.1                  ÇÊÀÚ´Â À̰Ͷ§¹®¿¡ ¹«Ã´ °í»ýÀ» Çß¾ú´Ù.
nameserver 168.126.63.2
ƯÈ÷, search [domain name] ¶óÀÎÀÌ ¹Ýµå½Ã ÀÖ¾î¾ß ÇÑ´Ù.
/etc/hosts
127.0.0.1        localhost       localhost.localdomain
123.234.123.234  chsd.chonnam.ac.kr  chsd
123.234.123.231  other.chonnam.ac.kr  other
À§ ÆÄÀÏÀÇ ³»¿ëÀ» È®ÀÎÇÏ°í, ³»¿ë¿¡ ¸ÂÃß¾î ¼öÁ¤ÇÑ´Ù.
/etc/sysconfig/network
..........
..........
HOSTNAME=chsd
DOMAINNAME=chonnam.ac.kr
..........
..........
À§ÀÇ ¶óÀÎÀ» È®ÀÎÇÏ¿©, ¾øÀ¸¸é Ãß°¡ÇÑ´Ù.

À§ÀÇ ¼öÁ¤»çÇ×À» ´Ù Àû¿ëÇÏ¿´´Âµ¥µµ, Á¤»óÀûÀÎ config °¡ ¼öÇàµÇÁö ¾Ê´Â´Ù¸é, ±×¶§´Â ÀÌ·¸°Ô ÇÑ´Ù.

[root@chsd qmail-1.03]# ./config-fast chsd.chonnam.ac.kr
config-fast ´ÙÀ½¿¡ ¼­¹öÀÇ DNS µî·Ï È£½ºÆ®³×ÀÓÀ» ´Ù ½áÁÖ¸é µÈ´Ù. ±×·¯¸é, Á¤»óÀûÀ¸·Î ´ÙÀ½ ¼³Ä¡°¡ °¡´ÉÇÏ´Ù.

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

8. qmailÀÇ logÆÄÀÏÀ» À§ÇÑ µð·ºÅ丮 ¸¸µé±â

# mkdir -p /var/log/qmail/smtpd
# chown qmaill /var/log/qmail /var/log/qmail/smtpd

9. root ¿Í postmaster¸¦ À§ÇÑ alias ¼³Á¤

°ü¸®ÀÚ °èÁ¤À¸·Î ¼ö½ÅµÇ´Â ¸ÞÀÏÀ» ÀϹݰèÁ¤À¸·Î Æ÷¿öµùÇϵµ·Ï, alias¸¦ ¼³Á¤ÇØ ÁØ´Ù. ¿©±â¼­ silver ´Â root, postmaster µîÀ¸·Î ¿À´Â ¸ÞÀÏÀ» ¹ÞÀ» ÀÏ¹Ý °èÁ¤ÀÌ´Ù. (¿©·¯ºÐÀÌ ¿øÇÏ´Â °èÁ¤À» ¸¸µé¾î¼­ ¹Ù²Ù¾îÁÖ¸é µÈ´Ù.)

# cd ~alias
# echo silver > .qmail-mailer-daemon
# echo silver > .qmail-postmaster
# echo silver > .qmail-root

10. qmail ºÎÆ®ÆÄÀÏ ¸¸µé±â

¾Æ·¡ÀÇ ½ºÅ©¸³Æ®¸¦ ±×´ë·Î º¹»ç, ÀúÀåÇϰųª »õ·Î ¹Þ´Â´Ù. http://kltp.kldp.org/tmp/qmail.txt ÀÌ ÆÄÀÏÀ» /etc/rc.d/init.d/ ¿¡ qmail À̶ó´Â À̸§À¸·Î ÀúÀåÇÑ ÈÄ, ½ÇÇà Æ۹̼ÇÀ» ÁØ´Ù.

# cp [´Ù¿î·Îµå¹ÞÀº µð·ºÅ丮]/qmail.txt /etc/rc.d/init.d/qmail
# chmod 755 qmail
´ÙÀ½ ntsysv¸¦ ½ÇÇà½ÃÅ°¸é qmail À̶ó´Â »õ·Î¿î Ç׸ñÀÌ º¸ÀÏ °ÍÀÌ´Ù. ¸®ºÎÆÃÇÒ ¶§, qmail µ¥¸óÀÌ ½ÇÇàµÇµµ·Ï üũÇØÁØ´Ù. ´ç¿¬È÷ sendmail Àº üũµÈ °ÍÀ» Á¦°ÅÇÑ´Ù. (·¹µåÇÞ ¸®´ª½ºÀÇ °æ¿ìÀÌ´Ù.)

´ÙÀ½Àº qmail µ¥¸óÀÇ ºÎÆ® ½ºÅ©¸³Æ®ÀÌ´Ù.

#!/bin/sh
# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 80 80
# description: °Ì³ª°Ô ºü¸£¸ç, ¾ÈÁ¤ÀûÀÌ°í, À¯¿¬ÇÑ MTA

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

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

11. ¾×¼¼½º ÄÁÆ®·Ñ ÆÄÀÏ ÀÛ¼ºÇϱâ

qmail smtpd¸¦ ±¸µ¿Çϱâ Àü¿¡, ¾×¼¼½º ÄÁÆ®·ÑÀÌ ½ÇÇàµÇµµ·Ï ÇÏ¿©¾ß ÇÑ´Ù. ÀÌ °£´ÜÇÑ ÀÛ¾÷Àº /etc/tcp.smtp ÆÄÀÏÀ» ÀÌ¿ëÇÑ´Ù. /etc/tcp.smtp ¿¡ ´ÙÀ½ ÇÑ ÁÙÀ» ÀÛ¼ºÇÑ´Ù.

# vi /etc/tcp.smtp
--------------------------------
:allow
--------------------------------
·ÎÄÃÈ£½ºÆ®ÀÌ¿Ü¿¡ ¾î¶°ÇÑ ¸ÞÀÏ ¸±·¹À̵µ Çã¶ôÇÏÁö ¾Ê´Â ±âº»ÀûÀÎ configurationÀÌ´Ù.

·ÎÄÃÈ£½ºÆ®¿Í ´ç½ÅÀÇ ·ÎÄó×Æ®¿÷¿¡°Ô¸¸ ¸ÞÀÏ ¸±·¹À̸¦ Çã¶ôÇÏ´Â configurationÀº ´ÙÀ½°ú °°´Ù.

-------------------------------------
127.0.0.1:allow,RELAYCLIENT=""
192.168.1.:allow,RELAYCLIENT=""
:allow
-------------------------------------
¾×¼¼½º ÄÁÆ®·Ñ¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ¼³¸íÀ» º¸·Á¸é, ´ÙÀ½ÀÇ ÆÄÀÏÀ» ¹Þ¾Æ¼­, ¾ÐÃàÀ» Ǭ ÈÄ¿¡, tcprules¿¡ ´ëÇÑ man ÆÄÀÏÀ» ÂüÁ¶ÇÏ¸é µÈ´Ù. ftp://ftp.innominate.org/pub/pape/djb/ucspi-tcp-0.88-man.tar.gz

rule ÆÄÀÏÀ» ¸¸µé¾úÀ¸¸é tcpserver°¡ cdb(µ¥ÀÌÅͺ£À̽º)·ÎºÎÅÍ Àо È°¼ºÈ­ÇÒ ÇÊ¿ä°¡ ÀÖ´Ù. /etc/tcp.smtp ÆÄÀϷκÎÅÍ tcprules ÇÁ·Î±×·¥À» ÀÌ¿ëÇÏ¿© µ¥ÀÌÅͺ£À̽º¸¦ »ý¼ºÇÑ´Ù. ´ÙÀ½ÀÇ ¸í·ÉÀ» ¼öÇàÇÏ¸é µÈ´Ù.

# /etc/rc.d/init.d/qmail cdb
¶Ç´Â,
# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

12. sendmail Á×À̱â

¿ì¸®´Â ÀÌÁ¦ qmail·Î ¸ðµç ¸ÞÀÏÀ» ó¸®ÇÒ °ÍÀ̹ǷÎ, ±¸ÇüÀÇ sendmailÀ» Á¦°ÅÇÑ´Ù. ¿ì¼± ´ç½ÅÀÇ sendmail µ¥¸óÀ» ã¾Æ¼­ ±×°ÍÀ» Á×ÀδÙ. ¸®´ª½º¿¡¼­´Â

# ps ax | grep sendmail               <--- sendmail µ¥¸óÀÌ ÀÖ´ÂÁö¸¦ È®ÀÎÇÑ´Ù.
# killall -TERM sendmail              <--- sendmail µ¥¸óÀ» Á¦°ÅÇÑ´Ù.

# ps ax | grep sendmail               <--- ´Ù½Ã sendmail µ¥¸óÀÌ »ì¾ÆÀÖ´ÂÁö¸¦ È®ÀÎÇÑ´Ù.
À§ÀÇ ¸í·ÉÀº ÇöÀç ½ÇÇàÁßÀÎ sendmail¸¸À» Á¦°ÅÇÒ »ÓÀÌ´Ù. ÄÄÇ»ÅÍ°¡ Àç½Ãµ¿µÇ¸é, ´Ù½Ã sendmailµµ Àç½Ãµ¿µÇ¹Ç·Î, ´ÙÀ½°ú °°Àº ¸í·É¾î·Î qmail·Î ¸ðµç sendmailÀ» ´ëüÇÑ´Ù.
# mv /usr/lib/sendmail /usr/lib/sendmail.old
# mv /usr/sbin/sendmail /usr/sbin/sendmail.old
# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

13. /var/qmail/rc »ý¼ºÇϱâ

/var/qmail/rc ÆÄÀÏÀº qmail ÆÄÀÏÁß¿¡¼­ °¡Àå Áß¿äÇÑ ÆÄÀÏÁßÀÇ ÇϳªÀÌ´Ù. ÀÌ°ÍÀº qmailÀ» Ã¥ÀÓÁö°í ½ÃÀÛÇÏ°Ô ÇÑ´Ù. º¸´Ù Áß¿äÇÑ °ÍÀº qmailÀÌ Ç×»ó ¸ÞÀÏÀ» ¼ö½ÅÇÒ ¼ö ÀÖµµ·Ï ÇÑ´Ù. rc ÀÇ ³»¿ëÀº qmailÀ» À§ÇÑ ±âº»ÀûÀÎ Àü¼Û ¸í·ÉÀ¸·Î µÇ¾î ÀÖ´Ù. /var/qmail/boot µð·ºÅ丮¿¡ °¡¸é, ¿©·¯ °æ¿ì¿¡ ´ëÇÑ rc ÆÄÀÏÀÇ ¿¹Á¦°¡ ÆÄÀϺ°·Î ÁغñµÇ¾î ÀÖ´Ù. ¿ì¸®´Â procmailÀ» ÀÌ¿ëÇÏ¿©, ¸ÞÀÏÀ» ó¸®ÇÒ °ÍÀ̱⠶§¹®¿¡, ´ÙÀ½°ú °°ÀÌ ¸í·ÉÀ» ³»¸°´Ù.

# cp /var/qmail/boot/proc /var/qmail/rc
ÆÄÀÏÀÇ ³»¿ëÀº ´ÙÀ½°ú °°´Ù.
---------------------------------------------------

#!/bin/sh
# Using splogger to send the log through syslog. 
# Using dot-forward to support sendmail-style ~/.forward files. 
# Using procmail to deliver messages to /var/spool/mail/$USER by default.

exec env - PATH="/var/qmail/bin:$PATH" \
           qmail-start '|preline procmail' splogger qmail 
---------------------------------------------------
±×¸®°í³ª¼­, ¾à°£ÀÇ ¼öÁ¤À» ÇÑ´Ù. ´ÙÀ½ 14. ¿¡¼­µµ ³ª¿ÀÁö¸¸, ¿ì¸®°¡ ¸ÞÀÏ ¼ö½ÅÀ» °¢ÀÚÀÇ È¨ µð·ºÅ丮¹ØÀÇ  /Maildir/ µð·ºÅ丮·Î Çϱ⠶§¹®ÀÌ´Ù. ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÑ´Ù.
# vi /var/qmail/rc
-------------------------------------------------------------------
#!/bin/sh
# Using splogger to send the log through syslog. 
# Using dot-forward to support sendmail-style ~/.forward files. 
# Using procmail to deliver messages to /var/spool/mail/$USER by default.

exec env - PATH="/var/qmail/bin:$PATH" \
           qmail-start '|preline procmail ./Maildir/' splogger qmail 
-------------------------------------------------------------------
./Maildir/ À̰͸¸ Ãß°¡ÇÑ °ÍÀÌ´Ù.

14. °¢ »ç¿ëÀÚº°·Î ¸ÞÀÏ ¼Û¼ö½ÅÀ» À§ÇÑ µð·ºÅ丮 ¸¸µé±â.

¿ì¸®´Â  /Maildir µð·ºÅ丮¿¡ ¸ðµç ¼Û¼ö½Å ¸ÞÀÏÀ» ÀúÀåÇÒ °ÍÀÌ´Ù. »ç¿ëÀÚº°·Î µð·ºÅ丮¸¦ ¸¸µé±â À§Çؼ­´Â, ¹Ýµå½Ã ±× »ç¿ëÀÚ°¡ µÇ¾î¾ß ÇÑ´Ù. qmail À» ¼³Ä¡Çϱâ Àü¿¡ Á¸ÀçÇÏ´Â ¸ðµç »ç¿ëÀÚ¿¡°Ô ´ëÇؼ­, ±× »ç¿ëÀÚ ·Î±×ÀλóÅ¿¡¼­ ´ÙÀ½ÀÇ ¸í·ÉÀ» ³»·Á¾ß ÇÑ´Ù. root´Â ÀϹݰèÁ¤À¸·Î ¸ÞÀÏÀÌ Æ÷¿öµùµÇ¹Ç·Î, ÇØ ÁÙ ÇÊ¿ä°¡ ¾ø´Ù. ´ë½Å¿¡ root°èÁ¤ÀÇ ¸ÞÀÏÀ» ¹ÞÀ» ÀϹݰèÁ¤(¾Õ¿¡¼­ ¾Ë¸®¾Æ½º¸¦ ÇØ ÁØ °èÁ¤ "silver")¿¡´Â ¹Ýµå½Ã ÇØ ÁÖ¾î¾ß ÇÑ´Ù.

# su silver
$ /var/qmail/bin/maildirmake $HOME/Maildir
$ echo ./Maildir/ > ~/.qmail
$ exit

# su hook
$ /var/qmail/bin/maildirmake $HOME/Maildir
$ echo ./Maildir/ > ~/.qmail
$ exit
# ................
....................µîµî...
¾ÕÀ¸·Î Ãß°¡µÇ´Â »ç¿ëÀÚ¸¶´Ù ÀÏÀÏÀÌ ÀÌ·± ¸í·ÉÀ» ³»¸°´Ù¸é ¾öû³­ ½Ã°£³¶ºñÀÏ °ÍÀÌ´Ù. ±×·¯¹Ç·Î, »ç¿ëÀÚ°¡ Ãß°¡µÉ ¶§¸¶´Ù ÀÚµ¿À¸·Î ÀÌ·± °úÁ¤ÀÌ µÇµµ·Ï ´ÙÀ½°ú °°ÀÌ ÇÑ´Ù.
# cd /etc/skel
# /var/qmail/bin/maildirmake Maildir
# echo ./Maildir/ > .qmail
ÀÌÁ¦ºÎÅÍ´Â Ãß°¡µÇ´Â ¸ðµç »ç¿ëÀÚ¿¡°Ô ÀÚµ¿À¸·Î Maildir µð·ºÅ丮¿Í .qmail ÆÄÀÏÀÌ »ý±â°Ô µÉ °ÍÀÌ´Ù.

15. ¸®ºÎÆÃÇÏ°í, qmailÀÇ Á¤»óÀûÀÎ µ¿ÀÛÀ» È®ÀÎÇϱâ

½Ã½ºÅÛÀ» ¸®ºÎÆýÃŲ´Ù.

15.1 ¸®ºÎÆÃµÇ°í³ª¼­, /var/log/maillog ÆÄÀϳ»¿ëÀ» »ìÆ캸¸é, ³¡ºÎºÐ¿¡¼­ ´ÙÀ½°ú °°Àº ¶óÀÎÀÌ º¸¿©¾ß ÇÑ´Ù.

           
qmail: status: local 0/10 remote 0/20
±×·¸Áö ¾Ê´Ù¸é, qmail ¼³Á¤¿¡ ¹®Á¦°¡ ÀÖ´Â °ÍÀ̹ǷÎ, ¾ÕÀÇ °úÁ¤µéÀ» ´Ù½Ã Çѹø ²Ä²ÄÈ÷ »ìÆ캸°í, ¼³Á¤ÆÄÀϵéÀ» ÀÚ¼¼È÷ °ËÅäÇؾ߸¸ ÇÑ´Ù.

15.2 ps ax ¸í·ÉÀ» ³»¸®°í³ª¼­, ´ÙÀ½°ú °°Àº ¶óÀεéÀÌ º¸ÀÌ´Â Áö¸¦ È®ÀÎÇÏ´Ù.

#ps ax
 562 ? S 0:00 svscan
 563 ? S 0:00 supervise qmail-send
 564 ? S 0:00 supervise log
 565 ? S 0:00 supervise qmail-smtpd
 566 ? S 0:00 supervise log
 567 ? S 0:00 qmail-send
 568 ? S 0:00 /usr/local/bin/multilog t /var/log/qmail
 569 ? S 0:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
 570 ? S 0:00 /usr/local/bin/tcpserver -v -p -x/etc/tcp.smtp.cdb
  -u 501 -g 501 0 25 /var/qmail/bin/qmail-smtpd
 576 ? S 0:00 splogger qmail
 577 ? S 0:00 qmail-lspawn |preline procmail
 578 ? S 0:00 qmail-rspawn
 579 ? S 0:00 qmail-clean
¸ð¾çÀ̳ª ¼ýÀÚµéÀÌ ¾à°£¾¿ Ʋ¸®´õ¶óµµ, ¹Ýµå½Ã 13°³ÀÇ ÇÁ·Î¼¼¼­°¡ µ¿ÀÛÇÏ°í ÀÖ¾î¾ß ÇÑ´Ù. À§¿Í µ¿ÀÏÇÑ ÇÁ·Î¼¼¼­°¡ ¾ø´Ù¸é, qmail ¼³Á¤¿¡ ¹®Á¦°¡ ÀÖ´Â °ÍÀÌ´Ù.
  • À§ÀÇ 1) 2)¿Í °°Àº ¸Þ½ÃÁö¿Í ÇÁ·Î¼¼¼­µéÀÌ º¸ÀÌÁö ¾Ê´Â´Ù¸é, ¹®¼­ ¾ÕÀÇ °úÁ¤ 7.ºÎÅÍ 14.¿¡¼­ ¸¸µç ¼³Á¤ÆÄÀϵéÀ» À߸ø ¸¸µé °ÍÀÌ´Ù. ´ëÇ¥ÀûÀ¸·Î ÀÚÁÖ ÇÏ´Â ½Ç¼ö´Â /var/qmail/supervise/qmail-send/log/run ÆÄÀÏ°ú /var/qmail/supervise/qmail-smtpd/log/run ÆÄÀÏÀ» ¸¸µé ¶§, qmaillÀ» qmail ·Î À߸ø ¾²´Â °ÍÀÌ´Ù. ÀÌ ¹®¼­¿¡ ¾²¿©Áø ¼³Á¤ÆÄÀÏÀÇ ³»¿ëÀº Àý´ë·Î ¿ÀŸ³ª Å»ÀÚ°¡ ¾øÀ¸¹Ç·Î, Àß º¸°í Ʋ¸° °÷À» ã¾Æ³»±â ¹Ù¶õ´Ù.

16. ¸ÞÀÏ ¼Û½Å Å×½ºÆ®Çϱâ (¿©±â¼­ºÎÅÍ´Â ½Ã½ºÅÛ root °¡ ¾Æ´Ï¾îµµ µÈ´Ù.)

16.1 host ³»ºÎ¿¡¼­ »ç¿ëÀÚ°£ÀÇ ¸ÞÀÏ ¼Û¼ö½ÅÀ» È®ÀÎÇØ º»´Ù.

silver´Â È£½ºÆ®¾È¿¡ °èÁ¤ÀÌ ÀÖ´Â »ç¿ëÀÚÀ̾î¾ß ÇÑ´Ù.

      % echo to: silver | /var/qmail/bin/qmail-inject
±×·¯¸é, ³»¿ëÀº ¾ø°í ¸ÞÀÏÇì´õ¸¸ ÀÖ´Â ¸ÞÀÏÀÌ ¹Ù·Î silver¿¡°Ô ¼Û½ÅµÇ¾î ÀÖ¾î¾ß ÇÏ°í, »õ·ÎÀÌ µµÂøµÇ´Â ¸ÞÀÏÀº  silver/Maildir/new/ ¹Ø¿¡ ¼ö½Å¸ÞÀϸ¶´Ù °³°³ÀÇ ÆÄÀÏ·Î ÀúÀåµÈ´Ù. /var/log/maillog ÆÄÀϾÈÀÇ ³¡ºÎºÐ¿¡´Â ´ÙÀ½°ú °°Àº ÁÙµéÀÌ º¸¿©¾ß ÇÑ´Ù.
           qmail: new msg 53 
           qmail: info msg 53: bytes 246 from <me@domain> qp 20345 uid 666
           qmail: starting delivery 1: msg 53 to local me@domain 
           qmail: status: local 1/10 remote 0/20
           qmail: delivery 1: success: did_1+0+0/
           qmail: status: local 0/10 remote 0/20
           qmail: end msg 53 
   ( 53Àº inode ¼ýÀÚÀÌ°í, 20345 ´Â ÇÁ·Î¼¼¼­ IDÀÌ´Ù. ¿©·¯ºÐÇÑÅ×´Â ÀÌ ¹øÈ£µéÀÌ ´Ù¸¦ °ÍÀÌ´Ù.

16.2 ¸ÞÀÏÀü¼Û ¿¡·¯¸¦ È®ÀÎÇØ º»´Ù.

noneÀº È£½ºÆ®ÀÇ ¸ÞÀÏ»ç¿ëÀÚ°èÁ¤ÀÌ ¾Æ´Ï¾î¾ß ÇÑ´Ù.

      % echo to: none | /var/qmail/bin/qmail-inject
/var/log/maillog ÆÄÀϾÈÀÇ ³¡ºÎºÐ
       
           qmail: new msg 53 
           qmail: info msg 53: bytes 246 from <me@domain> qp 20351 uid 666
           qmail: starting delivery 2: msg 53 to local nonexistent@domain
           qmail: status: local 1/10 remote 0/20
           qmail: delivery 2: failure: No_such_address.__#5.1.1_/
           qmail: status: local 0/10 remote 0/20
           qmail: bounce msg 53 qp 20357
           qmail: end msg 53 
           qmail: new msg 54 
           qmail: info msg 54: bytes 743 from <> qp 20357 uid 666
           qmail: starting delivery 3: msg 54 to local me@domain
           qmail: status: local 1/10 remote 0/20
           qmail: delivery 3: success: did_1+0+0/
           qmail: status: local 0/10 remote 0/20
           qmail: end msg 54 
¾Æ¸¶ ¿©·¯ºÐÀº Àü¼ÛµÇÁö ¸øÇÏ°í, µÇµ¹¾Æ¿Â ¸ÞÀÏÀ» º¸°Ô µÉ °ÍÀÌ´Ù.

16.3 È£½ºÆ® ¿ÜºÎ·ÎÀÇ ¸ÞÀÏ ¼Û½Å È®ÀÎ

me@wherever ´Â hook@hanmail.net °ú °¥Àº ¾î¶² À¯È¿ÇÑ ¸ÞÀÏ ÁÖ¼ÒÀ̾î¾ß ÇÑ´Ù.

      % echo to: me@wherever | /var/qmail/bin/qmail-inject
/var/log/maillog ÆÄÀϾÈÀÇ ³¡ºÎºÐ
           qmail: new msg 53 
           qmail: info msg 53: bytes 246 from <me@domain> qp 20372 uid 666
           qmail: starting delivery 4: msg 53 to remote me@wherever
           qmail: status: local 0/10 remote 1/20
           qmail: delivery 4: success: 1.2.3.4_accepted_message./...
           qmail: status: local 0/10 remote 0/20
           qmail: end msg 53 
¶óÀÎ``starting delivery''¿Í ``success'' »çÀÌ¿¡´Â ¾ó¸¶°£ÀÇ ½Ã°£Àû Áö¿¬ÀÌ ÀÖÀ» ¼ö ÀÖ´Ù. me@wherever ¶ó´Â ¸ÞÀÏ °èÁ¤À¸·Î ¿Â ¸ÞÀÏÀ» È®ÀÎÇØ º¸¾Æ¶ó.

16.4 È£½ºÆ®ÀÇ root ¶Ç´Â postmaster ¿¡°Ô ¸ÞÀÏÀ» Àü¼ÛÇϱâ.

¿ì¸®´Â ¾Õ¿¡¼­ root, postmaster, mailer-daemonÀÇ alias ¸¦ ¼³Á¤ÇÏ¿´´Ù. ±× alias°¡ Á¤»óÀûÀ¸·Î µ¿ÀÛÇÏ´ÂÁö¸¦ È®ÀÎÇÑ´Ù.

      % echo to: POSTmaster | /var/qmail/bin/qmail-inject
POSTmasterÀÇ alias ¸¦ ¼³Á¤ÇÑ °èÁ¤ (¾Õ¿¡¼­´Â silver)À¸·Î ¿Â ¸ÞÀÏÀ» È®ÀÎÇÑ´Ù.

17. ¸ÞÀÏ ¼ö½Å Å×½ºÆ®Çϱâ

(Á¦ÀÏ Áß¿äÇÑ ºÎºÐÀÌ´Ù. ¸ÞÀÏÀÌ ¼Û½ÅÀº ÀߵǾ, ¼ö½ÅÀÌ ¾ÈµÇ´Â °æ¿ì°¡ Çã´ÙÇÏ´Ù.)

17.1 SMTP ¼­¹ö°¡ Á¤»óÀûÀ¸·Î µ¿ÀÛÇÏ´ÂÁö¸¦ °Ë»çÇÑ´Ù.

dude ´Â È£½ºÆ®ÀÇ À¯È¿ÇÑ °èÁ¤À̾î¾ß ÇÑ´Ù. me@domain Àº hook@hanmail.net °ú °°Àº À¯È¿ÇÑ ¸ÞÀÏÁÖ¼ÒÀ̾î¾ß ÇÑ´Ù.

       $ telnet 127.0.0.1 25
       Trying 127.0.0.1...
       Connected to 127.0.0.1.
       Escape character is '^]'.
       220 domain ESMTP
       helo dude
       250 domain
       mail <me@domain>
       250 ok
       rcpt <me@domain>
       250 ok
       data
       354 go ahead
       Subject: testing
       
       This is a test.
       .
       250 ok 812345679 qp 12345
       quit
       221 domain
       Connection closed by foreign host.
       $
¸ÞÀÏÀÌ Á¤»óÀûÀ¸·Î µµÂøÇß´ÂÁö¸¦ È®ÀÎÇÏ´Ù.

ÃàÇÏÇÕ´Ï´Ù. ¿©·¯ºÐÀÌ ¿©±â±îÁö ¼º°øÀûÀ¸·Î µµ´ÞÇÏ¿´´Ù¸é, qmail ¼³Ä¡´Â ÀÌ¹Ì ³¡³­ °ÍÀ̳ª ´Ù¸§¾ø´Ù. ÀÌ ´ÙÀ½ÀÇ ³»¿ëÀº ¸ÞÀϼ­¹ö¸¦ ¾ÆÁÖ Àß µ¿ÀÛÇϵµ·Ï ÇÏ´Â ºÎ¼öÀûÀÎ °ÍÀÌ´Ù. ±×·¡µµ ²À Àо¾Æ¾ß ÇÑ´Ù.

18. ¸ÞÀÏÀ» ´Ù¸¥ È£½ºÆ®ÀÇ ¸ÞÀÏ°èÁ¤À¸·Î Æ÷¿öµùÇϱâ

±Ù·¡´Â ´ëºÎºÐÀÇ »ç¿ëÀÚ°¡ ¿©·¯ °³ÀÇ ¸ÞÀÏ°èÁ¤À» °¡Áö´Â °æ¿ì°¡ ¸¹´Ù. ±»ÀÌ ¼­¹öÀÇ ¿ë·®À» ³¶ºñÇÏ°í, ¼­¹öÀÇ ¼º´É¿¡ ºÎÇϸ¦ Áָ鼭±îÁö ¸ÞÀÏÀ» Á÷Á¢ ¼­¹ö¿¡ ³²°ÜµÑ ÇÊ¿ä°¡ ¾ø´Â °æ¿ì°¡ ¸¹´Ù. ±×·¸±â ¶§¹®¿¡, µµÂøÇÏ´Â ¸ÞÀÏÀ» ¹Ù·Î ´Ù¸¥ È£½ºÆ®ÀÇ ¸ÞÀÏ°èÁ¤À¸·Î Æ÷¿öµù½ÃÅ°´Â ¹æ¹ýÀ» ¾´´Ù. qmail¿¡¼­´Â °¢ »ç¿ëÀÚ°¡ ¾ÆÁÖ °£´ÜÇÏ°Ô ¸ÞÀÏ Æ÷¿öµùÀ» ÇÒ ¼ö Àִµ¥, ÀÚ½ÅÀÇ °èÁ¤ µð·ºÅ丮ÀÇ .qmail ÆÄÀÏ¿¡ Æ÷¿öµùµÇ¾îÁú ¸ÞÀÏ°èÁ¤À» ½áÁÖ¸é µÈ´Ù.

$ cd
$ vi .qmail
---------------------------------------------
@hanmail.net
---------------------------------------------
¸ÞÀÏÁÖ¼Ò¾Õ¿¡ &±âÈ£´Â ³Ö¾îµµ µÇ°í, ½ÈÀ¸¸é ³ÖÁö ¾Ê¾Æµµ ¹«°üÇÏ´Ù.

³Ê¹« ´Ü¼øÇÏÁö ¾ÊÀº°¡?? ¸ðµç °èÁ¤À» ÀÌ·¸°Ô Æ÷¿öµùµÇ°Ô ¼³Á¤Çϸé, È£½ºÆ®ÀÚü¿¡ ÀüÇô ºÎÇϸ¦ ÁÖÁö ¾Ê°í, ÁÁÀº µµ¸ÞÀÎÀ» °¡Áø ÈǸ¢ÇÑ ¸ÞÀÏ ¼­¹ö°¡ µÇ´Â °ÍÀÌ´Ù.

19. pop3 ¼³Ä¡Çϱâ

ÀÌÁ¦ pop3¸¦ À§ÇÑ ¼³Á¤À» Çغ¸ÀÚ. ¸ÞÀÏ ¼­¹ö¿¡ ÀÖ´Â ¸ÞÀÏÀ» ÀÚ½ÅÀÇ ÄÄÇ»ÅÍ ¸ÞÀÏ Å¬¶óÀ̾ðÆ®·Î °¡Á®¿À±â À§Çؼ­´Â ¹Ýµå½Ã ¸ÞÀϼ­¹ö°¡ pop3¸¦ Áö¿øÇØ¾ß ÇÑ´Ù. À̸¦ À§ÇÑ ¼³Ä¡¿Í ¼³Á¤Àº ´ÙÀ½°ú °°´Ù.

¸ÕÀú checkpassword¸¦ ¼³Ä¡ÇÑ´Ù. ÀÌ°ÍÀº »ç¿ëÀÚ¸í°ú ¾ÏÈ£¸¦ ÀÎÁõÇϴµ¥ »ç¿ëµÈ´Ù. ´Ù¸¥ ¼Ò½ºµµ /root/temp µð·ºÅ丮¿¡ Ç®¾úÀ¸´Ï À̰͵µ °Å±â¿¡´Ù Ç®¾îº¸ÀÚ.

#cd /root/temp
#tar -zxvf checkpassword-0.81.tar.gz
checkpassword¸¦ ÄÄÆÄÀÏÇÏ°í ¼³Ä¡ÇÑ´Ù.
#cd checkpassword-0.81
#make 
#make setup check
ÀÌÁ¦ checkpassword°¡ Á¦´ë·Î ¼³Ä¡µÇ¾ú´ÂÁö È®ÀÎÇغ¸ÀÚ.
# /var/qmail/bin/qmail-popup chsd.chonnam.ac.kr /bin/checkpassword pwd
+ok <1311.955932232@hsd.chonnam.ac.kr>
user dakeshi
+ok
pass foryou
-ERR authorization failed
Á¦´ë·Î password¸¦ ÀÔ·ÂÇÏÁö ¾Ê´Â´Ù¸é, À§¿Í °°Àº °á°ú°¡ ³ªÅ¸³­´Ù.

Á¦´ë·Î µÈ password¸¦ ÀÔ·ÂÇϸé,

# /var/qmail/bin/qmail-popup hsd.chonnam.ac.kr /bin/checkpassword pwd
+ok <1311.955932232@hsd.chonnam.ac.kr>
user dakeshi
+ok
pass forme
/home/dakeshi
¶ó°í ³ª¿Ã °ÍÀÌ´Ù.

ÀÌÁ¦´Â È£½ºÆ®°¡ ºÎÆÃµÉ ¶§¸¶´Ù ÀÚµ¿ÀûÀ¸·Î pop3°¡ µ¿ÀÛÇϵµ·Ï /etc/rc.d/rc.local ÆÄÀÏÀÇ ¸¶Áö¸·¿¡ ´ÙÀ½ÀÇ ³»¿ëÀ» Ãß°¡ÇÑ´Ù.

#start qmail POP3 server
/usr/local/bin/tcpserver 0 110 /var/qmail/bin/qmail-popup FQDN \
/bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir &

( FQDN¿¡´Â È£½ºÆ®³×ÀÓ°ú µµ¸ÞÀÎ ³×ÀÓÀ» ½áÁØ´Ù. ¿©±â¼­´Â chsd.chonnam.ac.kr )
ÀÌÁ¦ È£½ºÆ®¸¦ ¸®ºÎÆýÃÄѼ­ pop3°¡ Á¦´ë·Î µ¿ÀÛÇÏ´ÂÁö È®ÀÎÇغ¸ÀÚ.
  • È£½ºÆ®¿¡ °èÁ¤ÀÌ ÀÖ´Â »ç¿ëÀÚ¿¡°Ô ¸ÞÀÏÀ» º¸³½´Ù.
  • È£½ºÆ®¿¡ ±× °èÁ¤À¸·Î Á¢¼ÓÇÏ¿© ¸ÞÀÏÀÌ µé¾î¿Ô´ÂÁö È®ÀÎÇÑ´Ù.
  • ÀÚ½ÅÀÌ »ç¿ëÇÏ°í ÀÖ´Â ¸ÞÀϼ­ºñ½º¿¡ pop¼³Á¤À» ÇØÁØ ´ÙÀ½ ¸ÞÀÏÀ» °¡Á®¿Â´Ù.
  • ¸ÞÀÏÀÌ Á¤»óÀûÀ¸·Î ÀÐÇôÁö´ÂÁö¸¦ È®ÀÎÇÑ´Ù.

ÀÌ·¸°Ô ÇÔÀ¸·Î½á, ¿Ïº®ÇÑ qmail ¼­¹ö°¡ ±¸ÃàµÇ¾úÀ» °ÍÀÌ´Ù. kldp¿¡ qmail °ü·Ã¹®¼­¸¦ ½á ÁÖ¾ú´ø ¼±¹è ¸®´ª¼­µé¿¡°Ô °¨»çÇϸç, ¸ÞÀÏ Å×½ºÆ®¸¦ À§Çؼ­ À§ÇèÇÒÁöµµ ¸ð¸£´Â ¸ÞÀϼ­¹ö¸¦ »ç¿ëÇØÁØ ±¤ÁÖ,Àü³² ÇØÄ¿Áî·¦ µ¿È£È¸ ȸ¿øµé¿¡°Ôµµ ¿ª½Ã °¨»çÀÇ ¸»À» ÀüÇÑ´Ù. ÀÌ ¹®¼­´Â ¾ÕÀ¸·Îµµ °è¼Ó ¾÷µ¥ÀÌÆ®µÉ °ÍÀÌ´Ù. ÀÌ ¹®¼­¿¡ ´ëÇÑ ¾î¶°ÇÑ Á¶¾ðÀ̳ª Ãæ°íµµ °¨»çÈ÷ ¹Þ¾ÆµéÀÌ°Ú´Ù. ±Ã±ÝÇÑ Á¡ÀÌ ÀÖÀ¸¸é ¾Õ¿¡¼­ ³ª¿Ô´ø ÇÊÀÚÀÇ À̸ÞÀÏÁÖ¼Ò·Î º¸³»ÁÖ¸é °¨»çÇÏ°Ú´Ù.

ÀÌ ¹®¼­¸¦ ¸¸µé¸é¼­, Âü°í·Î Çß´ø ¹®¼­µéÀº ´ÙÀ½°ú °°´Ù.

http://kldp.org ÀÇ / ³×Æ®¿öÅ· / ÀüÀÚ¿ìÆí(E-Mail) / ¸ÞÀÏ ¼­¹ö / Qmail ºÐ·ù¿¡ ÀÖ´Â

        Qmail+vpopmail   ÀÓ ÀºÀç      
        Qmail HOWTO   ¹æ âÇö      
        Life with Qmail   À± ÁÖ¿µ      
                                ÀÌ»ó 3°³ÀÇ ¹®¼­µé.
http://cr.yp.to/checkpwd/install.html ¿¡ ÀÖ´Â How to install checkpasswork ¹®¼­

http://www.netia.or.kr ¿¡ Àִ ȣ³²´ë ¸®´ª½º µ¿È£È¸ À¯¼º±Õ´ÔÀÌ ¾´ Qmail + POP3 ¹®¼­

qmail-1.03.tar.gz ÀÇ ¾È¿¡ Æ÷ÇԵǾî ÀÖ´Â INSTLL, REMOVE, TEST °ü·Ã ¹®¼­µé

------------------------------------------------------------------------------------

"QMAIL ·Î ¸ÞÀϼ­¹ö ±¸ÃàÇϱâ" Á¦ 2źÀ» ÁغñÇϸ鼭.................... Àü³²´ëÇб³ ÀüÀÚ°è»ê¼Ò¿¡¼­ 2001³â 2¿ù 5ÀÏ¿¡.................................... Á¤°è¿Á, ¹®»óÁØ............

HSD ¸¸¼¼!! ±¤ÁÖ,Àü³² ÇØÄ¿Áî·¦ µ¿È£È¸ ¸¸¼¼!! ¸®´ª½º ¸¸¼¼!!


ID
Password
Join
Recent investments will yield a slight profit.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2003-10-31 20:04:34
Processing time 0.0031 sec