Cameron,

Thanks!

> >>     https://hg.sr.ht/~cameron-simpson/css/browse/bin/mh2maildir?rev=tip
> >>
> >> Hmm, some years ago now, looking at the opening comment. And I'm using
> >> procmail for the conversion (!!!), so indeed quite a while ago. This
> >> script moves the MH folder sideways and makes an empty Maildir in its
> >> place, then delivers every message from the MH folder into the new
> >> maildir.
> >
> >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.)

>
> because I feared disaster. Easy as.
>
> >> These days I'd use mutt for the bulk conversion instead of procmail. You 
> >> can
> >> see an example of that approach in this script:
> >>
> >>     https://hg.sr.ht/~cameron-simpson/css/browse/bin/mboxify?rev=tip
> >
> >I see, this is for converting to mbox and needs to be modified for
>
> Yep. But the conversion is pretty trivial. Mutt autodetects the folder
> type. If a file, mbox. If a dir with tmp,new,cur, a Maildir. Probably MH
> otherwise.
>
> 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.)

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


> >According to this post here: https://www.systoolsgroup.com/maildir/ the 
> >filename has this "gator3018.hostgator.com" which I presume comes from the 
> >hostname. How do I get this changed to something else (unique, but not to 
> >the hostname)? Is this where mutt or procmail is to be told to do this, how?
>
> Not sure. The hostname is, IIRC, an optional component for making the
> filesnames; I'm not sure mutt offers any control over that. Here're a
> couple of names from my main inbox:
>
>     1386376685.65689_1131.fleet:2,S
>     1602208593.#2087M806900P64256:2,S
>
> The former has a hostname in it, the latter does not. [looks...] Hoo,
> the one with a hostname is Very Old. Likely delivered by procmail and
> spamassassin. These days I collect with getmail and file with my own
> mail filer. The code for making a new Maildir folder in the latter is
> this:
>
>     def newkey(self):
>         ''' Allocate a new key.
>         '''
>         now = time.time()
>         secs = int(now)
>         subsecs = now-secs
>         key = '%d.#%dM%dP%d' % (secs, seq(), subsecs * 1e6, self.pid)
>         assert self.validkey(key), "invalid new key: %s" % (key,)
>         return key

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.

>
> I believe once made, clients (mutt etc) don't muck with the names except
> to change the suffix (",S") which is where message flags are
> implemented (means you can set flags without editing the message file to
> fiddle a header).
>
> >
> >The reason for how I set things up, and that has worked reasonably well, is 
> >(you sort of guessed it) that I read e-mail at work and home, but the work 
> >machine is the one that I consider to be reliably backed up. It is also 
> >bigger in terms of disk. So what happens is that I fetchmail with keep, 
> >process e-mail at work using sylpheed and then fire up my home machine (a 
> >laptop) and fetchmail with keep from the POP server and the rsync it down 
> >(including the .sylpheed_mark and .sylpheed_cache). Then I work on the home 
> >machine, continue to fetchmail process e-mails, etc with sylpheed and when I 
> >am done (before I hibernate), I rsync it all up before I go back to work, so 
> >that when I go to the other (work) machine, I have the same status as I left 
> >at home/work. It has worked reasonably well.
>
> Ah, so you've always got an rsync between transitions. That should work
> just as well with Maildir.

Yes, thanks, as long as the names are identical between the two (or more) 
machines. Otherwise there will be duplication and my carefully-crafted 
situation will be lost:-(

> I'm also aware of a number of people who remote to their main machine: ssh in
> and run mutt there.

Oh, I used to do that, except with pine, around twenty years ago, over a phone 
line (no less). Strangely, I rarely lost connection and did not notice much of 
a slowness. For some reason, I don't see it succeeding nowadays. That is when I 
switched to my current approach (around 15 years ago).

> >Thanks, I have currently been using postfix too, but will probably try 
> >mutt's smtp (now that they have enabled office365 oauth2 support). Postfix 
> >has not yet done so, they have done some with gmail, but it is not 
> >completely clear to me yet how to use that with MS Office365. Same with 
> >msmtp, it seems.
>
> Fair enough. One advantage of postfix is that local programmes like cron
> can also send email. But of course, nothing prevents you having a
> working local postfix for the system and using mutt-smtp or one of the
> various "send with smtp" standalone tools as well.

If I can figure postfix out to run with MS O365's OAuth tokens (that is 
mandated by my employer), I think that will work well for me. Let us see. 
Problem is that not that many people in 0365 world with OAuth2 requirements 
seem to be enamored of local e-mail reading. So progress in figuring this out 
is slow.

Thanks again!
Ranjan



_______________________________________________
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