Nmail PHP Guide

- Linux/Unix -

Version 3.2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

http://passkorea.net


 

- ¸ñ  Â÷ -

 

I.  ¼³Ä¡ Áغñ. - 3 -

1.  ¼³Ä¡½Ã ÇÊ¿äÇÑ ÇÁ·Î±×·¥ ¹öÀü. - 3 -

2.  ¸®´ª½º ¹èÆ÷ÆÇ ¼±ÅÃ. - 3 -

3.  ¸Þ´º¾ó³»ÀÇ ¿¹Á¦ ½ÇÇà ¾È³». - 3 -

4.  Apache + PHP + MySQL RPM ¼³Ä¡. - 4 -

5.  ÆíÁöÇÔ ¹é¾÷/º¹±¸ ¹× °ü¸®¿¡ ÇÊ¿äÇÑ À¯Æ¿ ¼³Ä¡. - 5 -

6.  ÀÚü ³×ÀÓ¼­¹ö(DNS) ¿î¿µ. - 5 -

7.  ¼­¹ö¿¡¼­ »ç¿ëÁßÀÎ ³×ÀÓ¼­¹ö È®ÀÎ. - 6 -

8.  Ç¥ÁØ ½Ã°£ µ¿±âÈ­. - 6 -

II.       ¼³Ä¡. - 7 -

1.  PHP °æ·Î È®ÀÎ. - 7 -

2.  PHP È®Àå¸ðµâ È®ÀÎ. - 8 -

3.  MySQL ¼³Á¤ º¯°æ. - 9 -

4.  ±âÁ¸ ¸ÞÀϼ­ºñ½º(SMTP/POP3) ÁßÁö. - 10 -

5.  ÀϺΠ¸®´ª½º ¹èÆ÷ÆÇÀÇ SELinux ÁßÁö. - 11 -

6.  ¼³Ä¡ ÇÁ·Î±×·¥ ½ÇÇà (UTF-8 Á¦Ç°) - 11 -

7.  ¼³Ä¡°¡ ¿Ï·áµÇ¸é, ¼³Ä¡ ÇÁ·Î±×·¥ º¸°ü. - 12 -

8.  Apache °¡»óÈ£½ºÆ® ¼³Á¤. - 12 -

9.  Apache ¾Ù¸®¾î½º ¼³Á¤. - 14 -

10. ¹æÈ­º® ¼³Á¤ È®ÀÎ. - 16 -

11. À¥¸ÞÀÏ Á¢¼Ó. - 16 -

12. ¸ÖƼ µµ¸ÞÀÎ, ȸ¿ø Ãß°¡. - 16 -

13. TLS Åë½ÅÀ» À§ÇØ SSL ÀÎÁõ¼­ ¹ß±Þ ¹× Àû¿ë ¹æ¹ý. - 17 -

III.     ¼³Ä¡½Ã ¹®Á¦ ÇØ°á. - 18 -

1.  PHP mailparse ¸ðµâÀÌ ÀÚµ¿À¸·Î ¼³Ä¡µÇÁö ¾Ê´Â °æ¿ì. (ÄÄÆÄÀÏ ¼³Ä¡) - 18 -

2.  ¸ÞÀÏ¿£Áø ¼Ò½º ÄÄÆÄÀÏÀÌ ÇÊ¿äÇÑ °æ¿ì. - 20 -

3.  À¥¸ÞÀÏ¿¡¼­ ¹ÞÀº ¸ÞÀÏÀÌ º¸ÀÌÁö ¾Ê´Â °æ¿ì. - 21 -

IV.       ¸ÞÀϼ­¹ö °ü¸® ¾È³». - 23 -

V.  POP3(¾Æ¿ô·è µî) ÀÌ¿ë¾È³». - 24 -

VI.       ¸®ÅϸÞÀÏ ºÐ¼® ¾È³». - 25 -

 


 

 

 

I.     ¼³Ä¡ Áغñ

 

 

 

1.    ¼³Ä¡½Ã ÇÊ¿äÇÑ ÇÁ·Î±×·¥ ¹öÀü

¿£¸ÞÀÏÀº APM(Apache + PHP + MySQL) µ¥¸óÀ» ±â¹ÝÀ¸·Î Linux/Unix ȯ°æ¿¡¼­ »ç¿ëÇϵµ·Ï Á¦À۵Ǿú½À´Ï´Ù¿£¸ÞÀÏ µ¿ÀÛ¿¡ ÇÊ¿äÇÑ ÃÖ¼Ò»ç¾çÀº ´ÙÀ½°ú °°½À´Ï´Ù.

 

[OS] Linux, FreeBSD, Solaris (64bit OS¸¸ Áö¿ø)

[Web Server] Apache 2.0 / 2.2 / 2.4 Áö¿ø

[Language] PHP 5.3 ~ 5.6 / PHP 7.0 Áö¿ø

     (mbstring, iconv ¸ðµâ ÇÊ¿ä)

[DBMS] MariaDB 5.5, 10.x ¼³Ä¡±ÇÀå / MySQL 4, MySQL 5.6 Áö¿ø.

 

 

2.    ¸®´ª½º ¹èÆ÷ÆÇ ¼±ÅÃ

¸®´ª½ºÀÇ °æ¿ì ±¹³»¿¡¼­ °¡Àå ¸¹ÀÌ »ç¿ëµÇ´Â ·¹µåÇÞ °è¿­ÀÇ ¸®´ª½º Áß ¾÷µ¥ÀÌÆ®°¡ Áö¼ÓÀûÀ¸·Î ÀÌ·ç¾îÁö´Â ¹èÆ÷ÆÇÀ» ±ÇÀåÇص帮°í ÀÖ½À´Ï´Ù. °ø½Ä ¾÷µ¥ÀÌÆ®°¡ Áß´ÜµÈ Á¦Ç°µéÀº º¸¾È»ó ¹®Á¦°¡ »ý±æ °¡´É¼ºÀÌ ³ôÀ¸¹Ç·Î »ç¿ëÇÏÁö ¾Ê´Â °ÍÀÌ ÁÁ½À´Ï´Ù.

 

- CentOS : http://www.centos.org/

=> ÃֽŠ¹öÀüÀÎ CentOS 6.x, 7.x 64bit ¿¡¼­ ¼³Ä¡ °¡´ÉÇÕ´Ï´Ù.

=> ·¹µåÇÞ ¿£ÅÍÇÁ¶óÀÌÁî ¹öÀüÀ» ±â¹ÝÀ¸·Î ¸¸µé¾îÁø ¹èÆ÷ÆÇÀÔ´Ï´Ù. (±ÇÀå)

 

 

3.    ¸Þ´º¾ó³»ÀÇ ¿¹Á¦ ½ÇÇà ¾È³»

¾Æ·¡Ã³·³ »ç°¢¹Ú½º¾È¿¡ µé¾î°¡´Â ³»¿ëÀº ¼­¹ö¿¡ SSL/Telnet À¸·Î Á¢¼ÓÇÑÈÄ Å͹̳ÎÈ­¸é¿¡¼­ ÀÔ·ÂÇØ¾ßµÉ ½© ¸í·É¾îÀÔ´Ï´ÙÀ̶§ ˜Þ(#)À¸·Î ½ÃÀ۵Ǵ ¶óÀÎÀº ÁÖ¼®Ç¥½Ã·Î ¾È³»¹®±¸À̹ǷΠÀÔ·ÂÇÒ ÇÊ¿ä°¡ ¾øÀ¸¸ç ÀÔ·ÂÇÏ´õ¶óµµ ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù.

# PHP ½ÇÇàÆÄÀÏÀÌ Á¸ÀçÇÏ´ÂÁö È®ÀÎÇÕ´Ï´Ù.

    => ÁÖ¼®Ç¥½Ã·Î ´ÙÀ½¿¡ ³ª¿Ã ¸í·É¿¡ ´ëÇÑ ¾È³»ÀÔ´Ï´Ù.

ls /usr/bin/php

    => Å͹̳ÎÈ­¸é¿¡ º¹»çÈÄ ºÙ¿©³Ö±â³ª Á÷Á¢ ÀÔ·ÂÇؾßÇÏ´Â ½© ¸í·ÉÀÔ´Ï´Ù.

#result# /usr/bin/php

=> ½©¸í·É ½ÇÇàÈÄ È­¸é»ó¿¡ Ãâ·ÂµÇ´Â °á°ú¹°ÀÔ´Ï´Ù.

 

 

4.    Apache + PHP + MySQL RPM ¼³Ä¡

CentOS, Fedora Core µîÀÇ ·¹µåÇÞ °è¿­ÀÇ ÃֽŠ¹èÆ÷ÆÇÀ» »ç¿ëÇÒ °æ¿ì ¡°yum¡±ÇÁ·Î±×·¥À» ÅëÇØ ¾Æ·¡ RPM ÆÐÅ°Áöµé¸¸ ¼³Ä¡Çصνøé ÀúÈñ ¿£¸ÞÀϸ¸ÀÌ ¾Æ´Ï¶ó ÇâÈÄ ´Ù¸¥ À¥ÇÁ·Î±×·¥À» »ç¿ëÇÒ ¶§µµ º°´Ù¸¥ ¹®Á¦°¡ ¾øÀ¸½Ç °Ì´Ï´ÙÁÖÀÇ) ¼­¹ö³»¿¡ APMÀÌ ÀÌ¹Ì ¼Ò½º ÄÄÆÄÀÏ·Î ¼³Ä¡µÇ¾î ÀÖ´Ù¸é,  RPMÀ¸·Î Áߺ¹ ¼³Ä¡ÇÏ½Ã¸é ¾ÈµË´Ï´Ù.

¿¹Á¦) CentOS, Fedora Core

# Apache + PHP + MySQL ¼³Ä¡

yum -y install httpd mysql-server mysql php php-devel php-gd php-mbstring php-mysqlnd php-pear

 

# Apache, MySQL µ¥¸ó ½ÃÀÛ

# CentOS 6 ÀÏ °æ¿ì.

/etc/init.d/httpd start

/etc/init.d/mysqld start

# CentOS 7 ÀÏ °æ¿ì.

/usr/bin/systemctl start httpd.service

/usr/bin/systemctl start mariadb.service

 

# Apache, MySQL µ¥¸ó ºÎÆýà ÀÚµ¿ ½ÇÇà

# CentOS 6 ÀÏ °æ¿ì.

/sbin/chkconfig httpd on

/sbin/chkconfig mysqld on

# CentOS 7 ÀÏ °æ¿ì.

/usr/bin/systemctl enable httpd.service

/usr/bin/systemctl enable mariadb.service

 

# mysql root ºñ¹Ð¹øÈ£ ÁöÁ¤

mysqladmin password ºñ¹Ð¹øÈ£ÁöÁ¤

 

# php.ini ÆÄÀÏ °æ·Î È®ÀÎ

php -i|grep ini

 

# php.ini ¿¡¼­ short_open_tag °ªÀ» On À¸·Î º¯°æ.

vi /etc/php.ini

short_open_tag = Off

=>

short_open_tag = On

 

# PHP È®ÀåÀÚ¿¡ .htm, .html Ãß°¡

vi /etc/httpd/conf.d/php.conf

AddHandler php5-script .php

=>

AddHandler php5-script .php .htm .html

 

 

5.    ÆíÁöÇÔ ¹é¾÷/º¹±¸ ¹× °ü¸®¿¡ ÇÊ¿äÇÑ À¯Æ¿ ¼³Ä¡

¿¹Á¦) CentOS, Fedora Core

# ÆíÁöÇÔ ¹é¾÷/º¹±¸, DNS Å×½ºÆ®, SMTP ÀÀ´ä Å×½ºÆ®¿¡ »ç¿ëµÇ´Â À¯Æ¿ ¼³Ä¡

yum -y install zip unzip rdate bind-utils telnet

 

 

6.    ÀÚü ³×ÀÓ¼­¹ö(DNS) ¿î¿µ

ÀÚü ³×ÀÓ¼­¹ö(127.0.0.1)ÀÇ °æ¿ì ¡®¼³Ä¡¡¯¸¸ Çصξ ij½Ì³×ÀÓ¼­¹ö·Î »ç¿ëÇÒ ¼ö ÀÖ¾î ¸ÞÀÏ ¼Û¼ö½Å ¼ÓµµÇâ»ó¿¡ µµ¿òÀÌ µË´Ï´Ù.  ¼­¹ö³»ºÎ¿¡ ³×ÀÓ¼­¹ö°¡ ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê°í ¿ÜºÎÀÇ ³×ÀÓ¼­¹ö°¡ ÁöÁ¤µÇ¾î ÀÖÀ» °æ¿ì DNS ÁúÀǸ¦ ¿ÜºÎ¼­¹ö·Î ´øÁö°Ô µÇ¾î ±×¸¸Å­ ¼Óµµ°¡ ´À·ÁÁö°Ô µË´Ï´ÙƯÈ÷ µ¥ÀÌÄÞ(164.124.101.2), ÄÚ³Ý(168.126.63.1)ó·³ ¸¹Àº »ç¿ëÀÚ°¡ ¸ô¸®´Â ¿ÜºÎ¼­¹ö·Î ÁöÁ¤ÇÒ °æ¿ì ÇØ´ç ³×ÀÓ¼­¹öÀÇ ¼ÓµµÀúÇÏ/Àå¾Ö¿¡ µû¸¥ ¿µÇâÀ» ±×´ë·Î ¹Þ°Ô µË´Ï´Ùµû¶ó¼­ ¾Æ·¡Ã³·³ ³×ÀÓ¼­¹ö ÇÁ·Î±×·¥(bind)À» ¼³Ä¡Çؼ­ ù¹ø° ³×ÀÓ¼­¹ö·Î ÁöÁ¤ÇÏ´Â °ÍÀ» ±ÇÀåÇÕ´Ï´Ù.

¿¹Á¦) CentOS, Fedora Core

# bind ¼³Ä¡¿©ºÎ, ½ÇÇà¿©ºÎ¸¦ È®ÀÎÇÔ.

rpm -qa|grep bind

#result# bind-9.3.2-2

 

# DNS ¼­ºñ½º Àç½ÃÀÛ

# CentOS 6 ÀÏ °æ¿ì.

/etc/init.d/named restart

# CentOS 7 ÀÏ °æ¿ì.

/usr/bin/systemctl restart named.service

 

# bind °¡ ¾øÀ» °æ¿ì ¼³Ä¡, ½ÃÀÛ, ºÎÆýà ÀÚµ¿ ½ÃÀÛ ¼³Á¤

yum -y install bind caching-nameserver

# CentOS 6 ÀÏ °æ¿ì.

/etc/init.d/named start

/sbin/chkconfig named on

# CentOS 7 ÀÏ °æ¿ì.

/usr/bin/systemctl start named.service

/usr/bin/systemctl enable  named.service

 

 

# ù¹ø° ³×ÀÓ¼­¹ö¸¦ ÀÚü³×ÀÓ¼­¹ö·Î ÁöÁ¤.(ù¹ø° ¶óÀο¡ ¾Æ·¡ ³»¿ëÃß°¡)

vi /etc/resolv.conf

nameserver 127.0.0.1

 

 

7.    ¼­¹ö¿¡¼­ »ç¿ëÁßÀÎ ³×ÀÓ¼­¹ö È®ÀÎ

  Linux/Unix ¿¡¼­ »ç¿ëµÇ´Â ³×ÀÓ¼­¹ö´Â º¸Åë ¾Æ·¡Ã³·³ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ùù ¹ø° ³×ÀÓ¼­¹ö¸¦ ¸ÕÀú »ç¿ëÇÏ´Ù°¡ ÀÀ´äÀÌ ¾øÀ» ¶§ µÎ ¹ø° ³×ÀÓ¼­¹ö¸¦ »ç¿ëÇÏ°Ô µË´Ï´Ùµû¶ó¼­ ù ¹ø° ³×ÀÓ¼­¹ö´Â °¡±ÞÀû ÀÚü ³×ÀÓ¼­¹ö(127.0.0.1), ÇØ´ç È£½ºÆÃ/ISP ¾÷üÀÇ ³×ÀÓ¼­¹ö¸¦ µî·ÏÇÏ´Â °ÍÀÌ ÁÁ½À´Ï´Ù.

cat /etc/resolv.conf

#result# nameserver 127.0.0.1

#result# nameserver 164.124.101.2

#result# nameserver 168.126.63.1

 

µî·ÏµÈ ³×ÀÓ¼­¹ö°¡ Á¦´ë·Î ÀÀ´äÇÏ´ÂÁö ´ÙÀ½Ã³·³ È®ÀÎÇغ¸½Ã¸é µË´Ï´Ù.

ex) nslookup µµ¸ÞÀÎÁÖ¼Ò ³×ÀÓ¼­¹öIP

nslookup passkorea.net 127.0.0.1

#result# Server:  127.0.0.1

#result# Address: 127.0.0.1#53

 

#result# Name: passkorea.net

#result# Address:  211.170.106.66

 

 

8.    Ç¥ÁØ ½Ã°£ µ¿±âÈ­

¸ÞÀÏ ¼­¹ö´Â ¸ÞÀÏÀ» º¸³½½Ã°£/¹Þ´Â½Ã°£ÀÌ ¼­¹öÀÇ ½Ã°£¿¡ µû¶ó ±â·ÏµÇ¹Ç·Î, Ç×»ó Ç¥ÁØ ½Ã°£¿¡ µ¿±âÈ­ µÇ¾î¾ß ÇÕ´Ï´Ù.

- CentOS 5/6 ¹öÀüÀÏ °æ¿ì, ntpd ¸¦ ¼³Ä¡Çصθé ÀÚµ¿À¸·Î °è¼Ó µ¿±âÈ­ µÇ¾î µû·Î ½Å°æ¾µ ÇÊ¿ä°¡ ¾ø¾îÁý´Ï´Ù.

yum -y install ntp

# CentOS 6 ÀÏ °æ¿ì.

/etc/init.d/ntpd start

/sbin/chkconfig ntpd on

# CentOS 7 ÀÏ °æ¿ì.

/usr/bin/systemctl start ntpd.service

/usr/bin/systemctl enable  ntpd.service

ntpdate -d 0.centos.pool.ntp.org

date

 

- ´Ù¸¥ OS ÀÏ °æ¿ì, rdate ³ª ntpdate ·Î µ¿±âÈ­½Ãŵ´Ï´Ù.

rdate -s time.bora.net

ntpdate -u time.bora.net

[root@nbuilder tools]# /usr/sbin/hwclock --systohc

 

 

 

 

II.  ¼³Ä¡

 

 

 

1.    PHP °æ·Î È®ÀÎ

php, pear, pecl µîÀÇ ½ÇÇàÆÄÀÏÀÌ /usr/bin/ ¾Æ·¡¿¡ Á¸ÀçÇϰųª ¸µÅ©µÇ¾î ÀÖ´ÂÁö È®ÀÎÇØ¾ß ÇÕ´Ï´Ù.  Apache+PHP ¸¦ RPM À¸·Î ¼³Ä¡Çß´Ù¸é ÇØ´ç À§Ä¡¿¡ Á¸ÀçÇÏÁö¸¸ ÄÄÆÄÀÏ·Î ¼³Ä¡ÇßÀ» °æ¿ì ´ÙÀ½Ã³·³ /usr/bin/ ¾Æ·¡·Î ¸µÅ©¸¦ °É¾îÁÖ¾î¾ß ÇÕ´Ï´Ù.

# ÆÄÀÏÀÌ Á¸ÀçÇÏ´ÂÁö È®ÀÎ

ls /usr/bin/php /usr/bin/pear /usr/bin/pecl /usr/bin/phpize

#result# ls: **** ±×·± ÆÄÀÏÀ̳ª µð·ºÅ丮°¡ ¾øÀ½

 

# /usr/bin/php °¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì PHP°¡ ¼³Ä¡µÈ µð·ºÅ丮¸¦ ±âÁØÀ¸·Î ½Éº¼¸¯¸µÅ© »ý¼º.

ln -s /PHP_¼³Ä¡°æ·Î_Á÷Á¢ÀÔ·Â/bin/* /usr/bin/

# sample) ln -s /usr/local/php/bin/* /usr/bin/

 

# ¸µÅ©µÈ ÆÄÀÏÀÇ ½ÇÇà Å×½ºÆ®

/usr/bin/php -v

/usr/bin/pear config-show

 

   ÁÖÀÇ) ÄÄÆÄÀÏ·Î ¼³Ä¡µÈ PHP¿Í RPMÀ¸·Î ¼³Ä¡µÈ PHP°¡ ÇÔ²² ¼³Ä¡µÇ¾î ÀÖÀ» °æ¿ì PHP Ãæµ¹·Î ÀÎÇØ ¼³Ä¡½Ã ¿¹±âÄ¡ ¸øÇÑ ¹®Á¦°¡ ¹ß»ýÇÒ ¼ö ÀÖ½À´Ï´Ù.   µû¶ó¼­ ¹Ýµå½Ã 2°³ Áß Çϳª¸¦ »èÁ¦ÇØ¾ß ÇÕ´Ï´Ù.

# RPMÀ¸·Î ¼³Ä¡µÈ PHP°¡ ÀÖ´ÂÁö È®ÀÎ.

rpm -qa|grep php

 

# À¥ÆäÀÌÁöÀÇ phpinfo() Á¤º¸¿¡¼­ º¸¿©Áö´Â PHP ¹öÁ¯, php.ini °æ·Î°¡

# ´ÙÀ½Ã³·³ ½©¸ðµå¿¡¼­¿Í ÀÏÄ¡ÇÏ´ÂÁö È®ÀÎ.

php -v
php -i|grep ini

 

 

2.    PHP È®Àå¸ðµâ È®ÀÎ

¾Õ¼± ¡°¼³Ä¡ Áغñ¡±´Ü°è¿¡¼­ ¾ð±ÞµÇ¾î ÀÖ´Â Apache + PHP + MySQL µ¥¸óÀÇ ¼³Ä¡°¡ ¿Ï·áµÈ »óÅ¿¡¼­ ¼³Ä¡¸¦ ½ÃÀÛÇÏ¼Å¾ß ÇÕ´Ï´Ù.

 

ÇöÀç ¿î¿µÁßÀÎ ¸®´ª½º¿¡ ¿£¸ÞÀÏÀ» ¼³Ä¡ÇÏ·Á¸é PHPÀÇ °æ¿ì¿¡´Â ¹öÀüÀÌ 5.X ÀÌ»óÀ̾î¾ß ÇÏ°í mbstring, iconv ¸ðµâÀÌ ÇÊ¿äÇÕ´Ï´Ù. ÇØ´ç ¸ðµâÀÇ ¼³Ä¡¿©ºÎ´Â phpinfo() Á¤º¸¸¦ Ãâ·ÂÇÏ´Â ¼Ò½º¸¦ µû·Î ¸¸µé¾î¼­ È®ÀÎÇϰųª ¾Æ·¡Ã³·³ ½©½ºÅ©¸³Æ®·Î È®ÀÎÀÌ °¡´ÉÇÕ´Ï´Ù

php -m|grep mbstring

  #result# mbstring

php -m|grep iconv

  #result# iconv

 

# ÇØ´ç ¸ðµâÀÌ ¼³Ä¡µÇ¾î ÀÖÀ» °æ¿ì¿¡¸¸ Ãâ·Â°á°ú°¡ ³ª¿É´Ï´Ù.

 

¸ðµâÀÌ ¼³Ä¡µÇ¾î ÀÖÁö ¾ÊÀ» °æ¿ì Ãß°¡ÇÏ´Â ¹æ¹ýÀº ´ÙÀ½°ú °°½À´Ï´Ù.

 

1. PHP¸¦ RPMÀ¸·Î ¼³Ä¡ÇÒ °æ¿ì.(ÀÌ¹Ì ¼³Ä¡µÈ °æ¿ìµµ µ¿ÀÏ)

rpm ÆÐÅ°ÁöÁß php-mbstring, php-iconv ¸¦ ã¾Æ¼­ ¼³Ä¡ÇÏ½Ã¸é µË´Ï´Ù.

php-pecl-mailparse °¡ ¾ø´Â ½Ã½ºÅÛÀº Â÷ÈÄ Á÷Á¢ ¼³Ä¡ÇÏ´Â ¹æ¹ýÀÌ µû·Î ¼³¸íµÇ¾î ÀÖ½À´Ï´Ù.

¿¹Á¦) CentOS, Fedora Core ÀÇ °æ¿ì yum À¸·Î °£´ÜÇÏ°Ô ¼³Ä¡°¡´É.

yum -y install php-mbstring php-iconv

 

2. PHP¸¦ ¼Ò½º ÄÄÆÄÀÏ·Î ¼³Ä¡ÇÒ °æ¿ì.

configure ¿É¼Ç¿¡ ´ÙÀ½ ³»¿ëÀ» Ãß°¡ÇÏ¸é µË´Ï´Ù.

--with-iconv  --enable-mbstring --enable-mbregex

ÁÖÀÇ) PHP¸¦ Ä¿¸Çµå¶óÀο¡¼­ ½ÇÇàÇϱâ À§Çؼ­´Â ÄÄÆÄÀϽà --disable-cli ¿É¼ÇÀ» ³ÖÁö ¾Ê¾Æ¾ß ÇÕ´Ï´Ù.

 

3. PHP¸¦ ¼Ò½º ÄÄÆÄÀÏ·Î ÀÌ¹Ì ¼³Ä¡ÇصР°æ¿ì.

ÄÄÆÄÀϽà »ç¿ëÇÑ ¼Ò½º µð·ºÅ丮·Î À̵¿Çؼ­ ÇØ´ç ¸ðµâ¸¸ Ãß°¡ ¼³Ä¡ÇÏ°í, php.ini ÀÇ extensionÇ׸ñ¿¡ µî·ÏÇÏ¸é µË´Ï´Ù.

¿¹Á¦) ÄÄÆÄÀÏÇÑ ¼Ò½º°¡ /usr/src/php-4.4.1 ¿¡ ÀÖÀ» °æ¿ì.(¼­¹ö¸¶´Ù °æ·Î°¡ ´Ù¸§)

# install iconv

cd /usr/src/php-4.4.1/ext/iconv

phpize

./configure

make

make install

 

# install mbstring

cd /usr/src/php-4.4.1/ext/mbstring

phpize

./configure

make

make install

 

# php.ini °æ·Î È®ÀÎ

php -i|grep ini

 

# modify php.ini

vi /usr/local/php/lib/php.ini

         extension=iconv.so

         extension=mbstring.so

 

# ¼³Ä¡µÈ ¸ðµâ È®ÀÎ

php -m

 

 

3.    MySQL ¼³Á¤ º¯°æ

MySQL ¼³Á¤ ÆÄÀÏÀÎ my.cnf ¿¡¼­ [mysqld] ¹®±¸ ´ÙÀ½¿¡ max_allowed_packet=32M °ªÀÌ ¼±¾ðµÇ¾î¾ß ÇÕ´Ï´Ù¸¸¾à 1M·Î ¼±¾ðµÇ¾î ÀÖ´Ù¸é 32M·Î ¼öÁ¤ÇØÁÖ½Ã¸é µË´Ï´Ù.

### CentOS 6 ¿¡¼­ MySQL 5 °¡ RPMÀ¸·Î ¼³Ä¡µÈ °æ¿ì.

vi /etc/my.cnf

[mysqld]

max_allowed_packet=32M

/etc/init.d/mysqld restart

       °ü·Ã ±â¼úÀÚ·á) http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html

 

 

4.    ±âÁ¸ ¸ÞÀϼ­ºñ½º(SMTP/POP3) ÁßÁö

¼³Ä¡½Ã ¿£¸ÞÀÏ¿ë SMTP/POP3 ¼­ºñ½º¸¦ ½ÇÇàÇÏ°Ô µË´Ï´Ùµû¶ó¼­ ±âÁ¸¿¡ ¿î¿µÁßÀÌ´ø SMTP/POP3 ¼­ºñ½º´Â Á¾·á½ÃÅ°°í ºÎÆýà ÀÚµ¿ ½ÇÇàµÇÁö ¾Êµµ·Ï Á¶Ä¡ÇÏ¼Å¾ß ÇÕ´Ï´Ù.  ±×·¸Áö ¾ÊÀ» °æ¿ì ¼³Ä¡°¡ ¿Ï·áµÇ¾îµµ ¿£¸ÞÀÏ¿¡¼­ ¸ÞÀÏÀ» ¹ÞÁö ¸øÇÏ°Ô µË´Ï´Ù.

´ÙÀ½Àº Linux ¿¡¼­ ÀϹÝÀûÀ¸·Î ¸¹ÀÌ »ç¿ëµÇ´Â sendmail, ipop3 µ¥¸óÀ» ±âÁØÀ¸·Î ÇÑ °ÍÀÌ¸ç ½Ã½ºÅÛ¿¡ µû¶ó postfix, qmail, courier-imap µî ´Ù¸¥ ¼­ºñ½º°¡ »ç¿ëÇÏ°í ÀÖÀ» ¼ö µµ ÀÖÀ¸´Ï ¹Ì¸® È®ÀÎÇغ¸½Ã±â ¹Ù¶ø´Ï´Ù.

### CentOS 6 ÀÏ °æ¿ì.

/sbin/chkconfig postfix off

/etc/init.d/postfix stop

### CentOS 7 ÀÏ °æ¿ì.

/usr/bin/systemctl disable postfix.service

/usr/bin/systemctl stop postfix.service

 

### ³ª¸ÓÁö OS ÀÏ°æ¿ì, °¢°¢ÀÇ ½ÇÇàÁßÀÎ ¸ÞÀϼ­ºñ½º¸¦ ã¾Æ Á¤Áö½ÃÄÑ¾ß ÇÕ´Ï´Ù.

# ºÎÆýà ÀÚµ¿½ÇÇà ¹æÁö.

/sbin/chkconfig sendmail off

/sbin/chkconfig ipop3 off

#/sbin/chkconfig postfix off

#/sbin/chkconfig courier-imap off

 

# ±âÁ¸ ¸ÞÀϼ­ºñ½º¿ë µ¥¸ó Á¾·á.

/etc/init.d/sendmail stop

/etc/init.d/xinetd reload

#/etc/init.d/postfix stop

#/etc/init.d/courier-imap stop

 

# ¸ÞÀϼ­ºñ½º Á¾·áÈÄ SMTP(25), POP3(110)Æ÷Æ®¿¡¼­ ÀÀ´äÀÌ ¾ø´ÂÁö È®ÀÎ.

telnet 127.0.0.1 25

telnet 127.0.0.1 110

 

# ¸¸¾à 25, 110 Æ÷Æ®¿¡¼­ ÀÀ´äÀÌ ÀÖ´Ù¸é ±âÁ¸ ¸ÞÀϼ­ºñ½º°¡ Á¾·áµÈ °ÍÀÌ ¾Æ´Ï¹Ç·Î ÀçÈ®ÀÎÇÏ¼Å¾ß ÇÕ´Ï´Ù.

 

 

5.    ÀϺΠ¸®´ª½º ¹èÆ÷ÆÇÀÇ SELinux ÁßÁö

fedora, redhat enterprise µî SELinux °¡ ¼³Ä¡µÈ ¸®´ª½º¿¡¼­´Â ¾Æ·¡Ã³·³ ÀÌ ±â´ÉÀ» ¼³Ä¡½Ã ¾Ë ¼ö ¾ø´Â ¹®Á¦°¡ ¹ß»ýÇÏÁö ¾Ê½À´Ï´Ù.

# ¼³Á¤ÆÄÀÏ¿¡¼­ ¿É¼ÇÀ» enforcing ¿¡¼­ disabled ·Î ¼öÁ¤.

vi /etc/selinux/config

        SELINUX=enforcing

        =>

        SELINUX=disabled

 

# SELinux ¸¦ ÀçºÎÆÃÇÏÁö ¾Ê°í Áï½Ã ÁßÁö

/usr/sbin/setenforce 0

 

# ¸¸¾à setenforce °¡ ¾ø´Ù¸é ¼­¹ö¸¦ ÀçºÎÆÃÇØ¾ß ÇÕ´Ï´Ù.

 

 

6.    ¼³Ä¡ ÇÁ·Î±×·¥ ½ÇÇà (UTF-8 Á¦Ç°)

¼³Ä¡ ÇÁ·Î±×·¥À» ´Ù¿î¹Þ¾Æ¼­ ¿øÇÏ´Â µð·ºÅ丮¿¡ ³Ö¾îµÎ°í ½ÇÇàÇÕ´Ï´ÙÀ̶§ ¾ÆÆÄÄ¡ À¥¼­¹ö¸¦ ¹Ì¸® ½ÇÇàÇصξî¾ß ¼³Ä¡ ÇÁ·Î±×·¥¿¡¼­ ¾ÆÆÄÄ¡ À¥¼­¹öÀÇ Á¤º¸¸¦ ÀÚµ¿ÀνÄÇÒ ¼ö ÀÖ°Ô µË´Ï´ÙÀÚ¼¼ÇÑ ³»¿ëÀº ¼³Ä¡ ÇÁ·Î±×·¥¿¡¼­ ³ª¿À´Â ¾È³»¹®±¸¸¦ º¸°í µû¶ó¼­ ÁøÇàÇÏ½Ã¸é µË´Ï´Ù.

¿¹Á¦) /tmp µð·ºÅ丮¿¡ ³Ö¾îµÎ¾úÀ» °æ¿ìÀÇ ¿¹Á¦.

# ¼³Ä¡ ÇÁ·Î±×·¥À» ¼­¹ö¿¡ FTP µîÀ¸·Î ¾÷·ÎµåÇÕ´Ï´Ù.

wget http://passkorea.net/nmailphp/new/nmail-php-linux-3.2.tgz

 

# ¾ÐÃàÀ» ÇØÁ¦ÇÕ´Ï´Ù.

tar zxvf nmail-php-linux-3.2.tgz

 

# ¼³Ä¡ ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ ÈÄ ¡®¼³Ä¡ ¿Ï·á¡¯°¡ ³ª¿Ã¶§±îÁö Áö½Ã´ë·Î ÁøÇàÇÏ½Ã¸é µË´Ï´Ù.

# ÁÖÀÇ) ¹Ýµå½Ã /usr/bin/php À§Ä¡¿¡ php ½ÇÇàÆÄÀÏÀÌ Á¸ÀçÇØ¾ß ÇÕ´Ï´Ù.

 

/usr/bin/php nmail-php-3.2_install.php

 

Âü°í) ¼³Ä¡ ÇÁ·Î±×·¥¿¡¼­ ÇѱÛÀÌ ±úÁ® º¸ÀÏ °æ¿ì ¾Æ·¡Ã³·³ ÇѱÛÄڵ带 ÁöÁ¤ÈÄ Àç½ÇÇàÇÔ.

# Linux

export LANG=ko_KR.utf8

 

# Solaris

#export LANG=ko

 

# FreeBSD

#export ko_KR.utf-8

 

/usr/bin/php nmail-php-3.2_install.php

 

 

7.    ¼³Ä¡°¡ ¿Ï·áµÇ¸é, ¼³Ä¡ ÇÁ·Î±×·¥ º¸°ü

¼³Ä¡ ÇÁ·Î±×·¥Àº ¹Ýµå½Ã /home/nmail2/ ¾Æ·¡¿¡ º¸°üÇصνñ⠹ٶø´Ï´Ù.  ±×·¡¾ß ¼­¹ö ÀÌÀü/À缳ġ ÀÛ¾÷½Ã ¾Ë¸ÂÀº ¼³Ä¡ ÇÁ·Î±×·¥À» ãÁö ¸øÇØ ½Ã°£À» ³¶ºñÇÏ´Â ÀÏÀÌ ¾ø½À´Ï´Ù.

 

# ÇöÀç µð·ºÅ丮¿¡ ¼³Ä¡ ÇÁ·Î±×·¥ÀÌ Á¸ÀçÇÏ´ÂÁö È®ÀÎÇÕ´Ï´Ù.

ls -l nmail-php-* nmail_dir.ini nmail_license_agree.ini

 

# ¼³Ä¡ ÇÁ·Î±×·¥À» /home/nmail2 ·Î À̵¿ÇÕ´Ï´Ù.

mv nmail-php-* nmail_dir.ini nmail_license_agree.ini /home/nmail2/

 

 

8.    Apache °¡»óÈ£½ºÆ® ¼³Á¤

¼³Ä¡ ¿Ï·á½Ã ¸¶Áö¸· È­¸é¿¡ ¾Æ·¡Ã³·³ Apache °¡»óÈ£½ºÆ® ¼³Á¤¹æ¹ý¿¡ ´ëÇÑ ³»¿ëÀÌ ³ª¿É´Ï´ÙÇØ´ç ³»¿ëÀ» Âü°íÇϼż­ ¼³Á¤ÆÄÀÏÀ» ÀûÀýÈ÷ ¼öÁ¤ÈÄ Apache ¸¦ Àç½ÃÀÛÇÏ½Ã¸é µË´Ï´Ù.

==============================================================================

= ¿£¸ÞÀÏ ¼³Ä¡ ÀÛ¾÷ÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù.

==============================================================================

ÀÌÁ¦ Apache À¥¼­¹öÀÇ ¼³Á¤ÆÄÀÏÀÎ httpd.conf ¿¡ °¡»óÈ£½ºÆ®(ȤÀº ¾Ù¸®¾î½º) ¼³Á¤À» Ãß°¡ÇÏ°í

Apache À¥¼­¹ö¸¦ Àç½ÃÀÛÇϸé À¥¸ÞÀÏÀ» »ç¿ëÇÏ½Ç ¼ö ÀÖ°Ô µË´Ï´Ù.

  httpd.conf ¿¡ Ãß°¡ÇؾßÇÒ ³»¿ë)

    ÁÖÀÇ1) ¼­¹ö¿¡ µû¶ó NameVirtualHost, VIrtualHost Ç׸ñÀº ´Ù¸¦ ¼ö ÀÖÀ¸´Ï ±âÁ¸ ¼³Á¤À» È®ÀÎÇϼ¼¿ä.

    ÁÖÀÇ2) ServerName Àº DNS ¼³Á¤¿¡ µû¶ó 'mail'À̶ó´Â 2Â÷µµ¸ÞÀÎÀÌ ºÙÁö ¾ÊÀ» ¼ö µµ ÀÖÀ¸´Ï

        DNS ¼­¹ö°ü¸®ÀÚ¿¡°Ô ¹®ÀÇÇϽñ⠹ٶø´Ï´Ù.

    ÁÖÀÇ3) VIrtualHost °¡ ¾ø´ø »çÀÌÆ®¿¡¼­ VIrtualHost ¸¦ Ãß°¡ÇÒ °æ¿ì ±âÁ¸ ȨÆäÀÌÁö±îÁö ¿£¸ÞÀÏ·Î Á¢±ÙµÉ ¼ö ÀÖ½À´Ï´Ù.

        µû¶ó¼­ ±âÁ¸ ȨÆäÀÌÁöÀÇ VIrtualHost ´Â µû·Î ¸¸µé¾îÁÖ¼Å¾ß ÇÕ´Ï´Ù.

 

vi /etc/httpd/conf/httpd.conf

 

### NmailPHP Virtual Host ###

 

# VirtualHost Enabled

NameVirtualHost *:80

 

# Nmail PHP - http://mail.YourDomain.com/

<VirtualHost *:80>

     ServerAdmin postmaster@YourDomain.com

     DocumentRoot "/home/nmail2/nmail"

     ServerName mail.YourDomain.com

     ServerAlias mail.*

     #ServerAlias mail.MultiDomain1.com mail.MultiDomain2.com

     ErrorLog logs/nmail2.error_log

     TransferLog logs/nmail2.access_log

     <Directory "/home/nmail2/nmail">

         Options None

         AllowOverride All

         AddDefaultCharset Off

<IfModule mod_authz_core.c>

           Require all granted

         </IfModule>

         <IfModule !mod_authz_core.c>

           Order allow,deny

           Allow from all

         </IfModule>

     </Directory>

</VirtualHost>

 

ÁÖÀÇ) ¼­¹ö³»¿¡ ±âÁ¸¿¡ ¿î¿µÁßÀÎ À¥»çÀÌÆ®°¡ ÀÖÀ» °æ¿ì

Apache °¡»óÈ£½ºÆ®¿¡ ¼±¾ðµÇÁö ¾ÊÀº µµ¸ÞÀÎÀ¸·Î Á¢¼ÓÇÒ °æ¿ì ù¹ø° °¡»óÈ£½ºÆ® ¼³Á¤À» µû¸£°Ô µË´Ï´ÙÀÌ·Î ÀÎÇØ ±âÁ¸ À¥»çÀÌÆ®(www.YourDomain.com)¿ë °¡»óÈ£½ºÆ®°¡ µû·Î ¼±¾ðµÇÁö ¾ÊÀº »óÅ¿¡¼­ ¿£¸ÞÀÏ¿ë °¡»óÈ£½ºÆ®¸¦ Ãß°¡ÇÏ°Ô ¹®Á¦°¡ ¹ß»ýÇÒ ¼ö ÀÖ½À´Ï´Ù¹®Á¦°¡ »ý±âÁö ¾Êµµ·Ï ¹Ì¸® ±âÁ¸ À¥»çÀÌÆ®¿¡ ¸Â´Â °¡»óÈ£½ºÆ®°¡ ¼³Á¤À» È®ÀÎ ÈÄ Ãß°¡ÇÏ½Ã´Â°Ô ÁÁ½À´Ï´Ù.

 

ÁÖÀÇ) Apache ¼³Á¤ Áß ´ÙÀ½ Ç׸ñÀÌ ÀÖ´Ù¸é »èÁ¦ ÈÄ Àç½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù±×·¸Áö ¾ÊÀ¸¸é À¥¸ÞÀÏ¿¡¼­ ÇѱÛÀÌ ±úÁú °¡´É¼ºÀÌ ÀÖ½À´Ï´Ù.

AddDefaultCharset UTF-8

=>

#AddDefaultCharset UTF-8

 

 

9.    Apache ¾Ù¸®¾î½º ¼³Á¤

ÀϹÝÀûÀÎ °æ¿ìó·³ http://mail.YourDomain.com ÇüÅÂÀÇ À¥¸ÞÀÏ ÁÖ¼Ò¸¦ »ç¿ëÇÒ °æ¿ì¿¡´Â ¡®¾Ù¸®¾î½º¡¯¼³Á¤À» µû·Î Àâ¾ÆÁÙ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù.   ÇÏÁö¸¸ ¡®°¡»óÈ£½ºÆ®¡¯¼³Á¤À» »ç¿ëÇÏÁö ¾Ê°í http://YourDomain.com/webmail/ ÇüÅ·Π»ç¿ëÇÏ·Á¸é ¡®¾Ù¸®¾î½º¡¯¼³Á¤À» ÀÌ¿ëÇÏ½Ã¸é µË´Ï´Ù.

Apache À¥¼­¹öÀÇ ¼³Á¤ÆÄÀÏÀÎ httpd.conf ¿¡¼­ ±âÁ¸ Alias ¿É¼Ç ¾Æ·¡¿¡ ¿£¸ÞÀÏ °ü·Ã Alias ¸¦ Ãß°¡ÈÄ À¥¼­¹ö¸¦ Àç½ÃÀÛÇÏ¸é µË´Ï´Ù.

# ±âÁ¸ Alias ¼³Á¤ ´ÙÀ½¿¡ Ãß°¡

Alias /icons/ "/usr/local/apache/icons/"

 

# Nmail PHP - http://www.YourDomain.com/webmail/

Alias /webmail "/home/nmail2/nmail"

<Directory "/home/nmail2/nmail">

         Options None

         AllowOverride All

AddDefaultCharset Off

<IfModule mod_authz_core.c>

           Require all granted

         </IfModule>

         <IfModule !mod_authz_core.c>

           Order allow,deny

           Allow from all

         </IfModule>

</Directory>

 

 

10.¹æÈ­º® ¼³Á¤ È®ÀÎ

¼­¹ö OSÀÇ ±âº» ¹æÈ­º®À̳ª ¼­¹ö ¾Õ ´Ü¿¡ ¹æÈ­º®ÀÌ ÀÖÀ» °æ¿ì, ´ÙÀ½ Æ÷Æ®µéÀ» ¿ÀÇ ÇØÁÖ¼Å¾ß ÇÕ´Ï´Ù.

     TCP 25 ¸ÞÀÏ ¼Û¼ö½Å¿ë (Çʼö)

     TCP 80 À¥¸ÞÀÏ Á¢¼Ó¿ë

     TCP 110 ¾Æ¿ô·è µîÀÇ ¸ÞÀÏ Å¬¶óÀ̾ðÆ®¿¡¼­ ¡®¸ÞÀÏ ¹Þ±â¡¯½Ã »ç¿ëµÊ.

     TCP 587 ¾Æ¿ô·è µîÀÇ ¸ÞÀÏ Å¬¶óÀ̾ðÆ®¿¡¼­ ¡®¸ÞÀÏ º¸³»±â¡¯½Ã »ç¿ëµÊ.

* ¸ÞÀÏ Å¬¶óÀ̾ðÆ®¿¡¼­ 25 Æ÷Æ®¿¡ Á¢±ÙÇÏ´Â °Íµµ °¡´ÉÇÑ, ÀϺΠ¹«¼±/ÇØ¿Ü ÀÎÅͳݿ¡¼­ 25 Æ÷Æ®°¡ Â÷´ÜµÈ °æ¿ì¿¡ »ç¿ëµË´Ï´Ù.   À̶§ ¸ÞÀÏ Å¬¶óÀ̾ðÆ®ÀÇ ¼³Á¤¿¡¼­ SMTP Æ÷Æ®¸¦ 25¿¡¼­ 587 ·Î º¯°æÇؼ­ º¸³»±â°¡ °¡´ÉÇÕ´Ï´Ù.

       TCP 995 - ¾Æ¿ô·è µîÀÇ ¸ÞÀÏ Å¬¶óÀ̾ðÆ®¿¡¼­ ¡®¾ÏȣȭµÈ ¸ÞÀÏ ¹Þ±â¡¯½Ã »ç¿ëµÊ(TLS Åë½Å).

 

# CentOS 6 ÀÏ °æ¿ì.

vi /etc/sysconfig/iptables

# ±âÁ¸ tcp 22 Çã¿ë ¶óÀÎ ´ÙÀ½¿¡ Ãß°¡ÇÏ¸é µË´Ï´Ù.

-A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 110 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 587 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 995 -j ACCEPT

/etc/init.d/iptables restart

# CentOS 7 ÀÏ °æ¿ì.

firewall-cmd --permanent --zone=public --add-port=80/tcp

firewall-cmd --permanent --zone=public --add-port=25/tcp

firewall-cmd --permanent --zone=public --add-port=110/tcp

firewall-cmd --permanent --zone=public --add-port=587/tcp

firewall-cmd --permanent --zone=public --add-port=995/tcp

/usr/bin/systemctl restart firewalld

 

 

11.À¥¸ÞÀÏ Á¢¼Ó

À¥ºê¶ó¿ìÀú¿¡¼­ ¼³Ä¡ÇÑ ÁÖ¼Ò( http://mail.YourDomain.com ) ·Î Á¢¼ÓÇÏ½Ã¸é µË´Ï´Ù.  [¼­¹ö°ü¸®ÀÚ]°èÁ¤Àº ¾ÆÀ̵ð´Â postmaster À̸ç, ºñ¹Ð¹øÈ£´Â ¼³Ä¡½Ã ÀÔ·ÂÇÑ ºñ¹Ð¹øÈ£ÀÔ´Ï´Ù.

 

 

12.¸ÖƼ µµ¸ÞÀÎ, ȸ¿ø Ãß°¡

¸ÖƼ µµ¸ÞÀÎÀº [¼­¹ö°ü¸®ÀÚ]·Î ·Î±×ÀÎÈÄ [¸ÞÀϼ­¹ö°ü¸® - µµ¸ÞÀΰü¸®]¿¡¼­ Ãß°¡ÇÒ ¼ö ÀÖÀ¸¸ç ¸ÞÀÏ°èÁ¤µµ [¸ÞÀϼ­¹ö°ü¸® - ȸ¿ø°ü¸®]¿¡¼­ Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù¸ÖƼ µµ¸ÞÀÎÀÇ °æ¿ì »ç¿ëÀÚ°¡ Á¢¼ÓÇÑ À¥ÆäÀÌÁö ÁÖ¼Ò(http://)¿¡ µû¶ó ±¸ºÐÇÏ¿© ¿£¸ÞÀÏ ³»ºÎ¿¡¼­ ÀÚµ¿ Àνĵ˴ϴÙ.

 

¸ÖƼ µµ¸ÞÀÎ Ãß°¡ ÀÛ¾÷ ¼ø¼­)

a.       À¥¸ÞÀÏ [¸ÞÀϼ­¹ö°ü¸®]¿¡¼­ µµ¸ÞÀÎ ¹× ȸ¿ø Ãß°¡.

b.      ¾ÆÆÄÄ¡ À¥¼­¹ö ¼³Á¤ È®ÀÎ.

- ¾Õ¼­ ¼³Á¤ÇصР°¡»óÈ£½ºÆ®, ¾Ù¸®¾î½ºÀÇ °æ¿ì ¸ðµç µµ¸ÞÀο¡ Àû¿ëµÇ¹Ç·Î µû·Î ÀÛ¾÷   ÇÏ½Ç ÇÊ¿ä°¡ ¾ø½À´Ï´Ù.

c.       µµ¸ÞÀÎÀÇ DNS ¼­¹ö¿¡¼­ MX ·¹ÄÚµåÀÇ IP ¸¦ ¸ÞÀϼ­¹ö·Î º¯°æ.

 

±âÁ¸ »ç¿ëÀÚÀÇ ÀÏ°ý Ãß°¡ ¹× È£½ºÆþ÷ü¸¦ À§ÇÑ µµ¸ÞÀÎ,ȸ¿øÃß°¡¿ë ½© ½ºÅ©¸³Æ®°¡ Á¦°øµË´Ï´Ù.

cd /home/nmail2/tools/

./domain_add.php

         ¸ÞÀϼ­¹ö¿¡ µµ¸ÞÀÎÀ» Ãß°¡ÇÏ´Â ¸í·ÉÀÔ´Ï´Ù.

         À¥¸ÞÀÏÀÇ [¸ÞÀϼ­¹ö°ü¸®-µµ¸ÞÀΰü¸®]¿¡¼­ Ãß°¡ÇÏ´Â °Í°ú µ¿ÀÏÇÕ´Ï´Ù.

                  »ç¿ë¹æ¹ý) ./domain_add.php "DOMAIN"

./mbr_add.php

         ¸ÞÀϼ­¹ö¿¡ ¸ÞÀÏ°èÁ¤À» Ãß°¡ÇÏ´Â ¸í·ÉÀÔ´Ï´Ù.

                  ÀϹݻç¿ëÀÚ Ãß°¡½Ã) ./mbr_add.php "DOMAIN" "NAME" "USERID" "PASSWORD"

                  °ü¸®ÀÚ Ãß°¡½Ã    ) ./mbr_add.php "DOMAIN" "NAME" "USERID" "PASSWORD" "ADMIN"

 

 

13.TLS Åë½ÅÀ» À§ÇØ SSL ÀÎÁõ¼­ ¹ß±Þ ¹× Àû¿ë ¹æ¹ý

a.   OpensslÀ» ÀÌ¿ëÇÏ¿© °³ÀÎÅ° »ý¼º.

yum install openssl

openssl genrsa 2048 > server.key

b.   CSR(Certificate Signing Request) »ý¼º.

openssl req -new -key server.key -out cert.csr

 

Country Name (2 letter code) [AU]: (±¹°¡ÄÚµå:KR)

State or Province Name (full name) [Some-State]: (½Ã:Seoul)

Locality Name (eg, city) []: (±¸, ±º)

Organization Name (eg, company) [Internet Widgits Pty Ltd]: (±â°ü¸í)

Organizational Unit Name (eg, section) []: (Á¶Á÷¸í)

Common Name (eg, YOUR name) []: (µµ¸ÞÀθí)

Email Address []: (À̸ÞÀÏ)

 

Please enter the following 'extra' attributes

to be sent with your certificate request

A challenge password []: (ÀÔ·ÂÇÏÁö ¾Ê°í Enter)

An optional company name []:(ÀÔ·ÂÇÏÁö ¾Ê°í Enter)

c.   ÀÎÁõ¼­ ¹ß±Þ ½Åû.

- SSL ÀÎÁõ¼­¸¦ ÆǸÅÇÏ´Â ±â°ü¿¡ ½Åû

d.   ¹ß±Þ¹ÞÀº ÀÎÁõ¼­¿Í °³ÀÎÅ° ÆÄÀÏÀ» /home/nmail2/MailRoot¿¡ º¹»çÇÕ´Ï´Ù.

- °³ÀÎÅ° : server.key

- ÀÎÁõ¼­ : server.cert

e.   /home/nmail2/MailRoot/server.tab ¿¡¼­ ¾Æ·¡ ¿É¼ÇÀ» º¯°æÇÕ´Ï´Ù.

"EnableSMTP-TLS"  "0"

"EnablePOP3-TLS"  "0"

#"SmtpGwConfig"   "NeedTLS=1"

=>

"EnableSMTP-TLS"  "1"

"EnablePOP3-TLS"  "1"

"SmtpGwConfig"    "NeedTLS=1"

f.   ¸¸¾à °³ÀÎÅ°¿¡ ºñ¹Ð¹øÈ£°¡ °É·ÁÀÖÀ» °æ¿ì¿¡´Â ¸ÞÀÏ ¿£ÁøÀÌ ½ÃÀÛµÇÁö ¾Ê½À´Ï´Ù. ¾Æ·¡¿Í °°ÀÌ ºñ¹Ð¹øÈ£¸¦ ÇØÁ¦ÇØ¾ß ÇÕ´Ï´Ù.

openssl rsa -in server.key -out ssl_nopass.key

Enter pass phrase for server.key: ºñ¹Ð¹øÈ£ ÀÔ·Â

g.   Xmail ¼­ºñ½º Àç½ÃÀÛ

 

 

III.         ¼³Ä¡½Ã ¹®Á¦ ÇØ°á

1.    PHP mailparse ¸ðµâÀÌ ÀÚµ¿À¸·Î ¼³Ä¡µÇÁö ¾Ê´Â °æ¿ì. (ÄÄÆÄÀÏ ¼³Ä¡)

¼Ò½º ÄÄÆÄÀÏÀ» Çϱâ À§Çؼ­´Â ¡®gcc-c++¡¯µîÀÇ °³¹ßÆÐÅ°Áö°¡ ÇÊ¿äÇÏ°Ô µË´Ï´Ù°³¹ßÆÐÅ°Áö°¡ ¾øÀ»°æ¿ì CentOS µî¿¡¼­´Â ¾Æ·¡Ã³·³ ÆÐÅ°Áö°ü¸®ÀÚ¸¦ ÅëÇØ Ãß°¡ÇÏ½Ã¸é µË´Ï´Ù.

yum install glibc-devel gcc-c++ make

 

¼Ò½º¸¦ ´Ù¿î¹Þ¾Æ Á÷Á¢ ÄÄÆÄÀÏÇؼ­ ¸ðµâÀ» ¼³Ä¡ÇÏ¸é µË´Ï´Ù.

# PHP 7 ÀÏ °æ¿ì

Wget http://www.passkorea.net/nmailphp/betapatch/mailparse-3.0.2.tgz

tar zxvfp mailparse-3.0.2.tgz

cd mailparse-3.0.2

phpize

./configure

make

make install

 

# PHP 5 ÀÏ °æ¿ì

wget http://www.passkorea.net/nmailphp/betapatch/mailparse-2.1.6.tgz

tar zxvfp mailparse-2.1.6.tgz

cd mailparse-2.1.6

phpize

./configure

make

make install

 

¸¸¾à make ½Ã ¿¡·¯°¡ ¹ß»ýÇÑ´Ù¸é ¾Æ·¡Ã³·³ À¯Çü¿¡ µû¶ó ´ëÀÀÇÏ½Ã¸é µË´Ï´Ù.

 

¿¡·¯1)

ext/mbstring/libmbfl/mbfl/mbfilter.h: No such file or directory

# ´ÙÀ½Ã³·³ ¼Ò½º¿¡ Æ÷ÇÔµÈ libmfl µð·ºÅ丮¸¦ PHP°¡ ¼³Ä¡µÈ include µð·ºÅ丮¸¦ ã¾Æ¼­

# º¹»çÇسÖÀ¸½ÅÈÄ Àç½ÃµµÇÏ½Ã¸é µË´Ï´Ù.

# ¾Æ·¡ °æ·Î´Â ¼­¹ö¿¡ µû¶ó ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù.

 

# cp /usr/src/php-5.1.4/ext/mbstring/libmbfl /usr/local/php/include/php/ext/mbstring/

 

¿¡·¯2)

mailparse-2.1.1/mailparse.c:34:2: error: #error The mailparse extension requires the mbstring extension!

# PHP mbstring ¸ðµâÀ» º°µµ·Î Ãß°¡ÇϽŠ°æ¿ì¿¡ ¹ß»ýÇÏ´Â ¹®Á¦ÀÔ´Ï´Ù.

# ´ÙÀ½Ã³·³ ¼Ò½º¿¡¼­ ¹®Á¦ÀÇ ¶óÀεéÀ» »èÁ¦ ÈÄ Àç½ÃµµÇÏ½Ã¸é µË´Ï´Ù.

 

vi mailparse-2.1.1/mailparse.c

  33~35 line)

#if !HAVE_MBSTRING

#error The mailparse extension requires the mbstring extension!

#endif

 

 

2.    ¸ÞÀÏ¿£Áø ¼Ò½º ÄÄÆÄÀÏÀÌ ÇÊ¿äÇÑ °æ¿ì

·¹µåÇÞ °è¿­ÀÇ ¸®´ª½º, ¼Ö¸®¸®½º ÀϺΠ¹öÁ¯¿¡ ÇÑÇØ ¸ÞÀÏ¿£Áø ¹ÙÀ̳ʸ®¸¦ Á¦°øÇÏ°í ÀÖ½À´Ï´ÙÀÌ·Î ÀÎÇØ ÀϺΠOS¿¡¼­´Â ¼³Ä¡ÇÁ·Î±×·¥¿¡¼­ ÀÚµ¿À¸·Î ãÁö ¸øÇØ Á÷Á¢ ¼Ò½º ÄÄÆÄÀÏÀ» ÅëÇØ »ç¿ëÇÏ¼Å¾ß ÇÏ´Â °æ¿ì°¡ ÀÖÀ» ¼ö ÀÖ½À´Ï´Ù. ¶ÇÇÑ ¸ÞÀÏ¿£Áø°ü·Ã ÀÌ»ó Áõ»óÀÌ ¹ß°ßµÈ´Ù¸é ¼Ò½º ÄÄÆÄÀÏÀ» ÅëÇØ ´Ù½Ã ¼³Ä¡ÇÏ´Â °ÍÀ» ±ÇÀåÇص帳´Ï´Ù.

 

  ¼Ò½º ÄÄÆÄÀÏÀ» Çϱâ À§Çؼ­´Â ¡®gcc-c++¡¯µîÀÇ °³¹ßÆÐÅ°Áö°¡ ÇÊ¿äÇÏ°Ô µË´Ï´Ù°³¹ßÆÐÅ°Áö°¡ ¾øÀ»°æ¿ì CentOS µî¿¡¼­´Â ¾Æ·¡Ã³·³ ÆÐÅ°Áö°ü¸®ÀÚ¸¦ ÅëÇØ Ãß°¡ÇÏ½Ã¸é µË´Ï´Ù.

yum install glibc-devel gcc-c++ make openssl-devel

 

¼Ò½º ÄÄÆÄÀÏ ¹æ¹ý)

cd /home/nmail2/tools/mailserver/

tar zxvf xmail-1.27_20160407.tgz

cd xmail-1.27_20160407

 

# OSº° ÄÄÆÄÀÏ.(Linux ¸¦ »ç¿ëÁßÀ϶§´Â Makefile.lnx À» »ç¿ëÇÏ¸é µÊ)

make -f Makefile.lnx

#make -f Makefile.bsd

#make -f Makefile.sso

 

# ¸ÞÀÏ¿£Áø Á¾·áÈÄ 25¹ø Æ÷Æ®°¡ ÀÀ´äÀÌ ¾ø´Â °ÍÀ» È®ÀÎÇÔ.

/etc/init.d/xmail stop

telnet 127.0.0.1 25

 

# ½ÇÇàÆÄÀÏÀ» µ¤¾î¾º¿ò.

/bin/cp bin/* /var/MailRoot/bin/

 

# ¸ÞÀÏ¿£ÁøÀ» ½ÃÀÛÈÄ ¸ÞÀÏ¿£Áø ¹öÁ¯ÀÌ "XMail 1.27 PassKorea160330"ÀÎ °ÍÀ» È®ÀÎÇÔ.

/etc/init.d/xmail start

telnet 127.0.0.1 25

 

 

 

3.    À¥¸ÞÀÏ¿¡¼­ ¹ÞÀº ¸ÞÀÏÀÌ º¸ÀÌÁö ¾Ê´Â °æ¿ì

¿£¸ÞÀÏÀÇ °æ¿ì ºü¸¥ 󸮸¦ À§ÇØ ¸ÞÀÏÁ¤º¸¸¦ µðºñ¿¡ ÀúÀåÇÏ°Ô µË´Ï´Ù±×·¯³ª ¼³Ä¡½Ã ¹®Á¦°¡ ÀÖÀ» °æ¿ì µðºñ¿¡ ÀúÀåÇÏ´Â °úÁ¤¿¡¼­ ¿À·ù°¡ ¹ß»ýÇÒ ¼ö ÀÖ½À´Ï´ÙÀÌ °æ¿ì ¸ÞÀÏÀº ½ÇÁ¦·Î ¹Þ¾ÒÀ¸¹Ç·Î ¾Æ¿ô·è¿¡¼­ °¡Á®°¥ ¼ö ÀÖÁö¸¸ À¥¸ÞÀÏ¿¡¼­¸¸ º¸ÀÌÁö ¾Ê´Â Çö»óÀÌ ¹ß»ýÇÏ°Ô µË´Ï´Ù

 

´ÙÀ½ °¢ ´Ü°èº°·Î ¼ø¼­´ë·Î Å×½ºÆ®¸¦ ÁøÇàÇغ¸½Ã¸é µË´Ï´Ù¸¸¾à ¿¡·¯°¡ ³ª¿Â´Ù¸é ¿¡·¯¸Þ¼¼Áö¿Í ÇÔ²² ÀúÈñ ȨÆäÀÌÁö( http://passkorea.net )·Î ¹®ÀǸ¦ ÁÖ½Ã¸é µË´Ï´Ù.

 

1. ´ÙÀ½Ã³·³ [ ¸ÞÀϵ¥ÀÌŸ¿Í µðºñ µ¿±âÈ­ ÀÛ¾÷ ]À» Çغ¸½Å ÈÄ À¥»ó¿¡¼­ º¸¿©Áö´ÂÁö È®ÀÎÇغ¸½Ã±â ¹Ù¶ø´Ï´Ù.

cd /home/nmail2/tools/

./mail_box_dbsync.php ALL

 

2. À¥»ó¿¡¼­ ¸ÞÀÏÀÌ º¸¿©Áø´Ù¸é ¸ÞÀÏÀ» ¹ÞÀº ÈÄ µðºñ¿¡ ³Ö´Â °úÁ¤¿¡¼­ ¹®Á¦°¡ ¹ß»ýÇßÀ» ¼ö ÀÖÀ¸´Ï ¾Æ·¡Ã³·³ ¿À´Ã ³¯Â¥ÀÇ ·Î±×°¡ ³²¾ÆÀÖ´ÂÁö È®ÀÎÇغ¸½Ã±â ¹Ù¶ø´Ï´Ù.  

tail /var/MailRoot/logs/filters-201512020000

 

3. ¾Æ·¡¿Í µ¿ÀÏÇÏ°Ô ½©½ºÅ©¸³Æ®¸¦ ½ÇÇàÇغ¸½Ã°í ¿¡·¯¸Þ¼¼Áö°¡ ³ª¿Â´Ù¸é ¾Ë·ÁÁֽñ⠹ٶø´Ï´Ù. /home/nmail2 °¡ ¾Æ´Ñ ´Ù¸¥ °÷¿¡ ¼³Ä¡ÇÏ´õ¶óµµ /home/nmail2 ·Î ½Éº¼¸¯¸µÅ©°¡ °É¸®µµ·Ï µÇ¾î ÀÖ½À´Ï´Ù.   ¹Ýµå½Ã ¾Æ·¡Ã³·³ Àüü°æ·Î¸¦ ¸ðµÎ ÀÔ·ÂÇؼ­ ½ÇÇàÇغ¸½Ã±â ¹Ù¶ø´Ï´Ù.

Linux OS) /home/nmail2/nmail/filter.sh.php

Solairs OS) /export/home/nmail2/nmail/filter.sh.php

Á¤»óÀûÀÎ ½ÇÇà°á°ú)

                  [root@ibin2 /]# /home/nmail2/nmail/filter.sh.php

                  ¿Ã¹Ù¸¥ °æ·Î·Î Á¢±ÙÇÏ¿© ÁֽʽÿÀ.

 

4. PHP ¹öÁ¯ È®Àνà ¾Æ·¡Ã³·³ 'ionCube PHP Loader' ¸ðµâÀÌ µî·ÏµÈ »óÅ·Π³ª¿Í¾ß ÇÕ´Ï´Ù.

/usr/bin/php -v

         PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)

         Copyright (c) 1997-2013 The PHP Group

         Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

         with the ionCube PHP Loader + Intrusion Protection from ioncube24.com (disabled) v5.0.7, Copyright (c) 2002-2015, by ionCube Ltd.

 

5. 4¹ø °úÁ¤¿¡¼­ ¸ðµâÀÌ µî·ÏµÇÁö ¾Ê¾Ò´Ù¸é À¥¼­¹ö¿Í ½©¸ðµåÀÇ PHP ¹öÁ¯, php.ini °æ·Î¸¦ ºñ±³Çغ¸¾ß ÇÕ´Ï´Ù.

   À¥¼­¹ö) À¥¸ÞÀÏÀÇ [¸ÞÀϼ­¹ö°ü¸® - PHPINFO]¿¡¼­ È®ÀÎ.

   ½©¸ðµå) /usr/bin/php -v; /usr/bin/php -i|grep ini

 

   A) PHP ¹öÁ¯ÀÌ ´Ù¸¥ °æ¿ì.

PHP°¡ 2°³ ÀÌ»ó ¼³Ä¡µÈ °æ¿ì·Î½á »ç¿ëÇÏÁö ¾Ê´Â PHP¸¦ Á¦°ÅÈÄ /usr/bin/php ¿¡ »ç¿ëÇÏ´Â PHPÀÇ ½ÇÇàÆÄÀÏÀ» º¹»çÇØ ³Ö¾î¾ß ÇÕ´Ï´Ù.

 

   B) PHP ¹öÁ¯ÀÌ °°Áö¸¸ php.ini °æ·Î°¡ ´Ù¸¥ °æ¿ì

¾È³ç¸®´ª½º µî ÀϺΠ¹èÆ÷ÆÇ¿¡¼­´Â À¥¼­¹ö¿Í ½©¸ðµå¿¡¼­ÀÇ php.ini °æ·Î°¡ ´ÙÀ½Ã³·³ ´Ù¸¥ °æ¿ì°¡ ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì À¥¼­¹ö¿¡¼­ »ç¿ëµÇ´Â php.ini ÀÇ ¸¶Áö¸·¿¡ Ãß°¡µÈ ¿£¸ÞÀÏ °ü·Ã ¼³Á¤À» ±×´ë·Î º¹»çÇϼż­ ½©¸ðµå¿¡¼­ »ç¿ëµÇ´Â php.ini ÀÇ ¸¶Áö¸·¿¡ Ãß°¡ÇϽŠÈÄ 4¹ø °úÁ¤À¸·Î È®ÀÎÇÏ½Ã¸é µË´Ï´Ù.


 

IV.        ¸ÞÀϼ­¹ö °ü¸® ¾È³»

 

 

 

¡Ø ¸ÞÀϼ­¹ö °ü¸®¿¡ ÇÊ¿äÇÑ µµ¿ò¸»À» Á¤¸®Çسõ¾Ò½À´Ï´Ù¼³Ä¡ÇϽŠÀ¥¸ÞÀÏÀÇ [µµ¿ò¸» >> ¸ÞÀϼ­¹ö°ü¸® FAQ]¿¡ µî·ÏµÇ¾î ÀÖ½À´Ï´Ù¾Æ·¡ µ¥¸ð»çÀÌÆ®¿¡¼­ ¹Ì¸® È®ÀÎÇغ¸½Ç ¼ö µµ ÀÖ½À´Ï´Ù.

http://nm3.passkorea.net/help.php?id=SAFAQ

 

¡Ø ¸ñÂ÷ ¹Ì¸®º¸±â

¢Â ¸ÞÀϼ­¹ö ½ÃÀÛ°ú Á¾·á, »ç¿ë Æ÷Æ®(¹æÈ­º®¼³Á¤)
¢Â ¸ÞÀϼ­¹ö ¼³Á¤ ¾È³»
¢Â ¸ÖƼµµ¸ÞÀÎ Ãß°¡ ¾È³»
¢Â µ¥ÀÌŸ ¹é¾÷ ¾È³»
¢Â SMTP RELAY(¿ÜºÎ ¸ÞÀÏ¹ß¼Û ±ÇÇÑ) ¼³Á¤

¢Â ÆíÁö¾²±â½Ã ÃÖ´ë ÷ºÎÆÄÀÏ ¿ë·® Á¶Àý ¾È³»
¢Â ¸ÞÀÏŬ¶óÀ̾ðÆ®(¾Æ¿ô·è µî)»ç¿ë½Ã ÀÎÁõ¹æ¹ý¿¡ ´ëÇÑ ¾È³»

¢Â ¸ÞÀÏ ÆÄÀÏ°ú µðºñÀÇ µ¿±âÈ­ ¾È³»
¢Â ¹æÈ­º® »ç¿ë½Ã À¯ÀÇ»çÇ×
¢Â ¼­¹ö ÀÌÀü½Ã À¯ÀÇ»çÇ×
¢Â µðºñ¿¡ ÀúÀåµÈ µ¥ÀÌŸ¸¦ ÀÓÀÇ·Î ¼öÁ¤ÇÏ°íÀÚ ÇÒ¶§ÀÇ À¯ÀÇ»çÇ×

 

 

V.  POP3(¾Æ¿ô·è µî) ÀÌ¿ë¾È³»

 

 

 

¡Ø ¾Æ¿ô·è µîÀÇ ¸ÞÀÏŬ¶óÀ̾ðÆ®¿¡¼­ ¸ÞÀÏÀ» º¸³»°í ¹Þ±â À§ÇÑ »ç¿ë¹æ¹ý ¹× ¹®Á¦ ¹ß»ý½Ã ÇØ°áÃ¥À» Á¤¸®Çسõ¾Ò½À´Ï´Ù. ¼³Ä¡ÇϽŠÀ¥¸ÞÀÏÀÇ [POP3 ÀÌ¿ë¾È³»]¿¡ µî·ÏµÇ¾î ÀÖ½À´Ï´Ù¾Æ·¡ µ¥¸ð»çÀÌÆ®¿¡¼­ ¹Ì¸® È®ÀÎÇغ¸½Ç ¼ö µµ ÀÖ½À´Ï´Ù.

http://nm3.passkorea.net/help.php?id=POP3

 

¡Ø ¸ñÂ÷ ¹Ì¸®º¸±â

1. POP3/SMTP ¼³Á¤¹æ¹ý ¾È³».

2. ¼³Á¤¹æ¹ý µû¶óÇϱâ - Office Outlook

3. ¼³Á¤¹æ¹ý µû¶óÇϱâ - Outlook Express

4. ¾Æ¿ô·è µîÀÇ ¸ÞÀÏ ÇÁ·Î±×·¥°ú À¥¸ÞÀÏÀ» µ¿½Ã¿¡ »ç¿ëÇÒ °æ¿ìÀÇ À¯ÀÇ»çÇ×.

5. ¾Æ¿ô·è µîÀÇ ¸ÞÀÏ ÇÁ·Î±×·¥¸¸ »ç¿ëÇÒ °æ¿ìÀÇ ¸ÞÀÏ ¿ë·® ÃÊ°ú °¡´É¼º.

 

 

 

 

 

 

 

 

 

 

 

 

 

VI.        ¸®ÅϸÞÀÏ ºÐ¼® ¾È³»

 

 

¡Ø ¸ÞÀÏ ¼Û¼ö½Å°úÁ¤¿¡¼­ ¹ß»ýÇÏ´Â ¸®ÅϸÞÀÏ(¼Û¼ö½Å ¿¡·¯¿¡ ´ëÇÑ ¸Þ¼¼Áö)¿¡ ´ëÇØ ¿¡·¯º°·Î ¿øÀÎ ¹×ÇØ°áÃ¥À» Á¤¸®Çسõ¾Ò½À´Ï´Ù. ¼³Ä¡ÇϽŠÀ¥¸ÞÀÏÀÇ »ó´Ü¸Þ´ºÁß [¸®ÅϸÞÀÏ ºÐ¼®]¿¡ µî·ÏµÇ¾î ÀÖ½À´Ï´Ù¾Æ·¡ µ¥¸ð»çÀÌÆ®¿¡¼­ ¹Ì¸® È®ÀÎÇغ¸½Ç ¼ö µµ ÀÖ½À´Ï´Ù.

http://nm3.passkorea.net/help.php?id=RETURNMAIL

 

¡Ø ¸ñÂ÷ ¹Ì¸®º¸±â

¢Â ÀϽÃÀûÀÎ Àü¼Û ½ÇÆÐ
    - 417 Temporary delivery error
    - The maximum number of delivery attempts has been reached
    - End of socket stream data
    - Invalid server address
    - Bad server response
¢Â ¹Þ´Â»ç¶÷ÀÌ Á¸ÀçÇÏÁö ¾Ê´Â °æ¿ì
    - 550 User unknown
    - 550 Mailbox unavailable
    - 550 5.1.1 No such user
    - 554 delivery error: dd This user doesn't have a yahoo.co.kr account (userid@domain.com) [-5] - mta114.mail.krs.yahoo.com
¢Â ¹Þ´Â»ç¶÷ÀÌ »ç¿ëÁßÁöµÈ °æ¿ì
    - 550 Account disabled
    - 550 5.1.1 Inactive mbox
    - 550 5.1.1 Suspended user
    - 554 delivery error: dd Sorry your message to userid@domain.com cannot be delivered. This account has been disabled or discontinued [#102]. - mta115.mail.krs.yahoo.com
¢Â ¹Þ´Â»ç¶÷ÀÇ ¸ÞÀÏ¿ë·®ÀÌ ÃÊ°úµÈ °æ¿ì
    - 552 Requested mail action aborted: exceeded storage allocation - <userid@domain.com>
    - The recipient's mailbox is full
¢Â ¹Þ´Â»ç¶÷ÀÇ ½ºÆÔ¼³Á¤(¼ö½Å°ÅºÎ)¿¡ ÀÇÇØ Â÷´ÜµÈ °æ¿ì
    - 550 You are registered as spammer (by user's reject list)
    - 554 5.0.0 Service unavailable (userid: mail is denied, by spam filter)
¢Â ¸ÞÀϹ߼۱ÇÇÑÀÌ ¾ø°Å³ª »ó´ë¹æ ¸ÞÀϼ­¹ö ¼³Á¤ ¹®Á¦
    - 550 Relay denied
    - 554 Relay operation rejected
    - 550 5.7.1 Unable to relay for userid@domain.com
¢Â ´ë·® ¸ÞÀÏ ¹ß¼ÛÀ¸·Î ÀÎÇØ ´ëÇüÆ÷ÅзκÎÅÍ IP°¡ Â÷´ÜµÈ °æ¿ì
    - 550 5.7.1 <userid@domain.com>... Error.your access was denied.? Since you sent too many e-mails,you are not allowed to send more e-mails within 24 hours.After 24 hours,you can send e-mails as usual.If you did not send any e-mails,which is considered as a spam,you'd better register
    - 421 4.3.2 Your IP(111.112.113.114) is filtered and this connection will be closed. You must register your IP to http://realip.naver.com
    - 421 4.3.1 You send too many messages.
    - 5.1.0 - Unknown address error 550-'Transaction failed. (SPAM_SUSPECT:IP_CONTROL) (http://cleanip.paran.com)'
    - 451 mta113.mail.krs.yahoo.com Resources temporarily unavailable. Please try again later [#4.16.5].
¢Â RBL¿¡ ÀÇÇØ Â÷´ÜµÈ °æ¿ì
    - 421 4.3.2 Your ip is filtered by RBL (http://realip.naver.com/rbl/rblinfo.html)(IP:111.112.113.114)(Caues:http://dsbl.org/listing?111.112.113.114)
    - 553 5.3.0 ... Rejected - see http://www.mail-abuse.org/rbl/
    - 553-mail rejected because your IP is in DUL. See http://www.mail-abuse.com/enduserinfo.html
¢Â »ó´ë¹æ ¸ÞÀϼ­¹ö¿¡¼­ ½ºÆÔÀ¸·Î ÀνÄÇؼ­ Â÷´ÜµÈ °æ¿ì
    - 553 Blocked for spam
    - 550 5.5.0 Your message was rejected.
¢Â »ó´ë¹æ ¸ÞÀϼ­¹ö¿¡¼­ ¹ÙÀÌ·¯½º·Î ÀνÄÇؼ­ Â÷´ÜµÈ °æ¿ì
    - 550 Virus in your mail!!!
¢Â ÷ºÎÆÄÀÏ¿¡ ½ÇÇàÆÄÀÏÀ» ÷ºÎÇÒ ¼ö ¾ø´Â °æ¿ì - ±¸±Û
    - 552 5.7.0 Illegal Attachment 36si248323nzk+I9:I15
¢Â ¹Þ´Â»ç¶÷°ú º¸³½»ç¶÷¿¡ ¹®Á¦°¡ ÀÖ¾î ¸®ÅϸÞÀÏÀÌ ¹Ýº¹µÇ´Â °æ¿ì
    - Mail loop detected
¢Â ¹Þ´Â ¸ÞÀϼ­¹ö¿¡¼­ Çã¿ëÇÏ´Â ÃÖ´ë¸ÞÀÏÅ©±â¸¦ ÃÊ°úÇÑ °æ¿ì
    - Message size excedes the server limit