First you must make sure that your MH (or nmh) is compiled with support for POP. You can check by running "inc -help" and check that it supports the -host command line argument. You set the name of the POP3 mail server host under Incorporate Mail or The Top Ten preferences. You can also set up a ~/.netrc file that lists your POP3 servers and user accounts. This option requires the Expect program so that exmh can automatically manage your POP3 password.
If you do
not have expect, you must put your password into your .netrc file
and leave your POP3 mail host preferences setting empty.
The .netrc file contains lines in the following format:
machine mail.wherever.com login yourlogin password "a secret"
Put an Xresource specification into your ~/.exmh/exmh-defaults
file:
*Text*font: -*-courier-*-*-*-*-*-*-*-*-*-*-iso8859-* *Ftoc*Text*font: -*-courier-*-*-*-*-10-*-*-*-*-*-iso8859-*
There are many Compose key sequences that are defined to let you do this. Your X environment may also specially map some keys. For a list of the Compose key sequences, select the Compose Key menu entry under Bindings. Press the Compose key and then the two characters in the left list in order to get the special character on the right hand side. You can redefine what the Compose key is mapped to in the Simple Edit Bindings... dialog.
The folder table of contents is generated by the MH/nmh scan
program. Only the nmh scan program supports decoding RFC-2047
headers. The nmh package is highly preferred over the older MH due to
security holes in MH.
NOTE: This answer depends on your UNIX system having a complete and
correct implementation of "locales".
You have to do several things right for everything to work:
decode in the appropriate places of relevant format or filter
files. Here's an example scan.form (this is the nmh default scan.form):
%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
%<(zero)%17(decode(friendly{from}))%> \
%(decode{subject})%<{body}<<%{body}>>%>
MM_CHARSET=iso-8859-1
LC_CTYPE appropriately.
The easiest way is just to set the environment variable
LANG. Setting LANG=en_US works on Red Hat
Linux 6.x but may depend on your Unix variant. Try running the
command locale -a to see what locales are available on
your system. Use the locale command to verify the
settings.
LESSCHARSET=latin1 if you use nmh from the command-line
with less(1) as your pager.
One final note: You may still see headers that appear to be correctly encoded but are not decoded. RFC 2047 specifies that the encoded text may not contain unencoded spaces. Spaces must be encoded, either as "=20" or as an underscore. The exmh message display window will accept headers with unencoded spaces, but the nmh scan program will not. Such incorrectly encoded headers will be decoded in the message window but will not be decoded in the folder TOC.
The most likely cause is that the TK send facility does not work for you because of Xauthority issues. See FAQ 4a & 4b. If you cannot get send working, you have two options. First, disable the background process so that all periodic activity is done in the front-end. Do this via the preferences entry for Background Processing.
Another cause that might disable inc completely is lack of the MAILDROP environment variable. This should be set to the name of the spool file that contains incoming mail (unless you are using POP). The latest Exmh will warn you about this and try to choose a default value, but to be safe you should set this up properly.
echo 'send exmh {Exmh_Status "Hello, world!"}; exit' | wish
In addition, if there are any hosts explicitly lists, you must explicitly remove them:
xhost -localhost
There is a Background Processing preferences setting to clear out your xhost list automatically. You need to restart exmh for this setting to take effect.
if [ ! \( -d $HOME -a -w $HOME \) ]; then
echo "Warning: Can't write X authority file" 1>&2 ;
auth_args=""
else
authfname=$HOME/.xnews.`uname -n`$DISPLAY
${OPENWINHOME}/lib/mkcookie $authfname -auth magic-cookie
auth_args="-auth $authfname"
fi ;
${OPENWINHOME}/bin/xnews $auth_args $server_args $xnews_config_args ;;
There is a more lengthy example given in the misc/Xauthority file that comes with the exmh distribution.
http://ce-toolkit.crd.ge.com/tkxauth/
for how to set up xauth on your server. When you log into work, just set up a local script that does:
xauth nlist $DISPLAY | rsh host.at.work.com xauth nmerge -
to resynchronize the session key.
You can set up rsh to work correctly. In your .rhosts at work, put a line like:
host.at.home.net homeuser
and change the command above to read:
xauth nlist $DISPLAY | rsh host.at.work.com -l workuser xauth nmerge -I have had mismatched accounts on lots of hosts, and nary a problem keeping the session keys in sync.
A better answer, however, is to use ssh (the secure shell) instead of rsh. Ssh is a drop-in replacement for rsh but with security features including encryption and authentication. It also tunnels X traffic through the encrypted link and automatically sets your DISPLAY variable on the remote side.
There are pointers to these packages in the software page.
xbmsize48 | xbm2ikon | compfaceIf you put an X-Face header in your replcomps file (see 15) then you need to double any % and \ in the X-Face string. For example,
abc%def\efgneeds to be written as
abc%%def\\xyzin the X-Face header of your replcomps files.
uncompface | ikon2xbm(You might need absolute pathnames if these programs are not otherwise on your PATH). uncompface comes with the faces package. ikon2xbm comes with exmh as misc/ikon2xbm.c Just compile it with
cc -o ikon2xbm ikon2xbm.cNote, this is slower than I'd like, plus the results are not saved anywhere. The intended use of the X-Face header was that the mail agent would update the facesaver database in the background using it.
There are two different approaches that may be used to read news with exmh. The older technique requires that the news hiearchy be available locally or via NFS. Here's the writeup on that:
To get started, just make a symbolic link from your ~/Mail
directory into the news spool file system. This requires access
(e.g., NFS) to the news spool file system, of course. You can do
it for a single newsgroup, i.e. clari.feature.dilbert. My symlink
looks like:
Mail/dilbert -> /net/news/news-1/news/spool/clari/feature/dilbert
Or, you can link into the interior of the news hierarchy. You
might run into a problem from the MH folders command that limits
it to about 300 folders. Change the NFOLDERS constant in MH
src/h/mh.h from 300 to 30,000 and you shouldn't have any more
trouble ;-)
The other technique requires that news be available via an NNTP server. This technique will presort articles into your folders and is described elsewhere in the documentation.
*activeBackground: #efefef *activeForeground: black *selector: black *background: #dfdfdf *foreground: black *selectBackground: #bfdfff *Scale.activeForeground: #efefef *Scale.sliderForeground: #dfdfdf *Scrollbar.foreground: #dfdfdf *Scrollbar.activeForeground: #efefef *Button.disabledForeground: #7f7f7f *Checkbutton.disabledForeground: #7f7f7f *Radiobutton.disabledForeground: #7f7f7f *Menu.disabledForeground: #7f7f7f
/bin/ps $pidWhile on SysV-style systems you need the -p flag
/bin/ps -p $pid
53 5 * * * find /home/cwg/Mail -name ',*' -exec rm {} \;
rmmproc: /bin/rm
This causes the MH rmm command to invoke /bin/rm to nuke
the message
*Mops.ubuttonlist: myrepl
*Mops.myrepl.text: Repl
*Mops.myrepl.command: Msg_Reply {any valid repl arguments here}
See the MH man page on repl for more details. Common flags
include
-cc me -nocc me -cc all -nocc all -filter form
There are three mailing lists, and an archive. First, and this is important, send subscription requests to the corresponding -request address, not the main lists. Please. The exmh mailing lists are archived at http://www.xray.mpe.mpg.de/mailing-lists/exmh/
MH uses four template files depending on the operation. nmh adds a fifth type of template file. Default versions of the files are in the MH or nmh library directory. Copy these defaults into your ~/Mail directory so you can customize them. The files are:
reply filters - the -filter argument to repl specifies a filter that inserts and formats the body of the message to which you are replying. See the repl man page for details.
forward filters -- these control what headers are retained in the forwarded messages, and how those messages are forwarded.
man dist for more information on distcomps.
---------cut here for sample components file-----------
To:
Subject:
Fcc: outbox
Cc:
X-Face: "HxE|?EnC9fVMV8f70H83&{fgLE.|FZ^$>@Q(yb#N,Eh~N]e&]=>r5~UnRml1:4EglY{9B+
:'wJq$@c_C!l8@<$t,{YUr4K,QJGHSvS~U]H`<+L*x?eGzSk>XH\W:AK\j?@?c1o<k;j'Ei/UL)!*0
ILwSR)J\bc)gjz!rrGQ2#i*f:M:ydhK}jp4dWQW?;0{,#iWrCV$4~%e/3)$1/D
Brent Welch Xerox-PARC
------------end sample components file-----------------
---------cut here for replcomps - compare X-Face-Header differences------
%(lit)%(formataddr %<{reply-to}%|%<{from}%|%{sender}%>%>)\
%<(nonnull)%(void(width))%(putaddr To: )\n%>\
%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
%<(nonnull)%(void(width))%(putaddr cc: )\n%>\
%<{subject}Subject: Re: %{subject}\n%>\
%<{date}In-reply-to: %<(mbox{from})%(mbox{from})%|%(friendly{from})%>\
's message of \
%<(nodate{date})%{date}%|%(tws{date})%>.%<{message-id}
%{message-id}%>\n%>\
X-Face: "HxE|?EnC9fVMV8f70H83&{fgLE.|FZ^$>@Q(yb#N,Eh~N]e&]=>r5~UnRml1:4EglY{9B+
:'wJq$@c_C!l8@<$t,{YUr4K,QJGHSvS~U]H`<+L*x?eGzSk>XH\\W:AK\\j?@?c1o<k;j'Ei/UL)!*0
ILwSR)J\\bc)gjz!rrGQ2#i*f:M:ydhK}jp4dWQW?;0{,#iWrCV$4~%%e/3)$1/D
Fcc: outbox\n
--------------end sample replcomps file----------------
--------cut here for sample reply filter---------------
from:nocomponent,formatfield=\
">>>%(friendly{text}) said:"
body:component="> ",offset=1,overflowoffset=4
:
:---------------------------------
: Brent Welch Xerox PARC
----------end of sample reply filter-------------------
----------cut here for sample forwcomps file-----------
To:
Cc:
Subject:
Fcc: outbox
----------end of forwcomps file------------------------
----------cut here for sample forward filter-----------
width=80,overflowtext=,overflowoffset=10
leftadjust,compress,compwidth=9
Date:formatfield="%<(nodate{text})%{text}%|%(tws{text})%>"
From:
To:
cc:
Subject:
:
body:nocomponent,overflowoffset=0,noleftadjust,nocompress
----------end of sample forward filter-----------------
To use templates specific to a given folder, simply copy your components and/or replcomps files (see above) into that folder and edit them appropriately. Those files will be used as templates when composing new messages from within the folder or when replying to messages in that folder.
This feature works hierarchically. So for example, if you have several nested folders under Mail/exmh, and you have created the files Mail/exmh/components and Mail/exmh/replcomps, they'll be used (as above) when you're in any of those nested folders.
Folder-specific template files are a feature implemented by exmh; they are not a part of the normal MH/nmh functionality.
Use the Fcc: header, which puts a copy of your out-going mail into a folder. You can get this to appear in your messages in two ways.
<Ethan Miller says:> I use the mp package to print mail (and other files as well). Mailp (one of the commands in mp) prints mail nicely. My print command is:
mailp -landscape -twosided -bsdprinter $file<Anne Possoz adds:> But without metamail piped to mp, in certain circumstances like mail coming from MacIntosh (is0-8859, ow to set up xauth on your server. When you log into work, just set up a local script that does:
xauth nlist $DISPLAY | rsh host.at.work.com xauth nmerge -
to resynchronize the session key.
You can set up rsh to work correctly. In your .rhosts at work, put a line like:
host.at.home.net homeuser
and change the command above to read:
xauth nlist $DISPLAY | rsh host.at.work.com -l workuser xauth nmerge -I have had mismatched accounts on lots of hosts, and nary a problem keeping the session keys in sync.
A better answer, however, is to use ssh (the secure shell) instead of rsh. Ssh is a drop-in replacement for rsh but with security features including encryption and authentication. It also tunnels X traffic through the encrypted link and automatically sets your DISPLAY variable on the remote side.
There are pointers to these packages in the software page.
xbmsize48 | xbm2ikon | compfaceIf you put an X-Face header in your replcomps file (see 15) then you need to double any % and \ in the X-Face string. For example,
abc%def\efgneeds to be written as
abc%%def\\xyzin the X-Face header of your replcomps files.
uncompface | ikon2xbm(You might need absolute pathnames if these programs are not otherwise on your PATH). uncompface comes with the faces package. ikon2xbm comes with exmh as misc/ikon2xbm.c Just compile it with
cc -o ikon2xbm ikon2xbm.cNote, this is slower than I'd like, plus the results are not saved anywhere. The intended use of the X-Face header was that the mail agent would update the facesaver database in the background using it.
There are two different approaches that may be used to read news with exmh. The older technique requires that the news hiearchy be available locally or via NFS. Here's the writeup on that:
To get started, just make a symbolic link from your ~/Mail
directory into the news spool file system. This requires access
(e.g., NFS) to the news spool file system, of course. You can do
it for a single newsgroup, i.e. clari.feature.dilbert. My symlink
looks like:
Mail/dilbert -> /net/news/news-1/news/spool/clari/feature/dilbert
Or, you can link into the interior of the news hierarchy. You
might run into a problem from the MH folders command that limits
it to about 300 folders. Change the NFOLDERS constant in MH
src/h/mh.h from 300 to 30,000 and you shouldn't have any more
trouble ;-)
The other technique requires that news be available via an NNTP server. This technique will presort articles into your folders and is described elsewhere in the documentation.
*activeBackground: #efefef *activeForeground: black *selector: black *background: #dfdfdf *foreground: black *selectBackground: #bfdfff *Scale.activeForeground: #efefef *Scale.sliderForeground: #dfdfdf *Scrollbar.foreground: #dfdfdf *Scrollbar.activeForeground: #efefef *Button.disabledForeground: #7f7f7f *Checkbutton.disabledForeground: #7f7f7f *Radiobutton.disabledForeground: #7f7f7f *Menu.disabledForeground: #7f7f7f
/bin/ps $pidWhile on SysV-style systems you need the -p flag
/bin/ps -p $pid
53 5 * * * find /home/cwg/Mail -name ',*' -exec rm {} \;
rmmproc: /bin/rm
This causes the MH rmm command to invoke /bin/rm to nuke
the message