FrontPage › FC2_MailServer
Ãâó : http://linux-sarang.net/board/?p=read&table=tip&no=10705&page=&o[at]=s&osc=t&oss=fedora&ost=a
Fedora ¸ÞÀϼ¹ö ¼¼ÆÃ
1. ¸ÞÀϼ¹ö
Fedora Core 2 ¿¡¼ ±âº»ÀûÀ¸·Î Á¦°øÇÏ´Â ÆÐÅ°Áö¸¦ ÀÌ¿ëÇØ À¥¸ÞÀÏÀ»
±¸ÃàÇÑ´Ù.
2. ÇÊ¿äÇÑ ÆÐÅ°Áö±¸ÃàÇÑ´Ù.
´ÙÀ½ÀÇ ÆÐÅ°Áö°¡ ÇÊ¿äÇÏ´Ù.
¼³Ä¡µÇ¾î ÀÖÁö ¾ÊÀº ÆÐÅ°Áö´Â
3. sendmail ¼³Á¤sendmail
sendmail-cf
dovecot
squirrelmail
openssl
cyrus-sasl
cyrus-sasl-plain
cyrus-sasl-md5
¼³Ä¡Çϱâ Àü¿¡sendmail-cf
dovecot
squirrelmail
openssl
cyrus-sasl
cyrus-sasl-plain
cyrus-sasl-md5
rpm -qa | grep <package-name>
ÀÇ ¸í·ÉÀ¸·Î ¿ì¼± À§ÀÇ ÆÐÅ°Áö°¡ ¼³Ä¡µÇ¾î ÀÖ´ÂÁö È®ÀÎÇØ º»´Ù.¼³Ä¡µÇ¾î ÀÖÁö ¾ÊÀº ÆÐÅ°Áö´Â
yum install <package-name>
ÀÇ ¸í·ÉÀ¸·Î ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù.sendmailÀÇ ¼³Á¤ÆÄÀÏÀº /etc/mail¿¡ ¸ð¿©ÀÖ´Ù.
1) /etc/mail/access
4. ³ª¸ÓÁö ¼³Á¤1) /etc/mail/access
¸ÞÀÏÀ» ¹ß¼ÛÇÒ ¼ö ÀÖ´Â ipÀÇ RELAY¸¦ ¿¾îÁØ´Ù.
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
localhost RELAY
127.0.0.1 RELAY
ÆÄÀÏÀ» ¼öÁ¤ÇÑ ÈÄ¿¡´Â
makemap hash /etc/mail/access < /etc/mail/accessÀÇ ¸í·ÉÀ¸·Î access.db¸¦ °»½ÅÇÑ´Ù. access ÆÄÀϸ¸ ¼öÁ¤ÇÑ °æ¿ì´Â
sendmailÀ» Àç½ÃÀÛÇÒ ÇÊ¿ä°¡ ¾øÀ¸¸ç access.db ÆÄÀÏ °»½Å¸¸À¸·Î
º¯°æ»çÇ×ÀÌ Àû¿ëÀÌ µÈ´Ù.
2) /etc/mail/virtusertablesendmailÀ» Àç½ÃÀÛÇÒ ÇÊ¿ä°¡ ¾øÀ¸¸ç access.db ÆÄÀÏ °»½Å¸¸À¸·Î
º¯°æ»çÇ×ÀÌ Àû¿ëÀÌ µÈ´Ù.
°¡»ó »ç¿ëÀÚ ¸ñ·ÏÀ» ¸¸µç´Ù. °£´ÜÇÑ ¿¹·Î,
admin@localhost root
3) /etc/mail/local-host-names¶ó°í ÀûÀ¸¸é ½ÇÁ¦·Î system ³»¿¡ Á¸ÀçÇÏÁö ¾Ê´Â admin À¸·Î ¿À´Â
¸ÞÀÏÀº root °èÁ¤ÀÌ ¹Þ¾Æº¸°Ô µÈ´Ù. ¿ª½Ã ÆÄÀÏÀ» ¼öÁ¤ÇÑ ÈÄ¿¡´Â
makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable¸ÞÀÏÀº root °èÁ¤ÀÌ ¹Þ¾Æº¸°Ô µÈ´Ù. ¿ª½Ã ÆÄÀÏÀ» ¼öÁ¤ÇÑ ÈÄ¿¡´Â
ÀÇ ¸í·ÉÀ¸·Î virtusertable.db ÆÄÀÏÀ» °»½ÅÇØÁà¾ß ÇÑ´Ù.
¼¹ö·Î ¿À´Â email Áß ÀÌ ÆÄÀÏ¿¡ ³ª¿µÈ ÁÖ¼Ò·Î ¿À´Â ¸ÞÀϸ¸À» ¹Þ¾ÆµéÀδÙ.
ns
example.com
ns.example.com
4) /etc/mail/sendmail.mcexample.com
ns.example.com
¸ÞÀÏ ÁÖ¼Ò·Î »ç¿ëÇÏ´Â ¼¹ö À̸§µéÀ» ¿©±â¿¡ Àû¾î ³õ´Â´Ù.
SMTP ÀÎÁõ ±â´ÉÀ» »ç¿ëÇϱâ À§Çؼ ´ÙÀ½ÀÇ ¶óÀÎÀ» È®ÀÎÇÑ´Ù.
TRUST_AUTH_MECH(`LOGIN PLAIN EXTERNAL DIGEST-MD5 CRAM-MD5')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5')dnl
¾ø´Ù¸é ¹°·Ð Ãß°¡ÇÑ´Ù.
¿ÜºÎ¸ÞÀÏÀ» ¹ÞÀ» ¼ö ÀÖ°Ô ÇÏ·Á¸é ´ÙÀ½ÀÇ ¶óÀÎÀ» ãÀº ÈÄ,
¿ÜºÎ¸ÞÀÏÀ» ¹ÞÀ» ¼ö ÀÖ°Ô ÇÏ·Á¸é ´ÙÀ½ÀÇ ¶óÀÎÀ» ãÀº ÈÄ,
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
´ÙÀ½°ú °°ÀÌ ¶óÀΠóÀ½¿¡ dnlÀ̶ó°í Àû´Â´Ù.
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf´ÙÀ½ÀÇ ¸í·ÉÀ¸·Î sendmail.cf¸¦ »õ·Î »ý¼ºÇÑ´Ù.
³ª¸ÓÁö ¼³Á¤Àº ±×³É ±âº»À¸·Î »ç¿ëÇß´Ù. ÇÊ¿ä¿¡ µû¶ó¼´Â ´ÙÀ½ ÆÄÀϵéÀ»
¾Ë¾Æ¼ ¼öÁ¤ÇÑ´Ù.
1) dovecot
5. ¹æȺ®¾Ë¾Æ¼ ¼öÁ¤ÇÑ´Ù.
1) dovecot
/etc/dovecot.conf
2) squirrelmail/usr/share/squirrelmail/config/config.php
Á÷Á¢ ¼öÁ¤ÇÏÁö ¸»°í µÉ ¼ö ÀÖÀ¸¸é,
/usr/share/squirrelmail/config/conf.plÀÇ ¸í·ÉÀ» ÀÌ¿ëÇØ ¼öÁ¤ÇÒ °ÍÀ» ±ÇÇÑ´Ù. ¼³Á¤ÆíÁý½Ã imap ºÎºÐÀº others
·Î ¼³Á¤Çϸé Àß µ¿ÀÛÇÑ´Ù.
·Î ¼³Á¤Çϸé Àß µ¿ÀÛÇÑ´Ù.
¿ÜºÎ Æ÷Æ®°¡ ¿¸®Áö ¾Ê¾Æ¼ ¸ÞÀÏÀÌ µµÂøÇÏÁö ¾Ê´Â °æ¿ì°¡ Á¾Á¾ ÀÖ´Ù.
iptables¿¡¼ 25, 143, 993 (tcp) Æ÷Æ®¸¦ ¹Ýµå½Ã ¿¾î ³õ´Â´Ù.
6. ¼ºñ½º ½ÃÀÛÇϱâiptables¿¡¼ 25, 143, 993 (tcp) Æ÷Æ®¸¦ ¹Ýµå½Ã ¿¾î ³õ´Â´Ù.
°¢°¢ÀÇ ¼ºñ½º¸¦ ´ÙÀ½ ¸í·ÉÀ¸·Î ½ÃÀÛÇÑ´Ù.
À» ºê¶ó¿ìÀú·Î Á¢±ÙÇϸé squirrelmail ·Î±×ÀΠȸéÀ» ¸¸³¯ ¼ö ÀÖ´Ù.
´ÙÀ½ ºÎÆýà ¹Ù·Î ¼ºñ½º°¡ ½ÃÀÛµÇ°Ô ÇÏ·Á¸é,
Ç׸ñ¿¡ üũ¸¦ ÇØ ÁØ´Ù.
7. ±âŸservice sendmail start
service dovecot start
service saslauthd start
squirrelmailÀÇ °æ¿ì apache°¡ ½ÇÇàµÇ¾î¾ß¸¸ °¡´ÉÇÏ´Ù. apache°¡ ½ÇÇàÁßÀ̸éservice dovecot start
service saslauthd start
À» ºê¶ó¿ìÀú·Î Á¢±ÙÇϸé squirrelmail ·Î±×ÀΠȸéÀ» ¸¸³¯ ¼ö ÀÖ´Ù.
´ÙÀ½ ºÎÆýà ¹Ù·Î ¼ºñ½º°¡ ½ÃÀÛµÇ°Ô ÇÏ·Á¸é,
setup
ȤÀºntsysv
¸í·ÉÀ¸·Î ½Ã½ºÅÛ¼ºñ½º ¸ñ·Ï¿¡ Á¢±Ù ÈÄdovecot
sendmail
saslauthd
sendmail
saslauthd
Ç׸ñ¿¡ üũ¸¦ ÇØ ÁØ´Ù.
1) sendmail¿¡ °üÇÑ ÀÚ¼¼ÇÑ ¼³Á¤Àº http://oops.orgÀÇ LECTURE¿¡¼ º¼ ¼ö ÀÖ´Ù.
2) squirrel mail¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº http://www.squirrelmail.org¿¡¼
2) squirrel mail¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº http://www.squirrelmail.org¿¡¼
È®ÀÎÇÒ ¼ö ÀÖ´Ù.