Thank you to:
Paul.Casteels <casteels_at_uia.ua.ac.be>
Larry Church <lchurch_at_Adobe.COM>
Volker Hejny <Volker.Hejny_at_exp2.physik.uni-giessen.de>
intrepid!tb_at_uunet.uu.net
Luis Quintana <quintana_at_jupiter.sbf.com>
Lucio Chiappetti <lucio_at_ifctr.mi.cnr.it>
Carlos Sanchez <csanchez_at_cirp.es>
Christophe DIARRA <diarra_at_ipno.in2p3.fr>
The original question was:
>
> Dear managers,
> one of our users have a problem with his mail. He usually read his mails
> with pine, and he had 93 messages in INBOX. But today he opened dxmail,
> chose 'New mail' and now his messages are 93 files in the ~/Mail/inbox
> directory. He can not read this messages from pine anymore. Is there an
> easy way to read his messages from pine again?
>
> Thank you,
>
> Beatriz Fuentes
>
>
Some of them have proposed the use of cat, in order to merge all the
files toget
her. I have tried this, but the result is that I have one new folder in
pine, bu
t not with 93 messages, but with one long message containing the others.
Carlos Sanchez proposed the mailcv utility, which runs under DU 4.0.
Unfortunate
ly, I have DU 3.2C.
The solution came from Larry Church: use /usr/bin/mg/packf (see packf man
pages)
, which compress a folder into a single file. Each message in the file is
separa
ted by four <CTRL/A>s and a newline, so it can be read correctly by pine.
Paul Castells wrote a very simple perl script to convert dxmail folders
to a pin
e folder named dxmail. It works without any problem. Here is the script:
#!/bin/perl
#
# Converts dxmail inbox to dxmail pine folder
#
$home = $ENV{"HOME"};
opendir(DIR,"$home/Mail/inbox") || die "Failed to open Mail/inbox sub-dir
\n";
_at_files = readdir(DIR);
closedir(DIR);
open(OUT,">$home/mail/dxmail") || die "Failed to create mail/dxmail \n";
foreach $file (_at_files) {
if ($file =~ /\d+/) {
open(IN,"<$home/Mail/inbox/$file") || die "Failed to open $file \n";
print OUT "From casteels Fri Feb 14 10:00:00 1997\n";
while (<IN>) {
print OUT $_;
}
close (IN);
print "$file \n";
}
}
close(OUT);
Finally, here are other two interesting mails:
>From Volker.Hejny_at_exp2.physik.uni-giessen.deWed Mar 26 09:55:34 1997
Date: Tue, 25 Mar 1997 22:30:57 +0100 ()
From: Volker Hejny <Volker.Hejny_at_exp2.physik.uni-giessen.de>To: Beatriz
Fuentes Arenaz <beatriz_at_fpddux.usc.es>
Subject: Re: [Q]: dxmail and pine
Hello,
the problem is, that pine and dxmail use different formats for their
mail folders: pine the standard (berkeley?) format (files of the
inbox-structure) and dxmail the mh-standard (folders as directories
and each mail in an own file.
dxmail reads the inbox file and moves the mail in the directory
~/Mail/inbox
There are two ways to read the mail with pine
1) If the user don't want to use dxmail again
Their is one script (packmbox), which can convert a mh-folder back
to the pine-standard:
-------------CUT
#! /bin/sh
# packmbox - pack an MH folder back into a UUCP-style mbox
# _at_(#)$Id: packmbox.sh,v 1.16 1992/02/14 17:05:31 jromine Exp $
#
# Defaults:
# `+folder' defaults to current folder
# `msgs' defaults to all
#
# Context:
# Current-Folder
#
# for simplicity (and speed) we don't parse command-line args (much)
case $#/$1 in
1/-h*) echo "syntax: packmbox [+folder] [msgs] [-help]" 1>&2; exit 0;;
esac
format="%(msg) From \
%<{return-path}%(putstr)%|\
%<(nonnull(mbox{from}))%(putstr)%|nobody%>_at_\
%<(nonnull(host{from}))%(putstr)%|nowhere%>%> \
%(day{date}) %(month{date}) %2(mday{date}) \
%02(hour{date}):%02(min{date}):%02(sec{date}) \
%(void(year{date}))%<(gt 100)%4(putnum)%|19%02(putnum)%>"
trap 'rm -f /tmp/packm$$; exit 1' 1 2 3 15
scan -noclear -noheader -noreverse -width 256 \
-format "${format}" $* >/tmp/packm$$
# tricky -- you must do this "cd" after scan has updated the context
cd `mhpath`
exec </tmp/packm$$
rm -f /tmp/packm$$
while read m f
do
echo "$f"
sed -e '/^From /s/^/>/' < $m
echo ""
done
exit
--------------CUT
To execute this script the PATH-variable has to contain the path to the
mh directory (/usr/bin/mh). With "packmbox +inbox >> pine-folder" the
mails can be appended to an existing pine-folder.
2) If the user wants to use pine and dxmail together
Pine supports the mh-standard, too. The user must add the mh-folder
to his/her folder-collection. I don't remember the syntax at the
moment, it's something with 'mh#' inside. Please read the pine-FAQ
to check this. It's described there.
I hope, I could help you.
V. Hejny
==============================================================================
Volker Hejny, II. Phys.Institut, Univ. Giessen | Tel.: 0641 - 702 33223
Heinrich-Buff-Ring 16, D-35392 Giessen | Sekretariat II. Physik:
EMail: Volker.Hejny_at_exp2.physik.uni-giessen.de | Tel.: 0641 - 702 33261
WWW:
http://piggy.physik.uni-giessen.de/~hejny | Fax : 0641 - 74390
==============================================================================
>From lucio_at_ifctr.mi.cnr.itWed Mar 26 10:01:58 1997
Date: Wed, 26 Mar 1997 08:52:22 +0100 (MET)
From: Lucio Chiappetti <lucio_at_ifctr.mi.cnr.it>
To: Beatriz Fuentes Arenaz <beatriz_at_fpddux.usc.es>
Subject: Re: [Q]: dxmail and pine
argh !
after some experimenting with various mail systems long ago I found
pine much better than anything else.
Also pine (as many other mail systems, like the default /usr/ucb/mail
or /usr/bin/mailx Unix mailer, or even Netscape or Eudora) uses the
default Unix folder format, while dxmail and mh don't !
Well, I do not have at hand a dxmail file (and I don't want to create
one screwing up my inbox), but I suppose one can just concatenated all
dxmail files (with cat, or with an editor) into a single file, move this
to the place where pine folders are, and use pine to save interesting
messages to other folders.
The file shall have the format of an Unix folder. This is described
in Pine technical documentation. I did this long ago moving from VMS
to Unix, and do not recall the details, but essentially a folder is :
1a an "Unix from" line
1b an RFC822 mail header
1c a blank line
1d the message body
1e another blank line
2a an "Unix from" line and so on with the next message
...
I am not sure whether dxmail saves in a file the entire set a-e or
just b-e. The "Unix from" line has a form like
>From lucio_at_ifctr.mi.cnr.it Fri Jan 10 10:09:55 1997
It is different from the RFC822 mail header which contains kewyords
like Date: From: To: etc. terminaned by a semicolon.
The Unix from line has no semicolon after "From".
As far as I know, if dxmail does not save the Unix from line, you can
put anything there provided it has the right format. Pine is particularly
picky with the date format, see documentation.
----------------------------------------------------------------------------
Lucio Chiappetti - IFCTR/CNR - via Bassini 15 - I-20133 Milano (Italy)
----------------------------------------------------------------------------
Fuscim donca de Miragn E tornem a sta scio' in Bregn
Che i fachign e i cortesagn Magl' insema no stagn begn
Drizza la', compa' Tapogn (Rabisch, II 41, 96-99)
I am not sure whether dxmail saves in a file the entire set a-e or
just b-e. The "Unix from" line has a form like
>From lucio_at_ifctr.mi.cnr.it Fri Jan 10 10:09:55 1997
It is different from the RFC822 mail header which contains kewyords
like Date: From: To: etc. terminaned by a semicolon.
The Unix from line has no semicolon after "From".
As far as I know, if dxmail does not save the Unix from line, you can
put anything there provided it has the right format. Pine is particularly
picky with the date format, see documentation.
----------------------------------------------------------------------------
Lucio Chiappetti - IFCTR/CNR - via Bassini 15 - I-20133 Milano (Italy)
----------------------------------------------------------------------------
Fuscim donca de Miragn E tornem a sta scio' in Bregn
Che i fachign e i cortesagn Magl' insema no stagn begn
Drizza la', compa' Tapogn (Rabisch, II 41, 96-99)
----------------------------------------------------------------------------
For more info :
http://www.ifctr.mi.cnr.it/~lucio/personal.html
---------------------------------------------------------------------------
Thank you to everybody,
Beatriz Fuentes
Departamento de Fisica de Particulas
Universidad de Santiago de Compostela
Spain (*)
(*) Si, Luis, "es" es espana
Received on Wed Mar 26 1997 - 12:27:29 NZST