Comments (1)
Technically speaking, [Gmail]/All Mail is documented as the default for
the --remote-folder option, but I agree it's not entirely clear. :-)
Alas, I'm travelling and don't have the creds to update this right now.
(Pull request will be gladly accepted once I'm back home.)
I hadn't considered the multiple folder enumeration case. Gmail has the
All Mail folder, which -- as the name implies -- gets all the mail.
I've since moved on to Fastmail, which doesn't have the All Mail but
instead has an Archive folder for disposed mail. This is what I
currently point imap2maildir at.
So there's a couple approaches I see:
-
The Naive Approach: do open_mailbox_*, open_sql_session, and
copy_messages_by_folder for each folder. This will create unique
maildirs and SQL caches for each folder. This would be quick and
easy to implement, but might not be ideal for high-churn mailboxes
like INBOX, or cases where messages are moved between folders. -
The Smarter Approach: use one local mailbox and SQL session for all
the folders, and tag each message with the folder it came from (and
update the tags on future runs, if the message moves). I think this
would be pretty efficient, because it wouldn't have to
download/store messages repeatedly, but it would take some thought
and effort to get right.
Depending on your application, the Naive Approach might be good enough.
Thoughts/comments? -rt
On Thu, May 5, 2016, at 00:25, Victor Hooi wrote:
It seems that by default, we assume the IMAP account is Gmail:
Opening sqlite3 database
'/Users/victorhooi/Documents/melmail/.imap2maildir.sqlite' Exception!
Clearing locks and safing database. Traceback (most recent call last):
File "./imap2maildir", line 577, in main seencache=seencache) File
"./imap2maildir", line 464, in copy_messages_by_folder
outdict['total'] = len(folder) File
"/Users/victorhooi/code/imap2maildir/simpleimap.py", line 390, in
len raise Exception('folder %s: %s' % (self.folder, data[0]))
Exception: folder [Gmail]/All Mail: [TRYCREATE] Specified mailbox does
not exist. Traceback (most recent call last): File "./imap2maildir",
line 596, in main() File "./imap2maildir", line 577, in main
seencache=seencache) File "./imap2maildir", line 464, in
copy_messages_by_folder outdict['total'] = len(folder) File
"/Users/victorhooi/code/imap2maildir/simpleimap.py", line 390, in
__len raise Exception('folder %s: %s' % (self.__folder, data[0]))
Exception: folder [Gmail]/All Mail: [TRYCREATE] Specified mailbox does
not exist.This should probably be documented somewhere in the README.
In my case, I'm trying to pull down an Outlook.com address - I can use
--remote-folder="FOLDER" to pull down specific folders, but there
doesn't seem to be any way to pull down all folders and email?
Is it possible to enable imap2maildir to enumerate all folders from
the root, and pull them down? This seems like it might be a useful
feature. Apologies if I'm somehow missed it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub[1]
Links:
from imap2maildir.
Related Issues (20)
- Bad quote_re HOT 4
- Handling \\ in the subject line HOT 1
- imap2imap branch: bring into master
- Work around Google marking fetched messages as read HOT 2
- TypeError in parseFetch HOT 1
- Missing Chat Logs HOT 4
- Invalid mailbox name HOT 5
- Search criteria problem HOT 1
- Connection attempts blocked by GMail "unsafe application" filter
- Warn that it must be run with python2
- Gmail requires localized --remote-folder="[Gmail]/All Mail" parameter
- Turbo mode skipping emails it shouldn't skip HOT 2
- Couldn't retrieve uid b'116' HOT 1
- "Hole" in mailbox not being properly handled HOT 2
- Recursive fetch of all mailboxes (Feature request) HOT 3
- Failure for ~200k messages HOT 13
- Better IMAP error handling
- Turbo mode: don't do a SQL query for each uid HOT 1
- Better UID handling
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imap2maildir.