|
|
|
|
|
|
ۼ : 05-08-29 10:11
sendmail ġ OS - solaris 9 snedmail + BerkeleyDB |
۾ :
ȸ : 16,128
|
sendmail ġ
sendmail ϱ....
snedmail
ftp://ftp.sendmail.org/pub/sendmail www.sunfreeware.com
α Ҽ ֽϴ.
⼭ ġ snedmail sendmail-8.13.4 Դϴ.
-------------------------------------------------------------------------------
BerkeleyDB ġ ϱ
sendmail database hashϱؼ Ŭ DB ʿ մϴ.
snedmail ġ ϱ ýۿ BerkeleyDB ġ ִ Ȯ
ؾ մϴ. ġ ϴ BerkeleyDB ãµ BerkeleyDB
Build ʽϴ.BerkeleyDB ⺻ ġ δ sun
root@test:/usr/local> ls
BerkeleyDB.4.2 apache2 include libexec php share
root@test:/>pkginfo | grep db
ġ Ȯ Ҽ ֽϴ. BerkeleyDB ġ
www.sunfreeware.com http://www.sleepycat.com Ҽ ֽϴ.
⼭ sunfreeware BerkeleyDB Ű ġ ϰڽϴ.
root@test:/data>gunzip db-4.2.52.NC-sol9-sparc-local.gz
root@test:/data>pkgadd -d db-4.2.52.NC-sol9-sparc-local
̺귯
root@test:/>vi .cshrc
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:$LD_LIBRARY_PATH
wq!
-------------------------------------------------------------------------------
libiconv ġ
root@test:/data>pkginfo | grep libiconv
Ű ġ 됬 Ȯ ϰ ġ Ǿ www.sunfreewar.com
OS ´ Ű ϰ ġؾ մϴ. Ű
./Build Ե˴ϴ.
root@test:/data>gunzip libiconv-1.8-sol9-sparc-local.gz
root@test:/data>pkgadd -d libiconv-1.8-sol9-sparc-local
-------------------------------------------------------------------------------
sendmail
solaris ġ ϸ ⺻ sendmail ġ ˴ϴ.
root@test:/>ps -ef | grep sendmail
smmsp 4252 1 0 16:40:09 ? 0:00 /usr/lib/sendmail -L sm-msp-queue -Ac -q30m
root 4249 1 0 16:40:09 ? 0:00 /usr/lib/sendmail -L sm-mta -bd -q1h
root@test:/>kill -9 4252
root@test:/>kill -9 4249
root@test:/>ps -ef | grep sendmail
root 4438 4378 0 08:57:27 pts/2 0:00 grep sendmail
root@test:/data>gunzip sendmail-8.13.4.tar.gz
root@test:/data>tar xvf sendmail-8.13.4.tar
--------------------------------------------------------------------------------
- ýۿ ο ߰ ϴٺ ֽϴ.
̰ shell ΰ ɷ ʱ Դϴ.solaris uxin windows
迭 ó ġ ϸ ڵ н ʽϴ.
gcc Ϸ shell ð ؾ մϴ.
bash ----- vi .bash_profile
csh ----- vi .cshrc
Ȯ Ҽ ֽϴ.
---------------------------------------------------------------------------------
sendmail .
sendmail ϱ ؾ մϴ.
----site.config.m4 SunOS.5.9 ...
site.config.m4
root@test:/data/sendmail-8.13.4/devtools/Site>vi site.config.m4
APPENDDEF(`confLIBDIRS', `-L/usr/local/BerkeleyDB.4.2/lib')
APPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB.4.2/include')
APPENDDEF(`confENVDEF', `-DNEWDB')
wq!
߰ մϴ.
root@test:/data/sendmail-8.13.4/devtools/OS>uname -r
5.9
ý SunOS.5.9 Դϴ. /devtools/OS/ Ȯ
ý ֽϴ.⼭ ýۿ ô ã ؾ մϴ.
root@test:/data/sendmail-8.13.4/devtools/OS>vi SunOS.5.9
define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS -DMAP_REGEX') -------> ( DNDBM -----> DNEWDB )
define(`confMAPDEF', `-DNEWDB -DNIS -DNISPLUS -DMAP_REGEX')
wq!
---------------------------------------------------------------------------------
------ sendmail Build
root@test:/data/sendmail-8.13.4>./Build -c
root@test:/data/sendmail-8.13.4> groupadd smmsp
root@test:/data/sendmail-8.13.4> useradd -g smmsp smmsp
root@test:/data/sendmail-8.13.4> passmgmt -m -s /dev/null smmsp
root@test:/data/sendmail-8.13.4> mkdir -p /usr/share/man/cat1
root@test:/data/sendmail-8.13.4> mkdir /usr/share/man/cat5
root@test:/data/sendmail-8.13.4> mkdir /usr/share/man/cat8
root@test:/data/sendmail-8.13.4> ./Build install
---------------------------------------------------------------------------------
------ sendmail config.mc .
root@test:/data/sendmail-8.13.4/cf/cf>cp generic-solaris.mc config.mc
root@test:/data/sendmail-8.13.4/cf/cf>sh Build config.cf
root@test:/data/sendmail-8.13.4/cf/cf>cp config.cf /etc/mail/sendmail.cf
---------------------------------------------------------------------------------
--sendmail ũƮ ...
sendmail ġ ġ ǿ ִ ٸ ̸
ݴϴ.
root@test:/etc/init.d>mv sendmail sendmail_old
root@test:/etc/init.d>vi sendmail
#!/sbin/sh
case "$1" in
'start')
# Start the MTA
/usr/lib/sendmail -L sm-mta -bd -q1h
# Start the MSP
/usr/lib/sendmail -L sm-msp-queue -Ac -q30m
;;
'stop')
pid=`/usr/bin/ps -eo pid,comm | /usr/bin/awk '{ if ($2 == "/usr/lib/sendmail") print $1 }'`
if test "$pid"
then
/usr/bin/kill $pid
fi
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
wq!
root@test:/etc/init.d> chown root:sys /etc/init.d/sendmail
root@test:/etc/init.d> chmod 744 /etc/init.d/sendmail
--------------------------------------------------------------------------------
------- snedmail database ....
root@test:/etc/mail>touch access mailertable
root@test:/etc/mail>vi access
127.0.0.1 RELAY
localhost RELAY
210.104.1.3 RELAY
readysystem.co.kr RELAY
wq!
root@test:/etc/mail>makemap hash access < access
root@test:/etc/mail>makemap hash mailertable < mailertable
root@test:/etc/mail>newaliases
---------------------------------------------------------------------------------
ȯ漳 (, ȣƮ+ mail.readysystem.co.kr ̶ ϰ, IP 192.168.0.212 )
root@test:/etc/mail>vi local-host-names
mail
readysystem.co.kr
mail.readysystem.co.kr
:wq!
---------------------------------------------------------------------------------
----- sendmail ....
root@test:/etc/mail>/etc/init.d/sendmail start
root@test:/etc/mail>ps -ef |grep sendmail -------------> sendmail Ȯ
smmsp 4252 1 0 16:40:09 ? 0:00 /usr/lib/sendmail -L sm-msp-queue -Ac -q30m
root 4249 1 0 16:40:09 ? 0:00 /usr/lib/sendmail -L sm-mta -bd -q1h
---------------------------------------------------------------------------------
----- test sendmail ....
root@test:/etc/mail>/usr/lib/sendmail -v blackowl@readysystem.co.kr
test
test
test
.
blackowl@readysystem.co.kr... Connecting to [127.0.0.1] via relay...
220 test.co.kr ESMTP Sendmail 8.13.4/8.13.4; Mon, 29 Aug 2005 10:09:59 +0900 (KST)
>>> EHLO test.co.kr
250-test.co.kr Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<root@test.co.kr> SIZE=31
250 2.1.0 <root@test.co.kr>... Sender ok
>>> RCPT To:<blackowl@readysystem.co.kr>
>>> DATA
250 2.1.5 <blackowl@readysystem.co.kr>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <blackowl@readysystem.co.kr>... Connecting to ns.readysystem.co.kr. via esmtp...
050 220 price.co.kr ESMTP Sendmail 8.11.6/8.11.6; Mon, 29 Aug 2005 09:45:49 +0900 (KST)
050 >>> EHLO test.co.kr
050 250-price.co.kr Hello [218.48.78.170], pleased to meet you
050 250-ENHANCEDSTATUSCODES
050 250-EXPN
050 250-VERB
050 250-8BITMIME
050 250-SIZE
050 250-DSN
050 250-ONEX
050 250-ETRN
050 250-XUSR
050 250 HELP
050 >>> MAIL From:<root@test.co.kr> SIZE=324
050 250 2.1.0 <root@test.co.kr>... Sender ok
050 >>> RCPT To:<blackowl@readysystem.co.kr>
050 250 2.1.5 <blackowl@readysystem.co.kr>... Recipient ok
050 >>> DATA
050 354 Enter mail, end with "." on a line by itself
050 >>> .
050 250 2.0.0 j7T0jnb16206 Message accepted for delivery
050 <blackowl@readysystem.co.kr>... Sent (j7T0jnb16206 Message accepted for delivery)
250 2.0.0 j7T19xVD004518 Message accepted for delivery
blackowl@readysystem.co.kr... Sent (j7T19xVD004518 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 test.co.kr closing connection
root@test:/etc/mail>
Ͱ Ȯ Ҽֽϴ.
|
|
|
|
|
|
|
|
|