So, last December I got an email from the email hosting provider for Nidelven IT that the email server would be taken down in 6 months time.
I didn't like the timing, as I was in court process, the third one in 7 years about my kids, but understand that things are expensive to maintain, a potential security hole etc. when they age.
So I wrote a little script that pretty much would do what was necessary.
Then after some thinking, it struck me that this is something others would need to do, and it wasn't completely straightforward. So I decided I could model a script based on the process I was using.
Here's the script:
https://github.com/morphex/misc/blob/master/migrate-imap.py
I found the imapsync script:
https://github.com/imapsync/imapsync
Which can be used to do the heavy lifting. I read the license file for that project, and although I'm not a lawyer, it seems straightforward enough that I can use it for my needs. It might've been a better choice to use a known license, but whatever, it is very minimalist and straightforward in its wording.
The script just lists folders for now, then I guess it could build a shell script file which calls imapsync, and that can be inspected and executed.
I was scratching my head a bit as I was writing the script, as the print() statement printed parentheses, then I saw I was running it with python 2 and not 3.
Other than that, I wasn't able to figure out a way to parse command line options for the script using just getopt, am I missing something or is there another module?
from Planet Python
via read more
Subscribe to:
Post Comments (Atom)
TestDriven.io: Working with Static and Media Files in Django
This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...
-
Podcasts are a great way to immerse yourself in an industry, especially when it comes to data science. The field moves extremely quickly, an...
-
In an earlier tutorial we've already covered how to open dialog windows. These are special windows which (by default) grab the focus o...
-
If you are already developing Python GUI apps with PySide2, you might be asking yourself whether it's time to upgrade to PySide6 and use...
No comments:
Post a Comment