[Techtalk] emails in MH format to Maildir format?

Anne Wainwright anotheranne at fables.co.za
Sun Feb 26 18:57:30 UTC 2012


On Sun, Feb 26, 2012 at 09:45:26AM -0800, Akkana Peck wrote:

> Anne Wainwright writes:
> > In the process of creating and using a .procmailrc file I omitted to put
> > the trailing slash after the folder name. Thus I found incoming mail now
> > saved in MH format.
> 
> Are you sure they're MH format? I use procmail with mutt, don't
> have trailing slashes on folder names, and procmail saves everything
> in mbox format (which is what I want). I know that mutt FAQ says mh,
> so it must happen under some circumstances, but make sure that's really
> what you have.

my .muttrc contains the line
set mbox_type=maildir

so I assume that is what I have. further, now that I have a trailing
slash operation is back to normal with readable emails going into the
appropriate folders.

each email is a seperate file, a feature of maildir

the file has a unique name. e.g. 1328444632.13217_7.jason;2,s which my
limited knowledge says is a maildir type name from yesterday's
investigations.

on the other hand, the rogue files created without the trailing slash
have a name of the format msg.YhKE . They also are one message per file.

After using the process under discussion we have a directory with emails
consecutively numbered from 1 up, with the .mh_sequences file, same as
mentioned in the mutt faq and same as in my Claws email setup which uses
MH natively.

So, circumstantial, but I am certain that the errant entries are MH.
Forgot about laptop Claws, should have maybe gone the mh route but
copied bits of the .muttrc out of a debian help page on mutt and that is
how I landed there.

(must check that old server, sure it has a Reiser fs on there which is
good for lots of little files)

why am I using mutt? I ssh from home to server for various things, and I
have a few special email things on there which now includes Techtalk and
all other mailing list subscriptions.

> 
> > I went through the process but I find that the wording in the last para
> > is not clear. Am I correct in that having the MH emails in a proper MH
> > folder will allow me to move them using mutt into a maildir folder, and
> 
> Yes, that's my understanding of what it says.
> 
> > at that stage they will be automagically saved in the maildir format?
> 
> The ones you move with mutt will be saved in maildir format, but of
> course new mail coming in will follow your procmail recipe.
> 
> > Also any comment on that command line recipe, I did not have success
> > with that and modified it to convert the files one at a time (not too
> > many thankfully).
> 
> What error did it give? 

-bash: `$msg': not a valid identifier

my shell scripting abilities are nil. however I retried substituting
msg.* getting the error

-bash: `msg.*': not a valid identifier

> You're saying that calling
>  cat filename | $RCVSTOREPATH/rcvstore -unseen
> worked, but doing it inside the for msg in *; do failed?

exactly, I did it filename by filename, and manually put in the
$RCVSTOREPATH as /usr/lib/mh (which is correct, not /nmh as suggested in
the mutt faq) and with a configured .mh_profile off we went. I could not
echo that environment variable so replaced it with the full path.

> Are you sure you're only passing it mh-format messages,
> not earlier messages that are already in maildir format?

in the directory that I am processing there are the three other maildir
directories cur, new, tmp, but the mh files are the only files there.

I am going to redo the whole process since I ended up with a crazy
directory structure to access the processed emails, probably also due to
using non-existant environment variables, ie I had a $HOME directory in
~/ .

Thanks for the input, I'd be keen to know what it is with the shell
script, probably the $msg but how do I make it take a wildcard. I tried
'' around the whole thing.

Anne
> 
> 	...Akkana
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk


More information about the Techtalk mailing list