Created
December 3, 2015 18:49
-
-
Save tarnacious/927d3984e4b614ee814a to your computer and use it in GitHub Desktop.
All mail clients suck. This one just sucks less.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mailbox | |
import random | |
import os | |
# sample messages from my mail archive | |
sample_maildir = mailbox.Maildir('~/MailDir/private/archive') | |
sample_messages = sample_maildir.values() | |
# create a new maildir with two mailboxes | |
os.mkdir("./TestMaildir") | |
box1 = mailbox.Maildir('./TestMaildir/box1') | |
box2 = mailbox.Maildir('./TestMaildir/box2') | |
# populate the mailboxes with sample data | |
for _ in range(100000): | |
box1.add(random.choice(sample_messages)) | |
box2.add(random.choice(sample_messages)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set folder = ~/TestMaildir; | |
# cache makes a huge difference, ~30s to ~5s to open a mailbox | |
set header_cache = "mutt_header_cache" | |
set message_cachedir = "mutt_header_cache" | |
set spoolfile = "+box1" | |
# date is quick, sort by "threads" adds 5-10s after mailbox load | |
set sort = date | |
set sort_aux = reverse-last-date-received | |
# the default for change mailboxes is 1s, I have no idea why. | |
set sleep_time=0 | |
# two mail boxes | |
mailboxes +box1 \ | |
+box2 \ | |
# sidebar stuff, because I don't actually know how to use mutt with out. | |
set sidebar_visible = yes | |
set sidebar_width = 30 # width of sidebar | |
set sidebar_delim = '|' # sidebar delimiter | |
bind index,pager <down> sidebar-next | |
bind index,pager <up> sidebar-prev | |
bind index,pager <right> sidebar-open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment