°Ê²¼¡¢¼«Âð¤Î¥µ¡¼¥Ð¤Ë¥á¡¼¥ë¥µ¡¼¥Ð¤ò¹½ÃÛ¤·¤¿¤È¤¤ÎµÏ¿¤Ç¤¹¡£SMTP¤ÏPostfix,POP/IMAP4¤ÏDovecot¤òÍѤ¤¤Æ¤¤¤Þ¤¹¡£ SMTP¥µ¡¼¥Ð¤Î¥¤¥ó¥¹¥È¡¼¥ë †»È¤Ã¤Æ¤¤¤ë¥µ¡¼¥Ð¤ÏCentOS5.2¤Ç¤¹¤¬¡¢É¸½à¤Ç¤ÏSendmail¤¬Æ°¤¤¤Æ¤¤¤ë¤è¤¦¤Ê¤Î¤Ç¡¢¥Ç¥Õ¥©¥ë¥È¤ÎMTA¤âÊѹ¹¤·¤Æ¤¤¤Þ¤¹¡£¼ê½ç¤Ï°Ê²¼¤ÎÄ̤ꡣ [root@centos ~]# yum -y install postfix Downloading Packages: (1/1): postfix-2.3.3-2.1. 100% |=========================| 3.6 MB 00:04 Running Transaction Installing: postfix ######################### [1/1] Installed: postfix.i386 2:2.3.3-2.1.el5_2 Complete! [root@centos ~]# /sbin/service sendmail stop sm-client ¤òÄä»ßÃæ: [ OK ] sendmail ¤òÄä»ßÃæ: [ OK ] [root@centos ~]# chkconfig sendmail off [root@centos ~]# chkconfig --list sendmail sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@centos ~]# alternatives --config mta 2 ¥×¥í¥°¥é¥à¤¬¤¢¤ê 'mta' ¤òÄ󶡤·¤Þ¤¹¡£ ÁªÂò ¥³¥Þ¥ó¥É ----------------------------------------------- *+ 1 /usr/sbin/sendmail.sendmail 2 /usr/sbin/sendmail.postfix Enter ¤ò²¡¤·¤Æ¸½ºß¤ÎÁªÂò [+] ¤òÊÝ»ý¤¹¤ë¤«¡¢ÁªÂòÈÖ¹æ¤òÆþÎϤ·¤Þ¤¹:2 [root@centos ~]# alternatives --config mta 2 ¥×¥í¥°¥é¥à¤¬¤¢¤ê 'mta' ¤òÄ󶡤·¤Þ¤¹¡£ ÁªÂò ¥³¥Þ¥ó¥É ----------------------------------------------- * 1 /usr/sbin/sendmail.sendmail + 2 /usr/sbin/sendmail.postfix <-Êѹ¹¤µ¤ì¤¿ Enter ¤ò²¡¤·¤Æ¸½ºß¤ÎÁªÂò [+] ¤òÊÝ»ý¤¹¤ë¤«¡¢ÁªÂòÈÖ¹æ¤òÆþÎϤ·¤Þ¤¹: [root@centos ~]# ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÊÔ½¸ †/etc/postfix/main.cf¤ò°Ê²¼¤Î¤è¤¦¤ËÊÔ½¸¤·¤Þ¤¹¡£ [root@www ~]# diff /etc/postfix/main.cf.20071007 /etc/postfix/main.cf > myhostname = mail.hogehoge.com //¥á¡¼¥ë¥µ¡¼¥Ð¤ÎFQDN̾¡£ //DNS¤Ç¤â°ú¤±¤ë¤è¤¦¤ÊÀµ¤·¤¤¥â¥Î¤Ë¤·¤Ê¤¤¤È¥À¥á¤ß¤¿¤¤¤Ç¤¹ > mydomain = hogehoge.com //¼«¥É¥á¥¤¥ó¤ò»ØÄꤷ¤Þ¤¹¡£ // root@hogehoge.com ¤Ã¤Æ¥¢¥É¥ì¥¹¤Ë¤Ê¤ë¤Î¤«¤Ê¡£ > myorigin = $mydomain < inet_interfaces = localhost > #inet_interfaces = localhost > inet_interfaces = all < mydestination = $myhostname, localhost.$mydomain, localhost > #mydestination = $myhostname, localhost.$mydomain, localhost > mydestination = $myhostname, $mydomain // ¼«¥Û¥¹¥È¤¬ºÇ½ªÌÜŪÃϤǤ¢¤ë¥É¥á¥¤¥ó̾ // ¥á¡¼¥ë¥¢¥É¥ì¥¹¤Î@¤Î±¦Â¦¤¬¾åµ»ØÄê¤Ë°ìÃפ¹¤ë¤È¡¢¼«¥µ¥¤¥È¤Ø¤Î¥á¡¼¥ë¤È // ¸«¤Ê¤·¤Æ¼è¤ê¹þ¤ß¤ò¹Ô¤¤¤Þ¤¹¡£¾åµ¤Î¾ì¹ç @¤Î±¦¤¬¥É¥á¥¤¥ó̾¤«¡¢¥á¡¼¥ë // ¥µ¡¼¥Ð¤ÎFQDN¤Î¾ì¹ç¤À¤±¼è¤ê¹þ¤ß¤ò¹Ô¤¤¤Þ¤¹¡£ > mynetworks = 192.168.1.0/24, 127.0.0.0/8 // ¿®Íê¤Ç¤¤ëSMTP¥¯¥é¥¤¥¢¥ó¥È¥¢¥É¥ì¥¹¤Ç¤¹¡£¤³¤Î¥Í¥Ã¥È¤«¤é¤ÎžÁ÷¤òµö²Ä¡£ // ¤³¤Î¥µ¥Ö¥Í¥Ã¥È°Ê³°¤«¤é¤Î¥á¡¼¥ëÁ÷¿®¤Ï¤Ç¤¤Ê¤¤¤Ã¤Æ»ö // IP¤ò»ØÄꤹ¤ë¤³¤È¤â¤Ç¤¤ë¡£ < #home_mailbox = Maildir/ > home_mailbox = Maildir/ // ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Î·Á¼°¤Ï¡¢Maildir ¤Ë¤·¤Þ¤¹ > mail_spool_directory = /var/spool/mail POP3/IMAP4¥µ¡¼¥Ð¤Î¥¤¥ó¥¹¥È¡¼¥ë †[root@centos postfix]# yum -y install dovecot Package dovecot - 1.0.7-2.el5.i386 is already installed. <-¤¿¤Þ¤¿¤Þ¡¢¤¹¤Ç¤ËÆþ¤Ã¤Æ¤¿¡£ Nothing to do [root@centos postfix]# ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÊÔ½¸ †/etc/dovecot.conf ¤ò°Ê²¼¤Î¤è¤¦¤ËÊÔ½¸¤·¤Þ¤¹¡£ [root@centos etc]# diff dovecot.conf.20081013 dovecot.conf > protocols = imap imaps pop3 pop3s > mail_location = maildir:~/Maildir [root@centos etc]# ºÆµ¯Æ°¤È¡¢¤¢¤È¤Ï£Ï£Óµ¯Æ°»þ¼«Æ°µ¯Æ°¤È¤·¤Þ¤¹¡£ [root@centos etc]# /etc/init.d/dovecot start Dovecot Imap ¤òµ¯Æ°Ãæ: [ OK ] [root@centos etc]# chkconfig dovecot on [root@centos etc]# chkconfig --list dovecot dovecot 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@centos etc]# TIPS †¥á¡¼¥ë¤Î¥ê¥ì¡¼¤òÀßÄꤹ¤ë¡£ †¼«¥á¡¼¥ë¥µ¡¼¥Ð¤«¤é¾¤Î¥µ¡¼¥Ð¤Ë¥á¡¼¥ë¤òÇÛÁ÷¤¹¤ëÀßÄê¤Ç¤¹¡£/etc/postfix/main.cf ¤Ë¤¢¤ë relayhost = [¥ê¥ì¡¼Àè¤ÎSMTP¥µ¡¼¥Ð] ¤Î¹àÌܤò½¤Àµ¤·¤Þ¤¹¡£¤Á¤ã¤ó¤È¥»¥¥å¥ê¥Æ¥£¤ËÇÛθ¤·¤Ê¤¤¤È¡¢¥¹¥Ñ¥Þ¡¼¤Î±Â¿©¤Ë¤Ê¤ê¤½¤¦¤Ê¤Î¤Ç¤´Ãí°Õ¡£¡£ ´ØÏ¢¥ê¥ó¥¯ †°Ê²¼¤Î¥µ¥¤¥È¤ò»²¹Í¤Ë¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤·¤¿¡ª
¤³¤Îµ»ö¤Ï
¸½ºß¤Î¥¢¥¯¥»¥¹:5257 |