Thanks! On Sat, 17 Oct 2020 11:37:27 +1100 Cameron Simpson <cs@xxxxxxxxxx> wrote: > On 16Oct2020 18:53, Ranjan Maitra <maitra@xxxxxxxxx> wrote: > >> >Thanks very much for this! I will try it out, but it appears to be for individual folders, is that correct? So, I will maybe write a script to call it. > >> > >> Yes. I just wrote a for loop on the command line. Something like: > >> > >> cd ~/mail > >> for mhdir in [a-z]*; do (set -x; mh2maildir "$mhdir") || break; done > > > >So, in this code, there is a command called ismhdir -- where does this come from? Is there something missing here? (I think it also shows up in your newer code.) > > Oh, there's probably a few of my scripts in that one. They're all > available from the same URL (go up to the bin/ URL). Or I can ship you a > tarball or you can clone the repo, whatever you find easy. No, thanks, I got it. Wow, you have a lot of scripts: some more may be useful. So, I tried your code: cd ~/mail for mhdir in [a-z]*; do (set -x; mh2maildir "$mhdir") || break; done But it only did the first folder and quit: I was thinking that it would go through the whole list of folders and sub-folders. I did get the following warning: procmail: Couldn't chdir to "" However, it appended the hostname. I looked at the script, but I could not figure out where this comes in from: is it the default in the procmail? Perhaps I should try the newer version, but am a little confused with how to make it convert the mh to mhdir? Do I simply set set mbox_type=maildir in my .muttrc? > >> So provided you _make_ an empty Maildir (mkdir $d $d/tmp $d/new $d/cur) > >> mutt will deliver into it correctly - no special modes. You only need to > >> instruct mutt when _it_ creates the mail folder, by setting: > >> > >> set mbox_type=maildir > >> > >> as your preference for new folders. > > > >My apologies, so my plan is to first get the change from MH to Maildir done and then start fetchmail/procmail to add to those folders after running it through sylfilter (which I package for Fedora) and then fire mutt up after that for reading/responding, etc. Of course, I am not sure if it is worthwhile to use sylfilter anymore given that it was integrated with sylpheed in the training but perhaps I can still keep that. (I will deal with that later.) > > You don't need to "switch to mutt" yet. You can still use it as a > conversion tool :-) Keep the previous MH folder there until you're happy > the Maildir is a faithful reproduction. > > >Yes, I can switch to getmail but I honestly don't know how much a learning curve that would be. Or are you recommending that I use getmail and then mutt on that (instead of procmail)? > > No obligation to switch to getmail, I was just describing the tools I > use for content. > > >I see. I do have a lot of conditions set by procmail so would like to try to keep that if possible. Perhaps I will stick to procmail. But does procmail handle Maildir according to any recipe that has to be set: for instance, I clearly do not want the hostname in the filenames. > > Stick with procmail until unhappy with it. It will deliver to Maildirs, > you change the form of the folder name. A trailing slash or something to > indicate the format. [...digs around...] I think "folder" for mbox, "folder/" > for Maildir, "folder/." for MH. > Yes, that is correct. Thanks very much again! Ranjan _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx