DRAC(Dynamic Relay Authorization)ˤĤƤܸ


ɥȤˤĤ

DRAC Υ֡ drac.tar.Z °Ρ INSTALL ۥɥȤΤǤ

INSTALL

μ갷Υڥ졼ƥ󥰡ƥ(OS)ȥեȥΤΤΤǤפʤǤ⡢ʤȤˤΩĤǤ礦DRAC ֥ڡ http://mail.cc.umanitoba.ca/drac/index.html ǤϺǿξܺ٤ɽƤޤ

DRAC Debian Linux ˺ѤƤޤDebian Linux ǤϥѥȤפǤʲ URL Ƥ

http://packages.debian.org/drac
http://ftp.debian.org/debian/pool/main/d/drac/
http://buildd.debian.org/build.php?arch=&pkg=drac
http://bugs.debian.org/drac

󥹥ȡˤäơޤ sendmail ѥ뤵줿Ʊ Barkeley db ΥС DRAC 򥳥ѥ뤷ʤƤϤޤˤäƤ sendmail ΥѥȸߤǤϥƥ˥åȥåפƤС󤬰㤦⤷ʤǤ`strings /usr/lib/sendmail | grep -i sleepy' ȤĴˡ⤢ޤ*1 Barkeley*2 db ѥåΥС 2.x, 3.x, 4.x (http://www.sleepycat.com/)侩ǤС 1.85 Ǥưޤפʻϡsendmail ѥƱСΤΤѤǤ

1) ФΥƥˤ碌 Makefile Խޤ

Soralis Ѥ:

       INSTALL = /usr/ucb/install
       EBIN = /usr/local/sbin
       MAN = /usr/local/man/man
       DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO
       CC = <your compiler>
       RANLIB = :
       CFLAGS = $(DEFS) -g -I/path/to/db/include
       LDLIBS = -L/path/to/db/library -lnsl -ldb
       TSTLIBS = -L. -ldrac -lnsl
       MANLIB = 3
       MANADM = 1m

SunOS 4.x Ѥ:

       INSTALL = install
       EBIN = /usr/local/etc
       MAN = /usr/local/man/man
       DEFS = -DSOCK_RPC -DFLOCK_LOCK -DGETHOST
       CC = <your compiler>
       RANLIB = ranlib
       CFLAGS = -Dstrtoul=strtol $(DEFS) -g -I/path/to/db/include
       LDLIBS = -L/path/to/db/library -ldb
       TSTLIBS = -L. -ldrac
       RPCGENFLAGS = -I
       MANLIB = 3
       MANADM = 8

BSDI Ѥ:

       INSTALL = install
       EBIN = /usr/local/sbin
       MAN = /usr/local/man/man
       DEFS = -DSOCK_RPC -DFCNTL_LOCK -DGETHOST
       CC = <your compiler>
       RANLIB = ranlib
       CFLAGS = $(DEFS) -g -I/path/to/db/include
       LDLIBS = -L/path/to/db/library -ldb
       TSTLIBS = -L. -ldrac
       MANLIB = 3
       MANADM = 8

IRIX 6.2 Ѥ:

       INSTALL = /usr/bin/X11/bsdinst
       EBIN = /usr/local/sbin
       MAN = /usr/local/man/man
       DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO -D_SVR4_TIRPC
       CC = <your compiler>
       RANLIB = :
       CFLAGS = $(DEFS) -g -I/path/to/db/include
       LDLIBS = -L/path/to/db/library -lnsl -ldb
       TSTLIBS = -L. -ldrac -lnsl
       MANLIB = 3
       MANADM = 1m

NetBSD Ѥ:

       INSTALL = install
       EBIN = /usr/local/sbin
       MAN = /usr/local/man/man
       DEFS = -DSOCK_RPC -DFCNTL_LOCK -DGETHOST -DDASH_C
       CC = <your compiler>
       RANLIB = ranlib
       CFLAGS = $(DEFS) -g -I/path/to/db/include
       LDLIBS =
       TSTLIBS = -L. -ldrac
       RPCGENFLAGS = -C
       MANLIB = 3
       MANADM = 8

FreeBSD 2.2.x Ѥ:

       INSTALL = install
       EBIN = /usr/local/sbin
       MAN = /usr/local/man/man
       DEFS = -DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C
       CC = <your compiler>
       RANLIB = ranlib
       CFLAGS = $(DEFS) -g -I/path/to/db/include
       LDLIBS =
       TSTLIBS = -L. -ldrac
       RPCGENFLAGS = -I -C
       MANLIB = 3
       MANADM = 8

FreeBSD-4.1 with gdbm-1.8 Ѥ:

       INSTALL = install
       EBIN = /usr/local/sbin
       MAN = /usr/local/man/man
       DEFS = -DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C
       CC = cc
       RANLIB = :
       CFLAGS = $(DEFS) -g -I/usr/local/include
       LDLIBS =
       TSTLIBS = -L. -ldrac
       RPCGENFLAGS = -C
       MANLIB = 3
       MANADM = 1m

Linux Ѥ:

       INSTALL = install
       EBIN = /usr/local/sbin
       MAN = /usr/local/man/man
       DEFS = -DSOCK_RPC -DFCNTL_LOCK -DGETHOST -DDASH_C
       CC = <your compiler>
       RANLIB = :
       CFLAGS = $(DEFS) -g
       LDLIBS = -ldb
       TSTLIBS = -L. -ldrac
       RPCGENFLAGS = -C -I
       MANLIB = 3
       MANADM = 8

AIX Ѥ:

       INSTALL = /usr/ucb/install
       EBIN = /usr/local/sbin
       MAN = /usr/local/man/man
       DEFS = -DD_BSD -DBSD_INCLUDES -DSOCK_RPC -DFCNTL_LOCK -DGETHOST -DDEBUG
       CC = <your compiler>
       RANLIB = :
       CFLAGS = $(DEFS) -g -I/path/to/db/include
       LDLIBS = -L/path/to/db/library -ldb
       TSTLIBS = -L. -ldrac
       RPCGENFLAGS =
       MANLIB = 3
       MANADM = 1m

2) ѥå򥳥ѥ뤷ޤ

$ make

3) Ф˥󥹥ȡ뤷ޤ*3

# make install

4) man ڡΥ󥹥ȡ

# make install-man

5) dracd ưץȤΥ󥹥ȡ롣Solaris dracd-setup Ĵ /etc/init.d ˥󥹥ȡ뤷S87dracd /etc/rc2.d ˥󥯤*4

6) dracd ǡεưSolaris ξ

# sh /etc/init.d/dracd-setup start

7) POP/IMAP ¦Ĵdracauth() 饤ȵǽѼԤơ᡼ȤдĶŬƤޤѼԤǧڤԤġ dracauth() *5ޤ᡼륵ФPOP/IMAP SMTP ʬƤˤϡʣʥ󥿡եɬפȤޤܺ٤ testing.c dracauth.c 򻲾ȤƤPOP/IMAP Фȥ᡼륵ФƱޥưƤϡХۥ̾"localhost"ȤǤޤष󥿥ࡦե졼󡦥ѥ᡼ȤѤ褤Ǥ礦ʲǤ qpopper Ѥ뤿ΥץΥѥå򵭽ҤƤޤ

--------8<--------
*** pop_pass.c-nodrac   Sat Jun 27 10:56:00 1998
--- pop_pass.c  Wed Jul 22 22:54:04 1998
***************
*** 19,24 ****
--- 19,28 ----

  #include <pwd.h>
  #include "popper.h"
+ #ifdef DRAC_AUTH
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #endif /* DRAC_AUTH */


  /* This error message is vague on purpose to help reduce help improve
***************
*** 502,507 ****
--- 506,519 ----

      /*  Initialize the last-message-accessed number */
      p->last_msg = 0;
+
+ #ifdef DRAC_AUTH
+     {
+       char *err;
+       if (dracauth("localhost", inet_addr(p->ipaddr), &err) != 0)
+         pop_log(p,POP_PRIORITY,err);
+     }
+ #endif /* DRAC_AUTH */

      /*  Authorization completed successfully */
      return (pop_msg (p,POP_SUCCESS,
*** make.solaris2-nodrac        Sat Feb 17 14:25:15 1996
--- make.solaris2       Wed Jul 22 23:06:47 1998
***************
*** 39,45 ****
                        -DAUTH -DMAILOCK -DDEBUG -DBINMAIL_IS_SETGID \
                        -DNO_AT_HOST -DNFS_SPOOL -DPOP_ACCT -DPOP_LLOG \
                        -DNONAUTHFILE=\"/etc/popper.deny\" \
!                       -DBULLDIR=\"/var/spool/bulls\"

  TARGET                =       popper.solaris2

--- 39,45 ----
                        -DAUTH -DMAILOCK -DDEBUG -DBINMAIL_IS_SETGID \
                        -DNO_AT_HOST -DNFS_SPOOL -DPOP_ACCT -DPOP_LLOG \
                        -DNONAUTHFILE=\"/etc/popper.deny\" \
!                       -DBULLDIR=\"/var/spool/bulls\" -DDRAC_AUTH

  TARGET                =       popper.solaris2

***************
*** 56,62 ****


  ${TARGET}: ${OBJS}
!       ${CC}  ${OBJS} -o ${TARGET} -lsocket -lnsl -lresolv -lkrb -lmail

  tar: ${SRCS} ${DOCS} ${MAKEFILE}
        rm -f ${TAR} *.Z*
--- 56,62 ----


  ${TARGET}: ${OBJS}
!       ${CC}  ${OBJS} -o ${TARGET} -L/usr/local/src/drac -ldrac -lsocket -lnsl -lresolv -lkrb -lmail

  tar: ${SRCS} ${DOCS} ${MAKEFILE}
        rm -f ${TAR} *.Z*
--------8<--------

8) ᡼륵(MRA)򥤥󥹥ȡ뤷ޤqpopper ξǤ `make' `make install' Ǥ

9) sendmail.cf ĴԤޤsendmail 8.9.0 ǤϰʲιԤ .mc ե LOCAL_CONFIG ۲˵ҤʤФޤ

# dynamic relay authorization control map
Kdrac btree /etc/mail/dracd

ޤ LOCAL_RULESETS ˤϰʲιܤɬפǤ

SLocal_check_rcpt
# allow recent POP/IMAP mail clients to relay
R$*                             $: $&{client_addr}
R$+                             $: $(drac $1 $: ? $)
R?                              $@ ?
R$+                             $@ $#OK

ʢ - sendmail.mcصȤ¦¦δ֤ˤϥ֤äƤޤȵǽޤΤǡϤκݤˤդɬפǤ

.cf եƺޤ*6

10) sendmail ƵưޤSMTP ȥ塼(queue)ǡϺƵưɬפޤ


*1 ԤδĶǤϡɤΤ褦ĴΩĤʬޤǤġSleep ȤʸϤޤ
*2 С졼
*3 - ץץȤ # ˤʤäƤΤ root ¤ǤȤ̣
*4 - Linux ϤǤ dracd-setup.linux Ȥե뤬ޤ
*5 ץǤδؿƤӽФǽΤ
*6 m4 sendmail.mc > sendmail.cf

ȥå   Խ ʬ Хåå ź ʣ ̾ѹ   ñ측 ǽ   إ   ǽRSS
Last-modified: Sun, 03 Jul 2005 01:17:29 JST (7084d)