自分のホームディレクトリ(別に違うところでも大丈夫だと思うけど。)で"imsetup"を実行します。スクリプトの質問に答えていくと一応imを使える環境ができあがります。
>cd >imsetup Where is your home directory? [/home/kamata] Where is your Mail directory? [/home/kamata/Mail] Where is your News directory? [/home/kamata/News] /home/kamata/News does not exist. Create it? [yes] Creating /home/kamata/News directory. Directory /home/kamata/News created. What is your E-mail address(es)? [kamata@hoge.or.jp] kamata@lares.dti.ne.jp Do you want to use value of Content-Length header for delimitation for local mail? (Answer yes if your OS supports Content-Length header like Solaris 2.x, otherwise answer no.) [no] Does your system can detect write errors without fsync(2)? (You can answer yes, if your home directory is on local file system, otherwise answer no.) [no] Directory /home/test/.im created. Setup /home/test/.im/Config.
ISPのPOP3サーバからメールを送受信できるように、"~/.im/Config"を修正します。
メールを送信するのに利用するsmtpサーバを指定します。
"SmtpServers"を有効にし、smtpサーバのアドレスを記入します。
Smtpservers=smtp.lares.dti.ne.jp # default server for SMTP
メールを受信するのに利用するpopサーバを指定します。
"Imget.Src"を有効にし、プロトコル名、ログイン名、POPサーバ名を記入します。
Imget.Src=pop/POP:kamata@pop.lares.dti.ne.jp
メールを取得するたびにパスワードを入力しなくて済むように、パスワードファイルを使うように設定します。
"UsePwFiles"を有効にします。
"PwFiles"を有効にし、パスワードファイルの名前を記入します。
UsePwFiles=yes # use password files PwFiles=password # password files (relative to ~/.im/)
送信するメールをいったんキューにためるようにします。
"JustQueuing"を有効にします。
(キューイングしたメールは、"imput -q"で送信します。)
JustQueuing=yes
パスワードファイル"~/.im/password"を作成します。
パスワードファイルは、人に見られても困るので、自分にしか読めないようにモードを変更しておきます。
>cd .im >vi password >chmod 700 password
[~/.im/password] --- #<protocol> <server> <user> <password> pop/POP pop.lares.dti.ne.jp kamata *********