Sendmail 8.12.8 + Berkeley DB 4.1.25 ÄÄÆÄÀÏ ¸Þ´º¾ó (Ver 1.0)
|
|
º» ¹®¼´Â AIX 4.3.3 ȯ°æ¿¡¼ Sendmail 8.12.8 ¹öÀüÀ» ÄÄÆÄÀÏÇؼ ¼³Ä¡ÇÏ´Â ¹æ¹ýÀ» ¼³¸íÇϱâ À§Çؼ ¸¸µé¾îÁ³´Ù. Sendmail 8.12.8Àº 2003³â 3¿ù 14ÀÏ ÇöÀç ÃֽŹöÀüÀ̸ç, Berkeley DB 4.1.25¿Í ÇÔ²² ÄÄÆÄÀÏÀ» ÇÏ¿´´Ù.
|
S/W | Version | ºñ°í |
IBM AIX | 4.3.3 | ML #9 or higher |
sendmail | 8.12.8 | |
GNU gcc | 2.95.3 | or higher |
GNU make | 3.79.1 | or higher |
GNU groff | 1.11.1 | |
GNU m4 | 1.4 | ¹Ýµå½Ã GNU m4¸¦ ÄÄÆÄÀÏ/¼³Ä¡Çؼ »ç¿ëÇϱ⠹ٶõ´Ù. AIX¿¡ ±âº»ÀûÀ¸·Î ±ò·ÁÀÖ´Â m4¸¦ »ç¿ëÇÏ°Ô µÇ¸é Parsing ¿¡·¯°¡ ¹ß»ýÇÑ´Ù. |
|
À§ ÆÄÀÏÁß¿¡¼ Sendmail 8.12.8Àº ´ç¿¬È÷ ¼Ò½ºÄڵ带 ´Ù¿î·ÎµåÇؼ ÄÄÆÄÀÏÀ» ÇÒ °ÍÀÌ°í, GNU m4´Â www.bullfreeware.com¿¡¼ binary ¹öÀüÀ» ±¸ÇÒ¼ö ¾øÀ¸¹Ç·Î, ¼Ò½ºÄڵ带 ´Ù¿î·Îµå ¹Þ¾Æ¼ ÄÄÆÄÀÏÀ» Çؾ߸¸ ÇÑ´Ù. ±×¿Ü¿¡ gcc, make, groff´Â À§ À¥½ÎÀÌÆ®¿¡¼ ¹ÙÀ̳ʸ® ÆÄÀÏÀ» ´Ù¿î·Îµå ¹Þ¾Æ¼ ÄÄÆÄÀÏÀÌ¾Æ´Ñ ÀνºÅçÀ» ÇØÁÖ¸é µÈ´Ù. C ÄÄÆÄÀÏ·¯´Â ²À GNU gcc¸¦ »ç¿ëÇϵµ·Ï ÇÏÀÚ.
|
1. Sendmail ÃֽŹöÀü
|
2003/03/14 8.12.8 ¹öÀü (¾à 1.8 MB)
|
|
2. ÄÄÆÄÀÏ ¹× ¼³Ä¡È¯°æ
|
OS´Â AIX 4.3.3 & ML #10,
C ÄÄÆÄÀÏ·¯´Â GNU gcc 2.95.3,
Make´Â GNU make 3.79.1,
GNU groff,
GNU m4 (AIX ¿¡¼ Á¦°øÇØÁÖ´Â m4´Â sendmailÀÇ .mc ÆÄÀÏÀ» ÀνÄÇÒ¶§ ¹®Á¦°¡ ÀÖ¾ú´Ù. ±×·¡¼ ÇÊÀÚ´Â GNU m4¸¦ ¼³Ä¡ÇÏ¿© ÀÌ ¹®Á¦¸¦ ÇØ°áÇÏ¿´´Ù. ÀÌ ¹®Á¦´Â
sendmailÀÇ ¸Þ´º¾ó ÆÄÀÏ¿¡µµ ¾ð±ÞÀÌ µÇ¾î ÀÖ´Ù.)
À§ÀÇ ÅøµéÀº ²À ÇÊ¿äÇϹǷΠ¹Ì¸® ¼³Ä¡Åä·Ï ÇÏÀÚ. ±×¸®°í ´ÙÀ½°ú °°ÀÌ È¯°æº¯¼ö¸¦ ¼³Á¤Çؼ ÄÄÆÄÀÏÀ» Çϵµ·Ï ÇÏÀÚ. ¸¸¾à¿¡ kshÀ» »ç¿ëÇÑ´Ù¸é .profileÀÇ
PATH=/usr/local/bin:.............................
ÀÌ·±½ÄÀ¸·Î /usr/local/binÀ» °¡Àå ¾Õ¿¡ ÁÖ¸é µÉ°ÍÀÌ´Ù.
|
mail :/> which gcc
/usr/local/bin/gcc
mail :/> which make
/usr/local/bin/make
mail :/> which groff
/usr/local/bin/groff
mail :/> which m4
/usr/local/bin/m4
mail :/> id
uid=0(root) gid=0(system)
|
|
3. Berkeley DB 4.1.25 ÄÄÆÄÀÏ ¹× ¼³Ä¡ (root·Î ¼³Ä¡)
sendmail ÇÁ·Î±×·¥Àº DB °ü¸®¸¦ Berkeley DB¸¦ »ç¿ëÇÏ¿© °ü¸®ÇÒ ¼ö°¡ ÀÖ´Ù. µû¶ó¼, Berkeley DB»ç¿ëÇÏ°íÀÚ ÇÑ´Ù¸é, sendmailÀÇ ÀνºÅç ÀÌÀü¿¡ ÄÄÆÄÀÏÇؼ ¼³Ä¡¸¦ ÇØÁà¾ß ÇÑ´Ù. Berkeley DB¸¦ °ø½ÄÀûÀ¸·Î ¹èÆ÷ÇÏ´Â À¥½ÎÀÌÆ®´Â http://www.sleepycat.com/ ÀÌ°í, ÀÌ´Â Open Source·Î¼ ´©±¸³ª ÀÚÀ¯·Ó°Ô »ç¿ëÀÌ °¡´ÉÇÏ´Ù. 2003³â 3¿ù 9ÀÏ ÇöÀç ÃֽŹöÀüÀº 4.1.25 ¹öÀüÀÌ´Ù. ÇÊÀÚ´Â AIX 4.3.3¿¡¼ 4.1.24 ¹öÀüÀ» »ç¿ëÇؼ sendmailÀÇ ÄÄÆÄÀÏÀ» ½ÃµµÇÏ¿´À¸³ª, db->open() ÇÔ¼öÀÇ ÀÎÀÚÀÇ °¹¼ö°¡ ÀÏÄ¡ÇÏÁö ¾Ê´Â ¹®Á¦·Î ÀÎÇؼ ½ÇÆÐÇÏ¿´´Ù. ÀÌ ¹®Á¦´Â news group ¿¡¼µµ ±× »ç·Ê°¡ ¿©·¯¹ø ¾ð±ÞÀÌ µÇ¾î ÀÖ¾ú´Ù. ±×·¡¼ AIX 4.3.3¿¡¼ ÄÄÆÄÀÏÇÒ¶§´Â Berkeley DB 3.3.11 ¹öÀüÀ» »ç¿ëÇßÁö¸¸, 4.1.25 ¹öÀü¿¡¼´Â ÀÌ ºÎºÐÀÌ ´ÙÇེ·´°Ôµµ Àß ÇØ°áÀÌ µÈµíÇؼ 4.1.25 ¹öÀüÀ» »ç¿ëÇؼ ÄÄÆÄÀÏÀ» ÇÏ¿´´Ù.
Download Site: http://www.sleepycat.com/download/patchlogs.shtml
|
mail:/down/sendmail-8.12.8> ls -l
total 8840
-rw-r--r-- 1 root sys 3056570 Mar 13 13:16 db-4.1.25.NC.tar.gz
-rw-r--r-- 1 root sys 1465072 Mar 13 13:15 sendmail_efix.tar.Z
mail:/down/sendmail-8.12.8> gzip -dc db-4.1.25.NC.tar.gz | tar xvf -
mail:/down/sendmail-8.12.8/db-4.1.25.NC>
mail:/down/sendmail-8.12.8/db-4.1.25.NC> more README
²¿¿À¿Á ¸Þ´º¾óÀº Àд½À°üÀ» °®ÀÚ.
mail:/down/sendmail-8.12.8/db-4.1.25.NC> cd dist
mail:/down/sendmail-8.12.8/db-4.1.25.NC/dist> ./configure CC=gcc
mail:/down/sendmail-8.12.8/db-4.1.25.NC/dist> make
mail:/down/sendmail-8.12.8/db-4.1.25.NC/dist> make install
mail:/down/sendmail-8.12.8/db-4.1.25.NC/dist> cd /usr/local
mail:/usr/local> ls -l
...
drwxr-xr-x 6 root system 512 Mar 14 17:19 BerkeleyDB.4.1
...
|
|
4. sendmail µð·ºÅ丮ÀÇ º¸¾È°ü·Ã ÆÛ¹Ì¼Ç È®ÀÎ
|
mail:/> chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
chmod: /etc/mail: No such file or directory
mail:/> mkdir /etc/mail
mail:/> chmod go-w /etc/mail
mail :/> chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
|
ÄÄÆÄÀÏÀ» ÇÏ°í, ÀνºÅçÀ» ¿Ï·áÇÑ ÈÄ¿¡ µð·ºÅ丮 ¼³Á¤ÀÌ Á¦´ë·Î µÇ¾î ÀÖ´ÂÁö È®ÀÎÇϱâ À§ÇÏ¿© ´ÙÀ½ÀÇ ¸í·É¾î¸¦ ½ÇÇà½ÃŲ´Ù.
|
# sendmail -v -bi
WARNING: writable directory /etc
WARNING: writable directory /var/spool/mqueue
|
¿Í °°Àº ¸Þ½ÃÁö¸¦ »Ñ·ÁÁÙ °ÍÀÌ´Ù. ±×·¯¸é, ´Ù½Ã Æ۹̼ÇÀ» È®ÀÎÇؼ ¿Ã¹Ù¸£°Ô ¼³Á¤À» Çϱ⸦ ¹Ù¶õ´Ù.
|
|
5. Sendmail 8.12.8 ¾ÐÃàÇ®±â
Unix ¿¡¼ ÇÁ·Î±×·¥À» ÄÄÆÄÀÏÇÒ¶§ °¡Àå Áß¿äÇÑ °ÍÀº ÄÄÆÄÀÏÀ» ÇϱâÀü¿¡ ²À README ÆÄÀÏÀ» ÀÐ¾î º¸´Â°ÍÀÌ´Ù. ´ëºÎºÐÀÇ »ç¿ëÀÚµéÀÌ ÀÌ°ÍÀÌ ±ÍÂú¾Æ¼ °Ç³Ê¶Û·Á°í ÇÏÁö¸¸, ÀÌ°Ç Á¤¸» À߸øµÈ °ÍÀÌ´Ù. ²À Àо±â ¹Ù¶õ´Ù.
|
mail:/> cd /down/sendmail-8.12.8
mail:/down/sendmail-8.12.8> gzip -dc sendmail.8.12.8.tar.gz | tar xvf -
mail:/down/sendmail-8.12.8> cd sendmail-8.12.8
mail:/down/sendmail-8.12.8/sendmail-8.12.8> more SECURITY (°·ÂÈ÷ Àо°ÍÀ» ±Ç°í, Àбâ½ÈÀ¸¸é ÄÄÆÄÀÏ ±×¸¸ µÑ°Í...)
sendmail : a set-group-ID (default group: smmsp, recommended gid: 25) ·Î ¼³Á¤ÇÑ´Ù. ±×¸®°í ´ÙÀ½°ú °°ÀÌ chmod, chown À» °®°ÔµÈ´Ù.
-r-xr-sr-x root smmsp ... /PATH/TO/sendmail
drwxrwx--- smmsp smmsp ... /var/spool/clientmqueue
drwx------ root wheel ... /var/spool/mqueue
-r--r--r-- root wheel ... /etc/mail/sendmail.cf
-r--r--r-- root wheel ... /etc/mail/submit.cf
|
[ÁÖÀÇ»çÇ×: ¸î¸î OS¿¡¼´Â 'wheel' ÀÌ ¾ø´Â´ë½Å, bin, root °¡ ´ë½Å ¾²¿©µµ µÈ´Ù. ÀÌÁ¡Àº Áß¿äÄ¡ ¾Ê´Ù. µû¶ó¼, AIX¿¡¼µµ wheel ´ë½Å bin À» »ç¿ëÇÏ¿© groupÀ» ÁöÁ¤Çϵµ·Ï ÇÏÀÚ.] ±×¸®°í, sendmail µ¥¸óÀº root ·Î ½ÇÇàÀÌ µÇ¾î¾ß¸¸ ÇÑ´Ù.
# /usr/lib/sendmail -L sm-mta -bd -q1h
or
# /usr/sbin/sendmail -L sm-mta -bd -q1h
[ÁÖÀÇ»çÇ×: inetd ¸ðµå(ÁÁÀº ¹æ¹ýÀº ¾Æ´Ô)·Î sendmail À» µ¹¸°´Ù¸é, -bs ¿É¼Ç¿Ü¿¡ -Am ¿É¼ÇÀ» Áà¾ß¸¸ ÇÑ´Ù.]
¸ÞÀÏÀÌ queue¿¡ ¸¹ÀÌ ½×ÀÌ´Â °æ¿ì, crontab¿¡¼ ´ÙÀ½°ú °°ÀÌ clean ½ÃÄÑÁÖ´Â°Ô ÁÁ´Ù.
/usr/lib/sendmail -L sm-msp-queue -Ac -q30m
@ Summary
* sendmail.cf (MTA: Mail Transmission agent)
* submit.cf (MSP : Mail Submission Program)
# /usr/lib/sendmail -L sm-msp-queue -Ac -q30m
mail:/down/sendmail-8.12.8/sendmail-8.12.8/sendmail> vi README (°·ÂÈ÷ Àо°ÍÀ» ±Ç°í, Àбâ½ÈÀ¸¸é ÄÄÆÄÀÏ ±×¸¸ µÑ°Í...)
|
|
6. Sendmail 8.12.8 ÄÄÆÄÀÏÇϱâ
Unix ¿¡¼ ÇÁ·Î±×·¥À» ÄÄÆÄÀÏÇÒ¶§ °¡Àå Áß¿äÇÑ °ÍÀº ÄÄÆÄÀÏÀ» ÇϱâÀü¿¡ ²À README ÆÄÀÏÀ» ÀÐ¾î º¸´Â°ÍÀÌ´Ù. ´ëºÎºÐÀÇ »ç¿ëÀÚµéÀÌ ÀÌ°ÍÀÌ ±ÍÂú¾Æ¼ °Ç³Ê¶Û·Á°í ÇÏÁö¸¸, ÀÌ°Ç Á¤¸» À߸øµÈ °ÍÀÌ´Ù. ²À Àо±â ¹Ù¶õ´Ù.
|
@ GNU gcc¸¦ »ç¿ëÇÏ°íÀÚ ÇÒ¶§,
PATH¿¡ /usr/local/bin °æ·Î¸¦ ¹Ì¸® ¼³Á¤ÇصÎÀÚ.
mail:/down/sendmail-8.12.8/sendmail-8.12.8/sendmail> vi ../devtools/OS/AIX.4.3
...
gcc¸¦ ÄÄÆÄÀÏ·¯·Î »ç¿ëÇϵµ·Ï ÇϱâÀ§Çؼ ¾Æ·¡Ã³·³
define(`confCC', `/usr/bin/xlc') -> define(`confCC', `/usr/local/bin/gcc') ·Î °íÄ¡°í,
ÄÄÆÄÀϵµÁß ld: 0711-317 ERROR: Undefined symbol: .pthread_mutexattr_init °ü·Ã ¿¡·¯¸¦ ¾ø¾Ö±â À§Çؼ
define(`confLIBS', `-ldbm') -> define(`confLIBS', `-ldbm -lpthread') ·Î °íÄ¡°í
Berkeley DB.4.1¸¦ À§Çؼ ´ÙÀ½À» Ãß°¡ (¹°·Ð Berkeley DB 4.1´Â ´ÙÀ½ÀÇ µð·ºÅ丮¿¡ ¹Ì¸® ÀνºÅçÀÌ µÇ¾î ÀÖ¾î¾ß ÇÑ´Ù.)
APPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB.4.1/include')
APPENDDEF(`confLIBDIRS', `-L/usr/local/BerkeleyDB.4.1/lib')
ÀÌÁ¦´Â ´ÙÀ½°ú °°ÀÌ Build ÇÁ·Î±×·¥À» µ¹¸®±â ¹Ù¶õ´Ù.
mail:/down/sendmail-8.12.8/sendmail-8.12.8/sendmail> sh Build -c -f ../devtools/OS/AIX.4.3
ÇÊÀÚ´Â GNU gcc¸¦ ¼±È£ÇÏ´Â ±î´ß¿¡ gcc ¿É¼ÇÀ» »ç¿ëÅä·Ï ¼±¾ðÀ» ÇØÁá´Ù. gcc¸¦ »ç¿ëÇϱâ À§Çؼ´Â GNU makeµµ ¼³Ä¡µÇ¾î ÀÖ¾î¾ßÇÑ´Ù. ¿Ö³ÄÇϸé, GNU gcc´Â GNU makeÇÏ°í ±ÃÇÕÀÌ Àß ¸Â´Â´Ù.·áµÇ¾ú´Ù. ±× ¹Û¿¡ GNU groff, GNU m4 ÇÁ·Î±×·¥µµ ²À ¹Ì¸® ¼³Ä¡ÇØ µÖ¾ß¸¸ ÇÑ´Ù. ƯÈ÷ groff´Â ÇʼöÀûÀÌ´Ù. GNU m4µµ ifdef ÆĽÌÇÒ¶§ ¹®Á¦°¡ ¹ß°ßµÇ¾î ²À AIX m4°¡ ¾Æ´Ñ, GNU m4¸¦ /usr/local/bin ¿¡ ±ò¾Æ¼ »ç¿ëÇϱ⠹ٶõ´Ù. ±×¸®°í, Ãʺ¸ÀÚµéÀÌ ½Ç¼öÇϱ⠽¬¿î °æ¿ì´Â ²À ȯ°æº¯¼ö PATHÀÇ °¡Àå óÀ½¿¡ /usr/local/bin ÀÌ ¿Àµµ·Ï ÇÏ¿©¼ /usr/local/bin/m4, make°¡ ½ÇÇàµÇµµ·Ï ÇÏ¿©¾ß¸¸ÇÑ´Ù. ±×·¸Áö ¾ÊÀ¸¸é AIX ³»¿¡ ÀÖ´Â m4, make¸¦ È£ÃâÇÒ °ÍÀÌ´Ù.
|
|
7. Sendmail.cf »ý¼ºÇϱâ
|
mail:/down/sendmail-8.12.8/sendmail-8.12.8/sendmail> cd ../cf/cf
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf/cf> more README
|
Sendmail ¹èÆ÷º»¿¡´Â ¾Ö¼®ÇÏ°Ôµµ cf/cf/aix433.mc ÆÄÀÏÀÌ ¾ø´Ù. ÀÌ ÆÄÀÏÀº AIX 4.3.3¿¡¼ /usr/samples/tcpip/sendmai/cf/aix433.mcÀÇ ¿¹Á¦ÆÄÀÏÀ» º¹»çÇؼ ¾²¸é ÇØ°áÇÒ ¼ö ÀÖ´Ù. ±×¸®°í ´ÙÀ½°ú °°ÀÌ ÆíÁýÀ» Çؼ »ç¿ëÇϱ⠹ٶõ´Ù.
|
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf/cf> cp /usr/samples/tcpip/sendmail/cf/aix433.mc ./aix4.mc
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf/cf> vi aix4.mc
...
...
divert(0)dnl
OSTYPE(aix4)dnl
FEATURE(allmasquerade)dnl
FEATURE(`access_db', `hash -T /etc/mail/access')dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(uucp)
|
¿Í °°ÀÌ »¬°Ç »©°í, ¼öÁ¤À» ÇÑ ´ÙÀ½¿¡ ¸ðÁ¶¸® Áö¿î´Ù. Áö¿ìÁö ¾Ê°í # ·Î comment ó¸® Çؼ´Â ¾ÈµÈ´Ù. ÇÊÀÚ°¡ Çغ» ¹Ù·Î´Â # 󸮸¦ Çصµ Àִ°ÍÀ¸·Î ÀνÄÀ»ÇÑ´Ù. OSTYPE(aix43)dnl Àº OSTYPE(aix4)dnl À¸·Î ¹Ù²Û´Ù. ±× ÀÌÀ¯´Â ÀÌ°÷¿¡¼´Â ./ostype/aix4.m4ÀÇ ÆÄÀÏÀ» ÂüÁ¶ÇÏ°Ô µÇ´Âµ¥, ÆÄÀϸíÀ» Àß Ã£µµ·Ï Çϱâ À§ÇÔÀÌ´Ù. ƯÈ÷, FEATURE(promiscuous_relay)dnl ºÎºÐÀº relay-host ¸¦ enable Çϴ°ÍÀ¸·Î¼ Àý´ë »ðÀÔ½ÃÄѼ´Â ¾ÈµÈ´Ù. ÀÌ°ÍÀ» »ðÀÔÇϰԵǸé, ÄÄÆÄÀÏµÈ sendmail Àº relay-host¸¦ Çã¿ëÇÏ°Ô µÇ¾î ¼ö¸¹Àº ½ºÆÔ¸ÞÀÏÀÇ Áß°£ °æÀ¯Áö·Î °í½º¶õÈ÷ »ç¿ëµÇ°Ô µÇ°í, ¾î´À³¯ °©Àڱ⠱¹Á¤¿øÀ¸·ÎºÎÅÍ ÀüÈ°¡ ¿Ã¼öµµ ÀÖ´Ù. ½ÇÁ¦, ÀÌ·± »ç·Ê°¡ ¸¹´Ù. FEATURE(`access_db', `hash -T /etc/mail/access')dnl ºÎºÐÀº Berkeley DB¸¦ »ç¿ëÇؼ /etc/mail/access ÆÄÀÏÀ» »ç¿ëÇϵµ·Ï Çϱâ À§ÇÔÀÌ´Ù. ÇÊÀÚ´Â, ÀÌ ºÎºÐÀ» »©¸Ô°í Çؼ, access ¿¡ µî·ÏÇÑ RELAY °¡ Àß µÇÁú ¾Ê¾Æ¼ ¸¹Àº °í»ýÀ» ÇÏ¿´´Ù.
|
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf/cf> cd ..
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf> m4 ./m4/cf.m4 ./cf/aix4.mc > sendmail.cf
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf> ls -l sendmail.cf
-rw-r--r-- 1 root system 58049 Mar 14 17:41 sendmail.cf
|
* ÁÖÀÇ»çÇ×
/usr/bin/m4:./m4/cf.m4:29 can't open file
include(../m4/cfhead.m4)
¿Í °°ÀÌ ¿¡·¯°¡ ¹ß»ýÇϸé, /bin/m4°¡ 'ifdef'¸¦ Á¦´ë·Î ó¸®Ä¡ ¸øÇÏ´Â AIX m4ÀÇ ¸ÞÄ¿´ÏÁò ¹®Á¦ÀÌ´Ù. ÀÌ ¹®Á¦¸¦ ÇØ°áÇϱâ À§Çؼ´Â À§¿¡¼µµ ÇÊÀÚ°¡ ¸¹ÀÌ ¾ð±ÞÇÏ¿´µíÀÌ ftp.gnu.org/pub/gnu¿¡¼ GNU m4¸¦ ´Ù¿î·Îµå ¹Þ¾Æ¼ ¼Ò½º ÄÄÆÄÀÏÀ» ÇÏ°í, ±× m4¸¦ ¾´´Ù. Ãʺ¸ÀÚµéÀº GNU m4¸¦ ÄÄÆÄÀÏÇÏ´Â°Ô ¾î·Á¿ï ¼öµµ ÀÖÀ»°ÍÀÌ´Ù. °£´ÜÇÏ´Ù. ´ÙÀ½°ú °°ÀÌ Çϱ⠹ٶõ´Ù.
# gzip -dc m4-1.4.tar.gz | tar xvf -
# cd m4-1.4
# ./configure CC=gcc
# make
# make install
³¡~~~. ÀÌ ¾ó¸¶³ª °£´ÜÇÑ°¡!!! GNU S/W µéÀº autoconf ·Î ÄÄÆÄÀÏÀ» ÇÏ°Ô²û µÇ¾î ÀÖ¾î¼ ¹«Ã´ Æí¸®ÇÏ´Ù. ±×·¡¼ ÇÊÀÚ°¡ CompileÀ» ÁÁ¾ÆÇÏ´Â µí ÇÏ´Ù.
GNU m4¸¦ ¼³Ä¡ÇÑÈÄ,
# which m4
/usr/local/bin/m4
ÀÌ·¸°Ô ³ª¿À°Ô ÇϱâÀ§Çؼ´Â PATH=/usr/local/bin °ú°°ÀÌ ¸Ç ¾Õ¿¡ ȯ°æº¯¼ö¸¦ ³Ö¾îÁà¾ß ÇÑ´Ù...
ÀÚ, ÀÌÁ¦ºÎÅÍ´Â sendmail.cf¸¦ ¸¸µé¾îº¸ÀÚ.
|
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf> cd cf
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf/cf> cp ../sendmail.cf .
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf/cf> sh Build install-cf
Using M4=/usr/local/bin/m4
../../devtools/bin/install.sh -c -o root -g bin -m 0444 sendmail.cf /etc/mail/sendmail.cf
../../devtools/bin/install.sh -c -o root -g bin -m 0444 submit.cf /etc/mail/submit.cf
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf/cf> ls -l /etc/mail
total 200
-r--r--r-- 1 root bin 58049 Mar 14 17:42 sendmail.cf
-r--r--r-- 1 root bin 38840 Mar 14 17:42 submit.cf
|
ÀÌ·¸°Ô Çؼ sendmail.cf, submit.cf ÀÇ »ý¼ºÀÌ ³¡³µ´Ù.
|
|
8. Sendmail º¸¾È°ü·Ã µð·ºÅ丮 ¼³Á¤ ¹× À¯Àú, ±×·ì ¼³Á¤Çϱâ
|
User ID »ý¼º: smmsp, id # : 25
Group ID »ý¼º: smmsp, gid # : 25
|
mail:/> id smmsp
uid=25(smmsp) gid=25(smmsp)
¿Í °°ÀÌ »ý¼ºÀ» Çؼ ¾Æ·¡ÀÇ ±ÇÇÑÀ» ¼³Á¤ÇÑ´Ù. À§¿¡¼ 25¹øÀÇ Àǹ̴ sendmail port¸¦ ÀÏÄ´´Ù. ±×³É ½±°Ô ÀÌÇØÇϱâ À§Çؼ ÀÌ ¹øÈ£¸¦ »ç¿ëÅä·Ï ÇÏ´Â °Í °°´Ù.
-r-xr-sr-x root smmsp ... /usr/sbin/sendmail
drwxrwx--- smmsp smmsp ... /var/spool/clientmqueue
drwx------ root bin ... /var/spool/mqueue
-r--r--r-- root bin ... /etc/mail/sendmail.cf
-r--r--r-- root bin ... /etc/mail/submit.cf
|
|
9. Sendmail ÀνºÅçÇϱâ
Unix ¿¡¼ ÇÁ·Î±×·¥À» ÄÄÆÄÀÏÇÒ¶§ °¡Àå Áß¿äÇÑ °ÍÀº ÄÄÆÄÀÏÀ» ÇϱâÀü¿¡ ²À README ÆÄÀÏÀ» ÀÐ¾î º¸´Â°ÍÀÌ´Ù. ´ëºÎºÐÀÇ »ç¿ëÀÚµéÀÌ ÀÌ°ÍÀÌ ±ÍÂú¾Æ¼ °Ç³Ê¶Û·Á°í ÇÏÁö¸¸, ÀÌ°Ç Á¤¸» À߸øµÈ °ÍÀÌ´Ù. ²À Àо±â ¹Ù¶õ´Ù.
|
mail:/down/sendmail-8.12.8/sendmail-8.12.8/cf/cf> cd ../..
mail:/down/sendmail-8.12.8/sendmail-8.12.8> sh Build install
|
|
10. Sendmail utility(makemap, mailstats) ¼³Á¤
makemapÀº ½ºÆÔ ¸ÞÀÏÀ» Â÷´ÜÇϰųª relay¸¦ Çã¿ëÇϴµ¥ »ç¿ëÇÏ´Â accessDB¸¦ »ý¼ºÇÏ´Â ÇÁ·Î±×·¥ÀÌ´Ù. ÇÊÀÚ°¡ À§¿¡¼µµ ¸»ÇßµíÀÌ, sendmailÀº Berkeley DB¸¦ »ç¿ëÇؼ DB¸¦ °ü¸®ÇÑ´Ù.
|
mail:/down/sendmail-8.12.8/sendmail-8.12.8> cd makemap
mail:/down/sendmail-8.12.8/sendmail-8.12.8/makemap> sh Build -c -f ../devtools/OS/AIX.4.3
mail:/down/sendmail-8.12.8/sendmail-8.12.8/makemap> sh Build install
Configuration: pfx=, os=AIX, rel=4.3.3, rbase=4, rroot=4.3, arch=PPC, sfx=, variant=optimized
Making in /down/sendmail-8.12.8/sendmail-8.12.8/obj.AIX.4.3.3.PPC/makemap
/usr/ucb/install -c -o bin -g bin -m 555 makemap /usr/sbin
/usr/ucb/install -c -o bin -g bin -m 444 makemap.0 /usr/share/man/cat8/makemap.8
mail:/down/sendmail-8.12.8/sendmail-8.12.8/makemap> cd ../mailstats
mail:/down/sendmail-8.12.8/sendmail-8.12.8/mailstats> sh Build -c -f ../devtools/OS/AIX.4.3
mail:/down/sendmail-8.12.8/sendmail-8.12.8/mailstats> sh Build install
Configuration: pfx=, os=AIX, rel=4.3.3, rbase=4, rroot=4.3, arch=PPC, sfx=, variant=optimized
Making in /down/sendmail-8.12.8/sendmail-8.12.8/obj.AIX.4.3.3.PPC/mailstats
/usr/ucb/install -c -o bin -g bin -m 555 mailstats /usr/sbin
/usr/ucb/install -c -o bin -g bin -m 444 mailstats.0 /usr/share/man/cat8/mailstats.8
|
ÀÌÁ¦´Â access, relay-domains ÆÄÀÏÀ» »ý¼ºÇÑ´Ù.
|
mail:/down/sendmail-8.12.8/sendmail-8.12.8/mailstats> cd /etc/mail
mail:/etc/mail> touch access relay-domains
access : spam relay¸¦ ip, hostnameÀ¸·Î Á¦¾îÇϱâ À§ÇÑ°Í.
relay-domain : domain name º°·Î relay¸¦ Çã¿ëÇϱâ À§ÇÑ°Í.
mail :/etc/mail> vi local-host-names
mail
mail.jkkang.net
|
À§ÀÇ hostname ¶õ¿¡ ÀÚ½ÅÀÇ hostnameÀ» ±â·ÏÇÑ´Ù. local-host-names ÆÄÀÏÀº sendmail¿¡¼ ¹Þ¾ÆµéÀÏ ¸ÞÀÏÀÇ µµ¸ÞÀΰú È£½ºÆ®À̸§À» ¸»ÇÑ´Ù. ÀÌ ÆÄÀÏÀº ¿©·¯ÁÖ¼Ò·Î ¿À´Â ¸ÞÀÏÀ» ÁöÁ¤ÇÑ ¼ö½ÅÀÚ°¡ ¹Þµµ·Ï ¼³Á¤ÇÏ´Â ±â´ÉÀÌ´Ù. ¹Ýµå½Ã sendmail µ¥¸óÀ» restart ½ÃÄÑÁà¾ß ÇÑ´Ù. sendmailÀº ÀÌ ÆÄÀÏ¿¡ ÀÖ´Â µµ¸ÞÀÎÀÇ ¸ÞÀÏÀº ÀڱⰡ ÃÖÁ¾¼ö½ÅÁö¶ó°í ÀνÄÇϰԵȴÙ. µû¶ó¼ À¥È£½ºÆÃÀ» ÇÒ¶§¿¡´Â °í°´ÀÇ µµ¸ÞÀÎÀ» ¹Ýµå½Ã ÀÌ ÆÄÀÏ¿¡ µî·ÏÀ» ÇØÁà¾ß ÇÑ´Ù.
|
mail :/etc/mail> vi access
jkkang65@hanmail.net OK
jkkang65@mail.com REJECT
sendmail.domain REJECT
210.117.132.23 RELAY
203.254.121 REJECT
|
À§ÀÇ ³»¿ëÀ» °£´ÜÈ÷ ¼³¸íÇÏÀÚ¸é, OK ¿ÞÂÊ¿¡ ÀÖ´Â ¸ÞÀÏ·Î ºÎÅÍ ¿À´Â ¸ÞÀÏÀ» Çã¿ëÇÏ°í, REJECT´Â ¿ÞÂÊ¿¡ ÀÖ´Â ¸ÞÀÏÁּҷκÎÅÍ ¿À´Â ¸ÞÀÏÀ» ºÒÇãÇÑ´Ù. ±×¸®°í, RELAY´Â ¿ÞÂÊ IP ZoneÀÇ sendmail relay¸¦ Çã¿ëÇÑ´Ù. ¸¸¾à¿¡ PC¿¡¼ Outlook°°Àº°ÍÀ¸·Î pop3¸¦ »ç¿ëÇÒ·Á¸é ¸¶Âù°¡Áö·Î RELAY¸¦ Çã¿ëÇؾ߸¸ »ç¿ëÀÌ °¡´ÉÇÏ´Ù. pop3¸¦ »ç¿ëÇϴ°͵µ ÀÏÁ¾ÀÇ RELAY¸¦ Çϴ°Ͱú °°±â¶§¹®ÀÌ´Ù. À§ÀÇ ÆÄÀÏÀ» ÆíÁýÇÒ¶§´Â Tab Å°¸¦ »ç¿ëÇؾ߸¸ ÇÑ´Ù. ÀÚ, ´ÙÀ½Àº sendmailÀÌ ÀνÄÇÒ¼ö ÀÖµµ·Ï access ÆÄÀÏÀ» Berkeley DB·Î »ý¼ºÇÏ´Â ´Ü°èÀÌ´Ù. ²À hash¸¦ ¾²µµ·Ï ÇÑ´Ù.
mail:/etc/mail> makemap hash /etc/mail/access < /etc/mail/access
accessÆÄÀÏÀÌ ¼öÁ¤µÉ¶§¸¶´Ù À§ÀÇ ¸í·ÉÀ» ½ÇÇà½ÃÄÑ access DB¿¡ ¹Ý¿µ½ÃÄѾßÇÑ´Ù. ±×¸®°í, sendmail µ¥¸óÀ» ´Ù½Ã ½ÇÇà½ÃÄÑ ÁÙ ÇÊ¿ä´Â ¾ø´Ù. ´ÙÀ½Àº access contrlo option ºÎºÐÀ» »ìÆ캸ÀÚ.
OK ÁöÁ¤µÈ È£½ºÆ®³ª »ç¿ëÀÚ°¡ º¸³½¸ÞÀÏÀº ´Ù¸¥ ¼³Á¤ rule ÀÌ °ÅºÎÇÏ´Â °æ¿ì¿¡µµ ¹Þ¾ÆµéÀδÙ.
RELAY ÁöÁ¤µÈ È£½ºÆ®¿¡ ´ëÇØ SMTP ¸ÞÀÏ Áß°è ¿ªÇÒÀ» ÇÑ´Ù. Áï ÁöÁ¤µÈ µµ¸ÞÀο¡ ´Â »ç¿ëÀÚ¿¡°Ô ¿À´Â ¸ÞÀÏÀ» ¹Þ°í ±× µµ¸ÞÀο¡ÀÖ´Â »ç¿ëÀÚ°¡ ¼¹ö¸¦ ÅëÇØ ¸ÞÀÏÀ» º¸³¾¼ö ÀÖµµ·Ï ÇÑ´Ù. ÁöÁ¤µÈ µµ¸ÞÀο¡¼ ¿À´Â ¸ÞÀÏÀº ´Ù¸¥ ·êÀÌ °ÅºÎÇÏ´Â °æ¿ì¿¡µµ ¹Þ¾Æ µéÀδÙ.
REJECT ÁöÁ¤µÈ µµ¸ÞÀΰú °ü·ÃµÈ ¸ðµç ¸ÞÀÏ(¼ö½Å/¹ß½Å)À» °ÅºÎÇÑ´Ù.
DISCARD $#discard mailer¸¦ »ç¿ëÇØ ¸Þ¼¼Áö¸¦ ¿ÏÀüÈ÷ Æó±âÇÑ´Ù. ¸Þ¼¼Áö¸¦ ¹Þ±â´Â ÇÏÁö¸¸ ¹è´ÞÀº ÇÏÁö¾Ê°í ¹ß½ÅÀÚ¿¡°Ô Æó±â»ç½ÇÀ» ¾Ë¸®Áö ¾Ê±â ¶§¹®¿¡, ¹ß½ÅÀÚ´Â ¹è´ÞµÇ¾ú´Ù°í »ý°¢ÇÏ°Ô µÈ´Ù.
501 <message> ÁöÁ¤µÈ user@host ¿Í ¹ß½ÅÀÚÀÇ ÁÖ¼Ò°¡ Àüü ȤÀº ºÎºÐÀûÀ¸·Î ÀÏÄ¡ÇÒ°æ¿ì À̸ÞÀÏÀ» ¹ÞÁö ¾Ê´Â´Ù. µÚÀÇ ¿¹´Â return mail¿¡ Æ÷Ç﵃ ¿¡·¯ ¸Þ¼¼Áö ±¸¹®À» ÁöÁ¤ÇÏ¿© ³ÖÀ»¼ö ÀÖ´Ù.
553 <message> ¹ß½ÅÀÚÀÇ ÁÖ¼Ò¿¡ È£½ºÆ®¸íÀÌ ¾øÀ» °æ¿ì ¸ÞÀÏÀ» ¹ÞÁö ¾Ê´Â´Ù.
550 <message> ÁöÁ¤µÈ µµ¸ÞÀΰú °ü·ÃµÈ ¸ÞÀÏÀ» ¹ÞÁö ¾Ê´Â´Ù.
mail :/etc/mail> vi relay-domains
210.117.198.133
jkkang.net
¿Í °°ÀÌ Çؼ relay ¸¦ Çã¿ëÇÏ´Â µµ¸ÞÀÎÀ» ¼³Á¤ÇÒ ¼ö°¡ ÀÖ´Ù. ±×¸®°í sendmail µ¥¸óÀ» ´Ù½Ã ½ÇÇà½ÃÄÑ ÁÙ ÇÊ¿ä´Â ¾ø´Ù. relay ¿¡ °ü·ÃµÈ°ÍÀº /etc/mail/relay-domains ÆÄÀÏ¿¡ Çã¿ëÇÏ´Â ¹üÀ§¸¦ ÁöÁ¤ÇØ Áִ°ÍÀÌ °ü¸®Â÷¿ø¿¡¼ ´õ ÆíÇÏ´Ù. ±×¸®°í Çã¿ëÀ» ºÒÇãÇÏ´Â ¸®½ºÆ®´Â access ÆÄÀÏÀ» È°¿ëÇϸé ÁÁ´Ù. ÇÊÀÚ´Â, À̹æ¹ýÀ» ÃßõÇÏ°í ½Í´Ù. ±×¸®°í ´ÙÀ½°ú °°Àº ¹æ¹ýÀ¸·Î sendmailÀÌ relay¸¦ Çã¿ëÇÏ´Â µµ¸ÞÀÎÀÇ ¸®½ºÆ®¸¦ º¼ ¼ö ÀÖ´Ù.
mail :/etc/mail> echo '$=R' | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> jkkang.net
À§ ¿¡¼ º¸¸é, ÇÊÀÚÀÇ È¨ÆäÀÌÁöÀÎ jkkang.net ÀÌ relay °¡ Çã¿ëµÇ°í ÀÖÀ½À» º¼¼ö ÀÖ´Ù.
mail:/etc/mail> makemap -l
dbm
hash
btree
À§ÀÇ ¸í·É¾î´Â Data type ÀÌ´Ù.
|
mail:/etc/mail> ls -l access*
-rw-r--r-- 1 root system 95 Mar 14 17:47 access
-rw-r----- 1 root system 12288 Mar 14 17:47 access.db
|
|
11. Database Alias ÃʱâÈÇϱâ
|
mail:/etc/mail> touch aliases
mail:/etc/mail> sendmail -bi
/etc/mail/aliases: 0 aliases, longest 0 bytes, 0 bytes total
mail:/etc/mail> chmod 0640 aliases
|
|
12. Sendmail ½ÇÇà ¹× ¹öÀüº¸±â
|
mail:/etc/mail> /usr/lib/sendmail -bd -q25m
mail:/etc/mail> ps -ef|grep sendmail
root 16904 15786 0 17:50:20 pts/2 0:00 grep sendmail
root 19348 1 0 17:50:16 - 0:00 sendmail: accepting connections
mail:/etc/mail> telnet localhost 25
Trying...
Connected to loopback.
Escape character is '^]'.
220 mail.jkkang.com ESMTP Sendmail 8.12.8/8.12.8; Fri, 14 Mar 2003 17:50:31 -0600
|
|
13. SendmailÀÇ relay-host ±â´É Å×½ºÆ®
sendmailÀ» ½ÇÇà½ÃŲ »óÅ¿¡¼ ´ÙÀ½°ú °°ÀÌ Á¢¼ÓÇÑ´Ù. ¶Ç´Â http://www.abuse.net/relay.html ½ÎÀÌÆ®¿¡¼ ½±°Ô Å×½ºÆ®¸¦ ÇÒ¼ö ÀÖ´Ù. °¢ÀÚ ÃëÇâ¿¡ ¸Â°Ô Å×½ºÆ®¸¦ Çغ¸±â ¹Ù¶õ´Ù.
|
# telnet relay-test.mail-abuse.org
...
Tested host banner: 220 a.b.c.d ESMTP Sendmail 8.12.6/8.12.6; Mon, 30 Sep 2002 17:05:38 +0900
System appeared to reject relay attempts
Connection closed.
...
|
ÀÌ·¸°Ô ³ª¿À¸é relay-host ±â´ÉÀ» disable ÇÏ°Ô²û ¼³Á¤µÈ °ÍÀÌ´Ù. Áö±Ý±îÁö Sendmail 8.12.8À» ÄÄÆÄÀÏÇؼ ÀνºÅç ÇÏ´Â °úÁ¤À» ¼³¸íÀ» ÇغôÙ. ÇÊÀÚ´Â Spam Mail Relay¿¡ ´ëÇؼ ºñ±³Àû °£´ÜÈ÷ ¼³¸íÀ» ÇÏ¿´´Ù. ±×¿Ü¿¡µµ SendmailÀº ½ºÆÔ¸ÞÀÏÀ» Á¦¸ñº°·Î °É·¯³»´Â ±â´Éµµ ÀÖÀ¸´Ï, ÀÌ·¯ÇÑ ÁÁÀº ±â´ÉÀº ÀÎÅͳÝÀ» µÚÁö´ø°¡, ¾Æ´Ï¸é °¡Àå ÁÁÀº ¸Þ´º¾óÀÎ README ÆÄÀÏÀ» õõÈ÷ Àо±â ¹Ù¶õ´Ù. ±× À§¿¡ À¯Áî³ÝÀÇ sendmail °ü·Ã ´º½º±×·ìÀ» È°¿ëÇÏ¸é ¸¹Àº Á¤º¸¸¦ ¾òÀ»¼ö ÀÖÀ»°ÍÀÌ´Ù. Spam ¸ÞÀÏÀ» °É·¯³»´Â ¹æ¹ý¿¡ ´ëÇÑ ¼³¸íÀº °ð ½Ã°£À» ÂÉ°³¼ ¸Þ´º¾óÀ» ¸¸µéµµ·Ï ÇÏ°Ú´Ù. ¾Æ¹«ÂÉ·Ï, sendmailÀ» AIX ¿¡¼µµ ½±°Ô ÀνºÅçÀ» ÇÒ¼ö ÀÖµµ·Ï ÀÛÀº º¸ÅÆÀÌ µÇ¾úÀ¸¸é ÇÑ´Ù.
²À, README ÆÄÀÏÀ» Àд°ÍÀ» ½À°üÈ ÇÏÀÚ...
|
¾Æ~~~ Àá¿Â´Ù...
ÇÊÀÚÀÇ ÄÄÆÄÀÏ ¹®¼°¡ sendmailÀ» ¼³Ä¡ÇÏ´Â ºÐµé²² ¸¹Àº µµ¿òÀÌ µÇ¾úÀ¸¸é ÇÕ´Ï´Ù.
|
|