I was disconcerted (putting it mildly) when I discovered my outgoing mail
wasn't being saved.
I have a workaround which someone might like to tart up & incorporate in
the distro.
I've edited ~/.mh_profile:
postproc: /u02/summer/bin/mhpost
and /u02/summer/bin/mhpost reads:
#!/bin/bash
POST=/usr/lib/nmh/post
pwd >/dev/tty
C=$@
F=$5
A=''
Folder=outgoing/`date +%Y`/`date +%m`
mkdir -p ../$Folder
while [ "${1:0:1}" = '-' ]
do
A="$A $1 $2"
shift 2
done
ed $1 <<..
/^X-Exmh/
.a
fcc: ${Folder}
.
w
q
..
exec ${POST} $A $1
It's likely the script will not run with bash before 2.0;-) It's also not
very bullet-proof; it assumes that every hyphenated argument to post has a
following argument. I decided not to be very thorough when I discovered
post being called with an undocumented argument.
Having this script between the user & nmh allows simpler customisation
than changing post itself; while I chose to insert a fcc header, others
might prefer to file it differently, or even pick a random quote to insert
at the end.
--
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.