¼³Ä¡¼ø¼´Â Àú ³ª¸§´ë·Î ÀüüÀûÀÎ È帧À» º¸°í Á¤ÇÑ°ÍÀÔ´Ï´Ù. ¹°·Ð ÀÌ ¼ø¼¸¦ ÁöÄÑÁÖ½ÃÁö ¾ÊÀ»°æ¿ì ¾î¶² ¿¡·¯°¡ ¹ß»ýÇÒ¼öµµ ÀÖÀ¸´Ï.. µÇµµ·ÏÀ̸é ÁöÄÑÁÖ¼¼¿± ¸ðµç ¼³Ä¡´Â Ưº°È÷ ÁöÁ¤ÇÏÁö ¾Ê´ÂÇÑ "root" ±ÇÇÑÀ¸·Î ½ÇÇàÇϽʽÿÀ. ±×¸®°í °¢ ½ÇÇàÀ§Ä¡¸¦ ³ªÅ¸³»´Â ÇÁ·ÒÇÁÆ® ¸¦ (¿¹¸¦ µé¸é ¾Æ·¡ÀÇ MySQL ¼³Ä¡ÀÇ°æ¿ì "mysql-3.22.25]#" ¿Í °°ÀÌ) ´«¿©°Ü¼ ÂüÁ¶ÇÏ¿© Áֽñ⠹ٶø´Ï´Ù.
¸¹ÀÌ ¼³Ä¡¸¦ Çغ¸¼ÌÀ»Å×´Ï °£´ÜÇÏ°Ô ³Ñ¾î°¡Á® ^^; ¸ÕÀú ȯ°æ¼³Á¤À» Çؾ߰ÚÁ®?
[mysql-3.22.25]# ./configure --prefix=/usr/local/mysql --with-charset=euc_kr [mysql-3.22.25]# make [mysql-3.22.25]# make install [mysql-3.22.25]# /usr/local/mysql/bin/mysql_install_db [mysql-3.22.25]# /usr/local/mysql/bin/safe_mysqld &symbolic link´Â ³ªÁßÀ» À§Çؼµµ ²À ÇÊ¿äÇÕ´Ï´Ù. ¾øÀ½ ¿¡·¯°¡ Äã ¶ßÁö¿© ^^ (MySQLÀ» Àû¿ëÇÑ Å¥¸ÞÀÏÀ̳ª IMAP µîÀÇ ÄÄÆÄÀÏ ½Ã ÇÊ¿äÇÕ´Ï´Ù)
[mysql-3.22.25]# mkdir /usr/local/include [mysql-3.22.25]# ln -s /usr/local/mysql/include/mysql /usr/local/include/mysql [mysql-3.22.25]# ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql [mysql-3.22.25]# mkdir /usr/local/lib [mysql-3.22.25]# ln -s /usr/local/mysql/lib/mysql /usr/local/lib/mysql [mysql-3.22.25]# ln -s /usr/local/mysql/lib/mysql /usr/lib/mysqlºÎÆõɶ§ ¶ßµµ·Ï µî·Ïµµ Çսôç
[mysql-3.22.25]# vi /etc/rc.d/rc.local ---------------------------------------------------- | if [ -f /usr/local/mysql/bin/safe_mysqld ]; then | | /usr/local/mysql/bin/safe_mysqld & | | fi | ----------------------------------------------------¿©±â±îÁö ÇßÀ½ mysqlÀº ¼³Ä¡°¡ ³¡³µ³×¿± ^^; °£´ÜÇÏ°Ô Çϳª ³¡³»°í ´ÙÀ½À¸·Î °¡Á®
ÈåÈå.. ¾ÆÆÄÄ¡µµ ¸¹ÀÌ Çغ¸¼ÌÁö¿ä? À̳ðÀº ´õ °£´ÜÇÏ°Ô °©´Ï´Ù.
[apache-1.3.9]# ./configure --prefix=/usr/local/apache --enable-shared=max [apache-1.3.9]# make [apache-1.3.9]# make installÀ̳𵵠ºÎÆõɶ§ ¶ßµµ·Ï µî·ÏÀ» ÇÕ¼¼´ç
[apache-1.3.9]# vi /etc/rc.d/rc.local ---------------------------------------------------- | if [ -f /usr/local/apache/bin/httpd ]; then | | /usr/local/apache/bin/apachectl start | | fi | ----------------------------------------------------ÄíÄí ¹ú½á 2°³³ª ³¡³µ³×¿±.... ÀÌÁ¦ºÎÅÍ ÁøÂ¥·Î µé¾î°©´Ï´Ù. À½.....
ÈåÈå µåµ® qmail¿¡ ¿Ô±º¿±. Ä«Ä«Ä«... °í»ýÀ» Çغ¸µµ·Ï ÇÏÁ®... ¹¹ qmail¼³Ä¡¾ß 10¹øµµ ³Ñ°Ô Çغ¸¼ÌÀ»Å×´Ï... ´Ù¸¥ ÀÚ¼¼ÇÑ ³»¿ëÀº qmail HOW-TO °°Àº ¹®¼¸¦ Âü°íÇؼ ºÁ ÁֽʽÿÀ. Á¦°¡ ¸»ÁÖº¯ÀÌ ¾ø¾î¼ Çò°¥¸±¼öµµ ÀÖ½À´Ï´Ù.
¸ÕÀú qmail¿¡´Ù mysql ÆÐÄ¡¸¦ Àû¿ëÇϵµ·Ï ÇÏÁö¿©...
[qmai-1.03]# patch -p1 < ../patch/qmail-1.03-mysql-0.6.6.patchqmail µð·ºÅ丮 ¸¸µé¾îÁà¾ß Çϴ°Š¾Æ½ÃÁ®? ^^
[qmai-1.03]# mkdir /var/qmailqmail À¯Àú¸¦ µî·ÏÇØ Áà¾ß ÇÏ´Ï ¾Æ·¡¿Í °°ÀÌ º¹»ç¸¦ ÇϽÅÈÄ user.shÆÄÀÏÀ» editÇÕ´Ï´Ù. ´Ù¸¥ ºÎºÐÀº ´Ù Áö¿ì°í LINUXºÎºÐ ¸¸ ³²°ÜµÎ°í ¾Õ¿¡ºÙÀº ÁÖ¼® #À» Á¦°ÅÇÕ´Ï´Ù.
[qmai-1.03]# cp INSTALL.ids user.sh [qmai-1.03]# sh user.shÀÌÁ¦ qmailÀ¯Àú°¡ µî·ÏÀÌ µÇ°í ¸î¸î µð·ºÅ丮µµ °°ÀÌ »ý°å½À´Ï´ç ^^
[qmai-1.03]# make [qmai-1.03]# make setup checkÇÏÇÒ ¿©±â±îÁ¤ ÇÏ¸é ¿ì¼± qmailÀº ¼³Ä¡°¡ µÆ°ÚÁÒ? Å©Å©Å©.... ¸¸¾à ÄÄÆÈÁß ¿¡·¯°¡ ³µ´Ù¸é... mysql°ú °ü·ÃµÈ path°°Àº ºÎºÐÀ̳ª À§ÀÇ symbolic link ÀÏ °¡´É¼ºÀÌ Å®´Ï´Ù. Â÷±ÙÂ÷±Ù ºÁ ÁÖ¼¼¿±.
ÀÌÁ¦ rblsmtpd¸¦ ¼³Ä¡ÇؾßÁ®? ¹¹ À̳ðÀÌ¾ß ¾ÆÁÖ °£´ÜÇÏ°Ô ³¡³»Áö¿©.
[rblsmtpd-0.70]# make [rblsmtpd-0.70]# make setup checkÇÏÇÒ ³¡³µ½À´Ï´Ù.
ÀÌÁ¨ ´Ù½Ã qmailµð·ºÅ丮·Î °©´Ï´Ù. (/var/qmail/ ÀÌ ¾Æ´Õ´Ï´Ù. ¼Ò½º µð·ºÀÔ´Ï´Ù)
[qmai-1.03]# ./config¸¸¾à À ºÎºÐÀÌ ¿¡·¯°¡ ³´Ù¸é ¾Æ·¡ ó·³ ÇØÁÖ¼¼¿©
[qmai-1.03]# ./config-fast totoro.kr.psi.net
(ÁÖ) ¿ø·¡´Â config ¸¸À¸·Î µÇ¾î¾ß ÇÕ´Ï´Ù. ´ëºÎºÐ ÀÌ°ÍÀÌ Àß µÇÁö ¾Ê´Â ÀÌÀ¯´Â DNS reverse ¼¼ÆÃÀÌ µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì ÀÎ°Í °°½À´Ï´Ù. reverse ¼¼ÆÃÀ̶õ IP ÁÖ¼Ò¸¦ °¡Áö°í À̸§À» ã¾Æ³»´Â ¼¼ÆÃÀ» À̾߱â ÇÕ´Ï´Ù. ¾ÈµÅµµ µÇ±â´Â ÇÏÁö¸¸ Á¦´ë·Î ¼¼ÆÃÇÏ°Ô Çϴ°ÍÀÌ ÁÁ°Ú Áö¿ä? È®ÀÎÀº ping -R <ip address> ·Î È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ DNS °¡ °°Àº ³×Æ®¿÷ ¿¡ ÀÖÁö ¾ÊÀ» °æ¿ì´Â ´ëºÎºÐÀÇ ¶ó¿ìÅ͵éÀÌ ping -R ¼ºñ½º¸¦ ÇØÁÖÁö ¾ÊÀ¸¹Ç·Î ¾ÈµÉ ¼ö ÀÖ½À´Ï´Ù.
´ÙÀ½ºÎÅÍ´Â qmail¼³Ä¡¸¦ ±×´ë·Î µû¸£°í ¼³¸íÀº ¾È ºÙÀÔ´Ï´Ù. Ȥ Á׾ ±Ã±ÝÇÏ½Å°Ô ÀÖÀ¸½Ã¸é qmail HOW-TO ¸¦ º¸¼¼¿±. Àú´Â qmailÀ» ¾Ë·Áµå¸®´Â°Ô ¾Æ´Ï¶ó qmail¿¡¼ IMAP »ç¿ëÇÏ´Â °ÍÀ» ¼³¸íÇÏ´Â ÁßÀÔ´Ï´ç.
[qmai-1.03]# cd ~alias [qmai-1.03]# touch .qmail-root .qmail-postmaster .qmail-mailer-daemon [qmai-1.03]# cp /var/qmail/boot/home /var/qmail/rcÄíÄí sendmailÀ» Á×ÀԽôç. Àú´Â linux±ò¶§ ¾Æ¿¹ sendmailÀ» ¾È±ò¾ÒÁ®..
[qmai-1.03]# kill -9 $(ps aux | grep sendmail | awk {'print $2'}) [qmai-1.03]# mv /usr/lib/sendmail /usr/lib/sendmail.old [qmai-1.03]# mv /usr/sbin/sendmail /usr/sbin/sendmail.old [qmai-1.03]# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail [qmai-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
(ÁÖ) kill ¸í·ÉÀ» ³»¸±¶§ "no such pid" °¡ ³ª¿Ã¼ö°¡ ÀÖÀ¸³ª ±×°ÍÀº ¸í·ÉÀ» ³»¸° grep sendmail À» °Ë»öÇÑ °Í À̹ǷΠ»ó°ü¾ø½À´Ï´Ù.
qmailÀ» ¶ç¿öº¾¼¼´ç ^^ ÇÏÇÒ
[qmai-1.03]# csh -cf '/var/qmail/rc &'À̳𵵠ºÎÆõɶ§ ¶ßµµ·Ï µî·ÏÀ» ÇÕ¼¼´ç
[qmai-1.03]# vi /etc/rc.d/rc.local ---------------------------------------------------- | if [ -f /var/qmail/rc ]; then | | csh -cf '/var/qmail/rc &' | | fi | ----------------------------------------------------
ÀÌÁ¦ºÎÅÒÀº qmail°ú °°ÀÌ ±ò¾Æ¾ß ÇÏ´Â ³ÑµéÀÔ´Ï´Ù. ÄíÄí... ¿ª½Ã ¹¹ÇÏ´Â ³ðÀÎÁö´Â ^^ HOW-TO ¸¦ º¸¼¼¿± Àü ±ò¼öÀÖµµ·Ï¸¸ ¾Ë·Áµå¸³´Ï´Ù.
[ucspi-tcp-0.84]# make [ucspi-tcp-0.84]# make setup check
Á¦ÀÏ ³¡¿¡ setuser¸í·ÉÀÌ ¾È¸Ô´Â °æ¿ì°¡ Àִµ¥ ÀÌ°æ¿ì 0.53¹öÀüÀ» ¼³Ä¡ÇÏ½Ã¸é ¹®Á¦ ¾ø½À´Ï´Ù. 0.53À» ÀÌ¿ëÇØ ÁÖ¼¼¿±.. ¹°·Ð setuidgidµµ »ó°ü¾øÁö¸¸¿© ^^
[daemontools-0.53] make [daemontools-0.53] make man [daemontools-0.53] make setup [daemontools-0.53] make check
ÈìÈì... ÀÌÁ¦ ´ë° qmailÀº Á¤¸®°¡ µÇ¾î°©´Ï´Ù. ^^ ÀÌÁ¦ ·Î±×¿¡ °üÇÑ ¼³Á¤À» ÇÏÁö¿©
[qmai-1.03]# mkdir /var/log/qmail [qmai-1.03]# chown qmaill /var/log/qmail [qmai-1.03]# mkdir /var/log/qmail/qmail-smtpd [qmai-1.03]# mkdir /var/log/qmail/qmail-pop3d [qmai-1.03]# chown qmaill /var/log/qmail/*ÀÌÁ¦ tcprulesÀ» ¼³Á¤ÇÕ´Ï´Ù. ^^¹¹ÇÏ´Â ³ðÀÎÁö´Â ´Ù ¾Æ½ÃÁÒ? ¹¹ ¿ÜºÎ¿¡¼ SMTP·Î ¾²°í ¸ø¾²°í.. ¹¹ ¾î¼±¸ Àú¼±¸ ÇÏ´õ±º¿©....
[qmai-1.03]# vi /etc/tcp.smtp:allow ¶Ç´Â 203.255.115.:allow,RELAYCLIENT="" ¹¹ ÀÌ·±½ÄÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù.
[qmai-1.03]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp [qmai-1.03]# PATH=/var/qmail/bin:/usr/local/bin:$PATH [qmai-1.03]# export PATH [qmai-1.03]# mkdir /var/lock/qmail-smtpd [qmai-1.03]# supervise /var/lock/qmail-smtpd \ tcpserver -v -x/etc/tcp.smtp.cdb -u71 -g1001 0 25 \ rblsmtpd qmail-smtpd 2>&1 | \ setuser qmaill accustamp | \ setuser qmaill cyclog -s5000000 -n5 /var/log/qmail/qmail-smtpd & [qmai-1.03]# vi /etc/inetd.conf
[checkpassword-0.81]# patch -p1 < ../patch/checkpassword-0.81-mysql-0.6.6.patch [checkpassword-0.81]# make [checkpassword-0.81]# make setup check [checkpassword-0.81]# vi /etc/inetd.conf¾Æ·¡¿Í °°ÀÌ /etc/inetd.conf ÆÄÀÏ¿¡ pop-3¸¦ ¼öÁ¤ÇÕ´Ï´Ù. ÂÞ¿í ÇÑÁÙ·Î ¾²¼¼¿ä. Àý´ë µÎÁÙÀÌ ¾Æ´Õ´Ï´Ù.
pop-3 stream tcp nowait root /usr/sbin/tcpd /var/qmail/bin/qmail-popup totoro.kr.psi.net /bin/checkpassword /var/qmail/bin/qmail-pop3d MaildirÀߵdzª Å×½ºÆ®¸¦ Çغ¾¼¼´ç.. ^^; ÇÏÇÏ ÀßµÇ¾ß ÇÒÅÙµ¥....
[checkpassword-0.81]# printf "popori\01111\0Y123456\0" | /bin/checkpassword `which id` 3<&0¾Æ½ÃÁ®? "°èÁ¤\0Æнº¿öµå\0¾Ï°Å³ª\0" À̳ðÀÌ ¾ÈµÇ¸é ´Ù½ÃÇؾߵ˴ϴç... ºÎµð ÀßÇϼ¼¿±...
(ÁÖ)Ȥ libmyysqlclient.so.6 °¡ ¾ø´Ù°í ¿¡·¯°¡ ³¯¼ö ÀÖ½À´Ï´Ù. ÀÌ°æ¿ì´Â »õ·Î ¼³Ä¡µÈ MySQL ÀÇ shared ¶óÀ̺귯¸®°¡ /usr/lib µð·ºÅ丮¿¡ Á¸ÀçÇÏÁö ¾Ê±â ¶§¹®¿¡ ³ª´Â ¿¡·¯ ÀÔ´Ï´Ù. ¾Æ·¡¸¦ ½ÇÇàÇÏ°í ´Ù½Ã ½ÇÇàÇϽʽÿÀ.
[checkpassword-0.81]# ln -s /usr/lib/mysql/libmysqlclient.so.6.0 /usr/lib/libmysqlclient.so.6
[qmai-1.03] vi /var/qmail/control/sqlserver --------------------------------------- | mysql_use yes | | server localhost | | login qm_user | | password | | db qmail | | table users | | check_host no | ---------------------------------------(ÁÖ) MySQL ¿¡ Á¢¼ÓÇÏ´Â À¯Àú·Î¼ qm_user ¸¦ »ç¿ëÇÏ°í ÀÖ½À´Ï´Ù. ÀÌ¹Ì MySQL À» »ç¿ëÇϱâ À§ÇÑ authority ¼³Á¤ÀÌ µÇ¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù. ÀÚ¼¼ÇÑ°ÍÀº MySQL ¸Å´º¾óÀ» ÂüÁ¶ÇϽʽÿÀ.
ÈÄÈÄ ÀÌ·¸°Ô Àû¾úÀ¸¸é ¸Â°Ô DBµµ ¼³Á¤À» ÇØÁà¾ß°ÚÁÒ?
[mysql-3.22.25]# mysqladmin create qmail [mysql-3.22.25]# mysql mysql
µé¾î°¡¼ À§¿¡ ÀûÀº popori °èÁ¤°ú qmail DB¸¦ mysql database¿¡ Àû¿ëÇÕ´Ï´Ù. À¯Àúµî·ÏÇÏ°í(user table) DB»ç¿ë°¡´ÉÇÏ°Ô Àû¾îÁÝ´Ï´Ù (db table) ÇÏÇÏ À̳ðÀº mysql manualÀ» º¸½Ã´ø°¡ ¾Æ´Ô Àú¿¡°Ô »ì¦ ¸ÞÀÏÁÖ½É Á¦°¡ Äõ¸® Àû¾îµå¸®Áö¿±. ^^
[mysql-3.22.25]# mysql -u popori qmail ---------------------------------------------------- | create table users ( | | id char(32) default '' not null, | | crypt char(32) binary default '' not null, | | passwd char(32) binary default '' not null, | | uid int(10) unsigned default '65534' not null, | | gid int(10) unsigned default '65534' not null, | | shell char(100) binary default '' not null, | | home char(100) binary default '' not null, | | start_date date default '0000-00-00' not null, | | expire_date date default '3000-12-31' not null, | | active enum('Y', 'N') default 'Y' not null, | | key id(id(10)), | | key start_date(start_date), | | key expire_date(expire_date), | | key active(active) | | ); | ---------------------------------------------------- insert into users(id, uid, gid, crypt, shell, home) values ('test', 1000, 1000, encrypt('test'), '/bin/false', '/home/muser/test');
ÀÌÁ¦ Å×½ºÆ®¸¦ ÇغÁ¾ß°ÚÁö¿©? ÄíÄí.. ¿©±â¼ ¸øÁö³ª°¨ ¾ÈµË´Ï´ç... ²À ÆнºÇϼ¼¿±. insert¹®ÀåÀ» Àß º¸¼¼¿±.
[mysql-3.22.25]# mkdir /home/muser/test [mysql-3.22.25]# /var/qmail/bin/maildirmakr /home/muser/test/Maildir [mysql-3.22.25]# echo "./Maildir/" > /home/muser/test/.qmail [mysql-3.22.25]# chown -R 1000.1000 /home/muser/test
¾Æ·¡¿Í °°Àº ¸í·ÉÀ» ÁáÀ»¶§... aliasµîÀ¸·Î ³ª¿À¸é ½ÇÆÐÇÑ°Ì´Ï´Ù. ¹Ýµå½Ã uid(1000), gid(1000)/home/muser/test ¿Í °°ÀÌ ³ª¿Í¾ß ÇÕ´Ï´Ù ^^
[mysql-3.22.25]# /var/qmail/bin/qmail-getpw test localhost
Á¦´ë·Î Å×½ºÆ®°¡ µÆ´Ù¸é ¸ÞÀÏÀ» º¸³»º¸ÁÒ
[mysql-3.22.25]# echo to:test | /var/qmail/bin/qmail-inject
º¸³½ ¸ÞÀÏÀ» ¹Þ¾Ò´ÂÁö´Â /home/muser/test/Maildir/new ¹Ø¿¡ ¹º°¡ ÆÄÀÏÀÌ »ý±â¸é Àß µÇ´Â°Ì´Ï´Ù. ÀÌÁ¦´Â ·Î±×ÀÎÀ» Çغ¸Áö¿±.
[mysql-3.22.25]# telnet localhost pop-3 +OK <15378.956132287@<domain_name> user test +OK pass test +OK ... quit [mysql-3.22.25]# _À§¿Í °°ÀÌÇؼ ok°¡ ³ª¿À³ª¿©? ¹°·Ð ok°¡ ¾Æ´Ï¶ó¸é ³ª¿Ã¶§ ±îÁ¤ ¼³Á¤À» Çϼ¼¿±. ¹º°¡ ºüÁø°Ì´Ï´Ù.
ÇÐÇÐ... ÀÌÁ¦ qmail±îÁ¤ ¼¼ÆÃÀÌ ³¡³µ°í... ÀÌÁ¦´Â IMAP ¶û PHP µîÀÌ ³²¾Ò³×¿©. IMAP ´Â Á¶±Ý º¹ÀâÇÏ´Ï Àß ºÁÁÖ¼¼¿ä.. °è¼Ó°¡ÁÒ......
ÇÏÇÏ µåµ® IMAP±îÁ¤ ¿Ô½À´Ï´Ù. ¾ó·· ¾ó·· °¡Á®.. °¥±æÀÌ ¸Ó³×¿±. ·Î±×ÀÎÀ» MYSQL¿¡¼ ÇÒ¼ö ÀÖµµ·Ï ÆÐÄ¡¸¦ ÇØÁÝ´Ï´Ù.
[imap-4.7b] patch -p1 < ../patch/imap-mysql-0.0.2.patchÀÌÁ¦ ÄÄÆÄÀÏÀ» ÇϱâÀü¿¡ ´Ù¸¥ÀÏÀ» ÇؾßÇÕ´Ï´Ù. ¿À´Ã À̱ÛÀ» ¿Ö ¾²´ÂÁö ±î¸ÔÀ¸½Ã¸é ¾ÈµÇÁÒ. ^^; qmail¿¡¼ IMAP¸¦ »ç¿ëÇϱâ À§ÇÔÀÌ´Ï.. ´ç±Ù Maildir ÆÐÄ¡¸¦ Àû¿ëÇØ Áà¾ßÇÕ´Ï´Ù. ±×·±µ¥ ³ª¿ÍÀÖ´Â MaildirÆÐÄ¡°¡ 4.5¹öÀü¿ëÀ̱¸ ÀÌ¹Ì mysqlÆÐÄ¡¸¦ Àû¿ëÇØ ¹ö·Á¼ ±×³É patch¸í·ÉÀ¸·Î ¼öÁ¤ÀÌ ¾ÈµË´Ï´Ù. -_-; À̳ðµéÀº ÀÏÀÏÀÌ ¼ÕÀ¸·Î ÆÐÄ¡¸¦ ÇØÁà¾ßÇÕ´Ï´Ù. ¹¹ ±×·¡ºÁ¾ß 15ºÐ Á¤µµ ´õ ÅõÀڵ˴ϴÙ. -_-; ¾ÈŸ±î¿î ÀÏÀÌÁö¸¸¿ä...
¸ÕÀú À̳ðÀ» Àß ÇϱâÀ§Çؼ imap-4.5_maildirpatched-1.00 À» ¹Þ¾Æ¼ DZ´Ï´Ù. ÀÌ°Ç IMAP 4.5¿¡ Maildir patch¸¦ Àû¿ëÇØ ³õÀº ÆÐÅ°Áö Àε¥... À̳ðÀ» º¸°í Ç®¸é µµ¿òÀÌ µÇÁö¿©.
ÀÚ ÀÌÁ¦ °©´Ï´Ù. ¸ÕÀú patch µð·ºÅ丮¸¦ º¸¸é IMAP¿¡¼ Maildir ÆÐÄ¡´Â ÃÑ 5°³ÀÇ ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù. ÀÌ °¢°¢ÀÇ ÆÄÀÏÀ» ÆÐÄ¡¸¦ Àû¿ëÇØ Áà¾ß Á¦´ë·Î ÀÛµ¿ÇÕ´Ï´Ù.
ÀÌ ÆÄÀÏÀ» vi·Î ¿¾îº¸¸é src/osdep/unix/env_unix.c ¸¦ °íÄ£´Ù´Â °ÍÀ» ¾Ë¼ö ÀÖ½À´Ï´Ù.
[imap-4.7b] vi src/osdep/unix/env_unix.c
[imap-4.7b] À§ÀÇ ÆÐÄ¡ ÆÄÀÏÀ» º¸¸ç env_unix.c¸¦ °íĨ´Ï´Ù. °íÄ¡´Â ¹æ¹ýÀ» ´ë° ¾Ë·Áµå¸®¸é.. ¸ÕÀú lineÀ» º¾´Ï´Ù. @@ -595,7 +596,7 @@ <-- ÀÌ·± ºÎºÐÀÌ ÀÖÁÒ? ÀÌ°Ç 595¹ø° ¶óÀÎÀ̶õ ¼Ò¸®Àε¥... ÀÌ¹Ì ÆÐÄ¡°¡ Àû¿ëµÅ Àֱ⠶§¹®¿¡ ÀÌ ±Ùó¿¡¼ ã¾Æº¸½Ã¸é µË´Ï´Ù.
{ char tmp[MAILTMPLEN]; if (!sysInbox) { /* initialize if first time */ - sprintf (tmp,"%s/%s",MAILSPOOL,myusername ()); + sprintf (tmp,"%s/Mailbox",myhomedir ()); sysInbox = cpystr (tmp); /* system inbox is from mail spool */ } return sysInbox;
´Ù½Ã À§¿Í °°Àº ºÎºÐÀÌ Àִµ¥ 595¹ø line¿¡ À§¿Í °°Àº Äڵ尡 ÀÖ°í ¾Õ¿¡ -´Â ¿ø·¡ÀÖ´Â ºÎºÐÀε¥ ÀÌ ºÎºÐÀ» »èÁ¦ÇÏ°í ´ë½Å +°¡ µé¾îÀÖ´Â ºÎºÐÀÇ ÄÚµå·Î ´ëü¸¦ Çϴ°̴ϴÙ. ^^ °£´ÜÈ÷ 1ÁÙÀÌÁÒ? ¾Õ¿¡ #´Â ´Ù ÁÖ¼®Ã³¸® µÈ°ÍÀ̹ǷΠ¼öÁ¤ÇÏÁö ¾Ê½À´Ï´Ù.
À̳ðÀº src/c-client/mail.c ¸¦ ¼öÁ¤ÇÕ´Ï´Ù. ¹æ¹ýÀº À§¿Í °°Áö¿©?
´ÙÀ½Àº 2°³ ÆÐÄ¡¸¦ Çѹø¿¡ Àû¿ëÇØ º¸ÁÒ. À½.. ¿ì¼± À̳ðÀº src/osdep/unix/maildir.c ¸¦ °íĨ´Ï´Ù. ÇÏÁö¸¸ vi·Î º¸¸é ÆÄÀÏÀÌ ¾øÁÒ? ^^; À̶§ ¾Æ±î Ç®¾î³õÀº imap-4.5_maildirpatched-1.00/src/osdep/unix/ ¿¡ °¡º¸¸é ¿©±â¿¡´Â maildir.c maildir.h °¡ ÀÖ½À´Ï´Ù ^^ ÇÏÇÏ µÎ°³¸¦ º¹»çÇØ ¿ÀÁÒ. ±×·³ 2°³ÀÇ ÆÐÄ¡´Â Àû¿ëÀÌ µÈ »óÅÂÀ̹ǷΠ³Ñ¾î°©´Ï´Ù. Ä«Ä«Ä«Ä«.
À̳𵵠src/osdep/unix/env_unix.c ¸¦ ¼öÁ¤ÇÕ´Ï´Ù. ¸¶Âù°¡ÁöÀÇ ¹æ¹ýÀ¸·Î Á¶½É½º·´°Ô ÇÕ´Ï´Ù. ºñ½ÁÇÑ ºÎºÐÀÌ ¸¹¾Æ À߸ø ÇϽǼöµµ ÀÖÀ¸´Ï±î¿ä -_-;
ÀÌÁ¦ ÀÌ ºÎºÐµéÀ» ´Ù ¸¶Ä¡¼ÌÀ¸¸é ¸¶Áö¸·À¸·Î ¼öÁ¤ÇØ¾ß µÉ ºÎºÐÀÌ 2±ºµ¥ ÀÖ½À´Ï´Ù.
Çϳª´Â maildir.c ÆÄÀÏÀÌ µé¾î°¬À¸´Ï À̳ðÀ» makefile¿¡ Ãß°¡Çؾ߰ÚÁÒ? ´ç±ÙÀÎ ¾ê±âÀÔ´Ï´Ù. src/osdep/unix/MakefileÀ» vi·Î ¿±´Ï´Ù. ±×¸®°í ´Ù¸¥ Å͹̳ÎÀ» Çϳª ´õ ¿¾î¼ imap-4.5_maildirpatched-1.00/src/osdep/unix/Makefile À» ¿±´Ï´Ù. ±×¸®°í ¿©±â¼ maildirÀ» ã¾Æ¼ ¾îµð¾îµð µé¾î°¡´ÂÁö È®ÀÎÈÄ 4.7¿¡ ÀÖ´Â Makefile¿¡µµ °°ÀÌ Àû¿ëÀ» ½ÃÄÑÁÝ´Ï´Ù. ^^ ÇÑ 4 5±ºµ¥ Á¤µµÀÔ´Ï´Ù.
ÀÌÁ¦ ¸¶Áö¸·ÀÔ´Ï´Ù. Àúµµ ÄÄÆÄÀÏÁß°£¿¡ ¿¡·¯°¡ ³ª¼ ¹ß°ßÇѰǵ¥¿ä... env_unix.c ¿¡ ¸î°¡Áö°¡ Ãß°¡µÇ¸é¼ mail.h ¸¦ °íÃÄ¾ß ÇÕ´Ï´Ù. src/c-client/mail.h¸¦ º¸½Ã¸é MESSAGECACHE¶ó´Â structure(±¸Á¶Ã¼)°¡ ÀÖ½À´Ï´Ù.
unsigned int spare : 1; /* first spare bit */ unsigned int spare2 : 1; /* second spare bit */ unsigned int spare3 : 1; /* third spare bit */ void *sparep; /* spare pointer */ unsigned long user_flags; /* user-assignable flags */ } MESSAGECACHE;
ÀÌ·¸°Ô µÇ¾îÀÖ´Â ºÎºÐ¿¡ Æ÷ÀÎÅ͸¦ Çϳª Ãß°¡½ÃÄÑÁÝ´Ï´Ù.
unsigned int spare : 1; /* first spare bit */ unsigned int spare2 : 1; /* second spare bit */ unsigned int spare3 : 1; /* third spare bit */ void *sparep; /* spare pointer */ void *maildirp; /* for the Maildir driver */ <-- ¿ä³ð. unsigned long user_flags; /* user-assignable flags */ } MESSAGECACHE;
ÇÏÇÐ ÀÌÁ¦ ³¡³µ½À´Ï´Ù µ¹¸®Áö¿©.
[imap-4.7b]# make slx
¸¦ ÇÏ°í¼´Â °íÃÄ ÁÖ¾î¾ßÇÒ ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù. c-client ·Î µð·ºÅ丮¸¦ º¯°æÇÑ ÈÄ¿¡
[imap-4.7b]# cd c-client
°Å±â¿¡¼ CFLAGS ÆÄÀÏÀ» ÆíÁýÇϼ¼¿ä. ÇÑÁÙÂ¥¸°µ¥ ³¡¿¡ º¸¸é -DSQLSERVERFILE="/etc/imap/sqlserver" ¸¦ -DSQLSERVERFILE="\"/var/qmail/control/sqlserver\"" ·Î ¹Ù²Ù½Ê½Ã¿ä. Ȥ sqlserver¸¦ ƯÁ¤ÇÑ µð·ºÅ丮¿¡ ¸¸µé¾ú´Ù¸é °Å±â·Î ¹Ù²Ù°í¿ä. ±Ùµ¥ \" ¸¦ ÀØÁö ¸¶½Ê½Ã¿ä. ÄÄÆÄÀϽà ¿¡·¯ ³³´Ï´Ù. ±×¸®°í ÀÌ Å±׿¡ ¿µÇâÀ» ¹Þ´Â°ÍÀº mysql.c À̹ǷΠtouch ¸¦ ÇØÁÖ¾î¾ß ÄÄÆÄÀÏÀ» ÇÕ´Ï´Ù. (²À!)
[c-client]# touch mysql.c
ÀÌ°ÍÀº make slx ¸¦ ÇÏ¸é ´Ù½Ã µÇµ¹¾Æ °©´Ï´Ù. Ȥ ÀçÄÄÆÄÀÏ ÇÒ ÀÖÀ» °æ¿ì ´Ù½Ã µ¹·ÁÁÖ¾î¾ß ÇÕ´Ï´Ù. ±×³É make ÇÏ¸é »ó°ü¾ø±¸¿ä. ´ÙÀ½¿¡´Â °°Àº µð·ºÅ丮¿¡ linkage.c ¿Í linkage.h °¡ ÀÖ½À´Ï´Ù. ±× ÆÄÀÏÀÇ ²À´ë±â¿¡ linkage.c ´Â
mail_link (&maildirdriver);
¸¦ »ðÀÔÇÏ°í linkage.h ¿¡´Â ¾Æ·¡¸¦ »ðÀÔÇÕ´Ï´Ù.
extern DRIVER maildirdriver;
±×¸®°í´Â »óÀ§ µð·ºÅ丮·Î ¿Ã¶ó°¡¼
[imap-4.7b] # rm imapd/imap.o popd/*.o mtest/*.o
¸¦ ½ÇÇàÇÏ¿© ÁØÈÄ¿¡ ´Ù½Ã make ¸¦ ÇÏ¸é º¯°æµÈ ºÎºÐ¿¡ ´ëÇÑ ÄÄÆÄÀÏÀ» ´Ù½Ã ÇÕ´Ï´Ù. ÀÌÁ¦ aeromail À» ÅëÇؼ Á¢¼ÓÇϸé IMAP °ú MySQL ÀÌ Àû¿ëµÈ ÇÁ·Î±×·¥ÀÌ ±¸µ¿ÇÒ°Í ÀÔ´Ï´Ù.
[imap-4.7b]# make [imap-4.7b]# cp -r imap-4.7b /usr/local/imap [imap-4.7b]# ln -s /usr/local/imap/c-client /usr/local/imap/include [imap-4.7b]# ln -s /usr/local/imap/c-client /usr/local/imap/lib [imap-4.7b]# cp /usr/local/imap/ipopd/ipop2d /usr/sbin [imap-4.7b]# cp /usr/local/imap/ipopd/ipop3d /usr/sbin [imap-4.7b]# cp /usr/local/imap/imapd/imapd /usr/sbin
ÁÖ¼®À¸·Î ¸·ÇôÀÖ´Ù¸é Ç®¾îÁÝ´Ï´Ù.
[imap-4.7b]# vi /etc/services pop-2 pop-3 imap µî·Ï
¸ÕÀú qmail¼³Ä¡½Ã ¼öÁ¤Çß´ø pop-3´Â °íÄ¡¸é ¾ÈµË´Ï´Ù. [imap-4.7b]# vi /etc/inetd.conf pop-2 pop-3 imap µî·Ï µ¥¸óÀ» ´Ù½Ã¶ç¿ì°í
[imap-4.7b]# killall -HUP inetdIMAPµ¥¸óÀÌ Àß µÇ´ÂÁö È®ÀÎÀ» ÇÏÁÒ..
[imap-4.7b]# telnet localhost 143ÇÏÇÏ ¹º°¡ ³ª¿À¸é Á¦´ë·Î µÈ°Ì´Ï´Ù. ÀÌÁ¦´Â PHP¸¦ ±òÁ®
ÇäÇä... µåµ® ¸¶Áö¸·ÀÔ´Ï´Ù. À½... Èûµé±º¿©....
[php-3.15]# ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-imap=/usr/local/imap --with-config-file-path=/usr/local/lib --enable-track-vars [php-3.15]# make [php-3.15]# make install
ÇÏÇÏ °£´ÜÇÏÁÒ? PHPµµ ³¡³µ½À´Ï´Ù.