imap4のインストール手順
- ソースファイルの入手
ftp://ftp.win.ne.jp/pub/network/mail/imap/imap-4.1.BETA.tar.Z
- ファイルの展開
$ gzip -dc imap-4.1.BETA.tar.Z | tar xvf -
- コンパイル&インストール
$ cd imap-4.1.BETA/imapd
$ パッチをあてる(手作業)
以下の内容を手作業により修正する
*** env_unix.c.org Wed Apr 30 08:39:53 1997
--- env_unix.c Sat May 10 18:38:42 1997
***************
*** 40,45 ****
--- 40,46 ----
static char *myUserName = NIL; /* user name */
static char *myHomeDir = NIL; /* home directory name */
+ static char *restHomeDir = NIL; /* restriction to home dir: N.Kanayama */
static char *myLocalHost = NIL; /* local host name */
static char *myNewsrc = NIL; /* newsrc file name */
static char *sysInbox = NIL; /* system inbox name */
***************
*** 332,338 ****
}
}
if (!blackBox) { /* not a black box? */
! myHomeDir = cpystr (home);/* use real home directory */
/* make sure user rc files don't try this */
blackBoxDir = blackBoxDefaultHome = "";
}
--- 333,344 ----
}
}
if (!blackBox) { /* not a black box? */
! /* below, deciding home directory. Modified N.Kanayama */
! if (restHomeDir){
! myHomeDir = strcat(strcpy( fs_get(strlen(home)+strlen(restHomeDir)+1), home), restHomeDir);
! }else{
! myHomeDir = cpystr (home);/* use real home directory */
! }
/* make sure user rc files don't try this */
blackBoxDir = blackBoxDefaultHome = "";
}
***************
*** 734,739 ****
--- 740,750 ----
ERROR);
else blackBoxDefaultHome = cpystr (k);
}
+ /* modified N.Kanayama */
+ else if (!strcmp (s, "set restricted-home-directory")){
+ restHomeDir = cpystr (k);
+ }
+ /* end of modification */
else if (!strcmp (s,"set local-host")) {
fs_give ((void **) &myLocalHost);
myLocalHost = cpystr (k);
$ cd ../
$ make lnx
$ su でスーパユーザになる
# cp imapd/imapd /usr/local/etc/.
# cp ipopd/ipop2d /usr/local/etc/.
# cp ipopd/ipop3d /usr/local/etc/.
- inetdからの起動
/etc/servicesの中imap2の所を以下のように変更する
imap4 143/udp
imap4 143/tcp
/etc/inetd.confの中に以下の内容を追加する
##
# imap4 server
##
imap4 stream tcp nowait root /usr/local/etc/imapd
以上でブート時にinetdから起動する
強制的に起動させるには
# kill -HUP inetdのプロセス番号
とする
|