On 16Oct2020 20:40, Ranjan Maitra <mai...@email.com> wrote:
>> >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.

The above for-loop quits if mh2maildir exits nonzero (some error). That 
way I get to debug without frying every following folder. Or digging the 
error output of a lot of other successful output.

>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?

Maybe you have no $MAILDIR envvar? Just guessing. That is an old script, 
and doesn't abort on unset envvars like my recent ones do.

The script writes a procmailrc file like this:

    MAILDIR=$MAILDIR
    DEFAULT=$mhdir/
    LOGFILE=$LOGDIR/procmail

I presume procmail expects $MAILDIR to exist?

Invoke the script like this:

    sh -uex /path/to/mh2maildir your-mh-folder

and see what the output looks like. That will show you what is happening 
in more detail.

>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?

Nah, it isn't using mutt. It sets $DEFAULT to $mhdir/, and that trailing 
slash says to treat $mhdir as a Maildir.

The script moves the original MH folder to $mhdir-mh and makes an empty 
$mhdir to be the new Maildir. It looks like it expected procmail to make 
the tmp/new/cur subdirs.

Cheers,
Cameron Simpson <c...@cskk.id.au>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org

Reply via email to