<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>That was a good meeting last night. Some good speakers and some
swag to boot... Also nice to see so many new faces last night.<br>
</p>
<p>This is a good script, Khalid. I've been doing this process more
or less manually, and at random times, by going into Thunderbird,
downloading any over-large folders to the local client, then
zipping up the resulting .eml files and storing them on my own
backups server. While it's considerably more work than your
script, it does allow me some leeway in what folders I clean up
(i.e. do I want to keep this year's stuff online, can I break
larger folders down by years, etc.)</p>
<p>Maybe once I get my manual process to the point where your script
can take over, I can give the impression of being much more
organized...</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 2018-05-08 01:05 AM, Khalid
Baheyeldin wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+TuoW3=USg0w9BSMeuOgc+6PJq8gsurzWvvCYPGtXLz+q_jNA@mail.gmail.com">
<div dir="ltr">
<div>So, the tool I use to get mail from Gmail and save it
locally is 'getmail4' (name of package in Ubuntu).<br>
<br>
I run it as follows, once a day from cron:<br>
<br>
getmail -r gmail.rc<br>
<br>
</div>
The gmail.rc file has the following:<br>
<div>
<div><br>
</div>
<div>#=== START<br>
</div>
<div>[retriever]<br>
type = SimpleIMAPSSLRetriever<br>
server = <a href="http://imap.gmail.com"
moz-do-not-send="true">imap.gmail.com</a><br>
username = YOUR_EMAIL_ID # without @...<br>
password = YOUR_PASSWORD<br>
mailboxes = ( "[Gmail]/All Mail", "[Gmail]/Sent Mail",
"[Gmail]/Drafts" )<br>
<br>
[destination]<br>
type = Maildir<br>
path = ~/mail/gmail/<br>
<br>
[options]<br>
verbose = 0<br>
message_log = ~/mail/gmail.log<br>
read_all = false<br>
max_messages_per_session = 1000<br>
received = false<br>
delete = false<br clear="all">
<div>
<div>#=== END<br>
<br>
</div>
<div>You may need to enable that setting in Gmail that
allows low grade encryption (or was it plain text?),
forgot its exact name.<br>
<br>
</div>
<div>In the directory ~/mail/gmail, the script will create
subdirectories called 'cur', 'tmp', and 'new'. The first
is what contains your emails. The 'new' directory
contains some emails, not sure how they are different
from the ones in 'cur'.<br>
<br>
</div>
</div>
<div>As I mentioned, the objectives were to: <br>
<br>
a) have a backup, and <br>
b) find out which messages take the most space and delete
them from Gmail<br>
<br>
</div>
<div>The first one is achieved, but all the messages are in
one directory, one file each. So they are not sorted in
any useful order nor by Gmail Label or date or anything. <br>
<br>
</div>
<div>They are searchable by grep and friends though, and
size can be determined via ls (but that will just give you
a list of cryptic file names, and you have to use less or
something to look inside it).<br>
<br>
You can point something like mutt to the directory, but
not sure how the performance will be.<br>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>Khalid M. Baheyeldin<br>
<a href="http://2bits.com" target="_blank"
moz-do-not-send="true">2bits.com</a>, Inc.<br>
Fast Reliable Drupal<br>
Drupal optimization, development, customization and
consulting.<br>
Simplicity is prerequisite for reliability. --
Edsger W.Dijkstra<br>
Simplicity is the ultimate sophistication. --
anonymous<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
kwlug-disc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:kwlug-disc@kwlug.org">kwlug-disc@kwlug.org</a>
<a class="moz-txt-link-freetext" href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a>
</pre>
</blockquote>
<br>
</body>
</html>