next up previous contents index
Next: Mew Up: Mail Previous: Netscape-Centric Approach

Subsections

Pine

\includegraphics{mail/images/pine.ps}

Patches for Japanese pine are available at ftp://ftp.noc.titech.ac.jp/pub/tmp/aki

The README.j from the Japanese patch indicates that the Japanese Pine kit has the following features:

The Japanese documentation is optional.

Compilation Hints

Make sure you have the canna header and library files.

Mine are shown below. You don't need all of them.

/usr/include/canna
RK.h	      RKintern.h    RKrename.h	  alphamap.h	bunmap.h
canna.h       chikujimap.h  emptymap.h	  ichiranmap.h	jishumap.h
jrkanji.h     keydef.h	    kigomap.h	  lisp.h	mfdef.h
net.h	      onoffmap.h    patchlevel.h  protodefs.h	symbolname.h
t_reimap.h    tanmap.h	    widedef.h	  yomimap.h


/usr/lib
libcanna.so
libcanna.so.1
libcanna.so.1.0
libcanna16.so
libcanna16.so.1
libcanna16.so.1.0

Place the patch in the same directory as the standard pine source and do:

    % zcat pine3.96.tar.gz |tar xvf -
    % cd pine3.96
    % zcat ../pine3.96lj1.1b7.tar.gz |tar xvf -
    % patch -p1 <pine3.96lj1.1b7.diff

Edit the makefile.lnx files in ./pico/ and ./pine/.

Indicate the location of your canna header files if it is different than the default location shown in the makefiles. In my case, I changed the location to /usr/include/canna. If you don't have the termcap libraries, but have the ncurses libraries, change -ltermcap to -lncurses. At the top level directory, issue the command:

   $ ./build lnx

You should find the binaries in the ./bin/ directory.

Configuration Examples

Pine version 3.96-J comes with a pico editor that can display Japanese. Kinput2 or Canna can be used to input Japanese into pico. Or you can set an alternate editor such as mule or jvim to write your e-mail in Pine.

If you use mule, emacs 20, or xemacs 20, as your default editor, you might want to include some lines like the ones shown below in your .emacs file.

;;; trying to get the nihongo to appear
 (setq kanji-flag t)
 (setq kanji-process-code 1)

 (cond ((boundp 'NEMACS) (setq kanji-display-code 3))
         ((boundp 'MULE) (set-display-coding-system *euc-japan*)))

 (cond ((boundp 'NEMACS) (setq kanji-fileio-code 3))
                 ((boundp 'MULE) (set-default-file-coding-system *iso-2022-jp*))
)

 (cond ((boundp 'NEMACS) (setq kanji-input-code 3))
                ((boundp 'MULE) (set-keyboard-coding-system *euc-japan*)))

The reason for the above elisp lines is that pine is identifying that outgoing messages are iso-2022-jp and you want to be sure that your emacs editor is saving the file as iso-2022-jp so that pine can read it in and send it out to your mail server as iso-2022-jp.

An advantage of Pine is the ability to use IMAP4. This protocol is also supported in Netscape Communicator 4.0. However, the Linux version has a few problems with Japanese input.

This are some lines I have in my .pinerc for my provider. The mule -nw flag starts mule in the same kterm that pine is running in. nw stands for no window.

You can do the Japanese input with kinput2 or uum. In your Pine setup you should set the character-set variable to ISO-2022-JP and your editor is sending iso-2022-jp encoding characters to Pine.

# Sets domain part of From: and local addresses in outgoing mail.
user-domain=twics.com

# List of SMTP servers for sending mail. If blank: Unix Pine uses sendmail.
smtp-server=mail.twics.com
# Path of (local or remote) INBOX, e.g. ={mail.somewhere.edu}inbox
# Normal Unix default is the local INBOX (usually /usr/spool/mail/$USER).
inbox-path={beehive.twics.com}/users/craig/.mail

###################### Collections, Folders, and Files #####################

# List of incoming msg folders besides INBOX, e.g. ={host2}inbox, {host3}inbox
# Syntax: optnl-label {optnl-imap-host-name}folder-path
incoming-folders={beehive.twics.com}mail/[]

# List of directories where saved-message folders may be. First one is
# the default for Saves. Example: Main {host1}mail/[], Desktop mail\[]
# Syntax: optnl-label {optnl-imap-hostname}optnl-directory-path[]
folder-collections={beehive.twics.com}mail/[]

# make sure emacs or your default editor has 
# set-default-file-coding-system or other variable set to iso-2022-jp
character-set            = ISO-2022-JP       

# Specifies the program invoked by ^_ in the Composer,
# or the "enable-alternate-editor-implicitly" feature.
editor=/usr/local/bin/mule -nw

# Program to view images (e.g. GIF or TIFF attachments).
image-viewer=xv

# Sets the time in seconds that Pine will attempt to open a UNIX remote
# shell connection.  The default is 15, min is 5, and max is unlimited.
# Zero disables rsh altogether.
rsh-open-timeout=0

Procmail

Procmail is a handy program that can be used to filter mail coming from selected addresses. This can be useful if for example, you subscribe to a Japanese mailing list and want to isolate mail that contains Japanese characters. On my centralized mail server I have a .procmailrc file in my home directory.

beehive:~$ cat .procmailrc                                              
## Environment Variables
##

PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:/opt/procmail/bin:.
MAILDIR=$HOME/mail      # You'd better make sure it exists
LOGFILE=$MAILDIR/from
LOCKFILE=$HOME/.lockmail
SHELL=/usr/bin/sh

##
## TLUG Mailing List
##
:0
* ^TO.*tlug@misc.twics.com
tlug.incoming

In the example above, I'm filtering all my TLUG e-mail to a seperate inbox. In my .pinerc file of my local Linux box, I add the following line.

# List of incoming msg folders besides INBOX, e.g. ={host2}inbox, {host3}inbox
# Syntax: optnl-label {optnl-imap-host-name}folder-path
incoming-folders={beehive.twics.com}mail/tlug.incoming


next up previous contents index
Next: Mew Up: Mail Previous: Netscape-Centric Approach
Craig Toshio Oda
1998-05-07