fucking imap fucking sucks. what the FUCK kind of committee of dunces designed this shit.
imap talks about ‘unique ids’ for messages, to be used for cross-session identification. great—just what sup needs! except it turns out the uids can be invalidated every time the ‘uidvalidity’ value changes on the server, and ‘uidvalidity’ can change without restriction. it can change any time you log in. it can change EVERY time you log in. of course the imap spec "strongly recommends" that it never change, but there‘s nothing to stop people from just setting it to the current timestamp, and in fact that‘s EXACTLY what the one imap server i have at my disposal does. thus the so-called uids are absolutely useless and imap provides no cross-session way of uniquely identifying a message. but thanks for the "strong recommendation", guys!
so right now i‘m using the ‘internal date’ and the size of each message to uniquely identify it, and i scan over the entire mailbox each time i open it to map those things to message ids. that can be slow for large mailboxes, and we‘ll just have to hope that there are no collisions. ho ho! a perfectly reasonable solution!
and here‘s another thing. check out RFC2060 2.2.2 paragraph 5:
A client MUST be prepared to accept any server response at all times. This includes server data that was not requested.
yeah. that totally makes a lot of sense. and once again, the idiocy of the spec actually happens in practice. you‘ll request flags for one message, and get it interspersed with a random bunch of flags for some other messages, including a different set of flags for the same message! totally ok by the imap spec. totally retarded by any other metric.
fuck you, imap committee. you managed to design something nearly as shitty as mbox but goddamn THIRTY YEARS LATER.
VERSION | = | "0.10.2" |
BASE_DIR | = | ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup") |
CONFIG_FN | = | File.join(BASE_DIR, "config.yaml") |
COLOR_FN | = | File.join(BASE_DIR, "colors.yaml") |
SOURCE_FN | = | File.join(BASE_DIR, "sources.yaml") |
LABEL_FN | = | File.join(BASE_DIR, "labels.txt") |
CONTACT_FN | = | File.join(BASE_DIR, "contacts.txt") |
DRAFT_DIR | = | File.join(BASE_DIR, "drafts") |
SENT_FN | = | File.join(BASE_DIR, "sent.mbox") |
LOCK_FN | = | File.join(BASE_DIR, "lock") |
SUICIDE_FN | = | File.join(BASE_DIR, "please-kill-yourself") |
HOOK_DIR | = | File.join(BASE_DIR, "hooks") |
YAML_DOMAIN | = | "masanjin.net" |
YAML_DATE | = | "2006-10-01" |
DEFAULT_NEW_INDEX_TYPE | = | 'xapian' |
exceptions | [R] |
to be called by entry points in bin/, to ensure that their versions match up against the library versions.
this is a perennial source of bug reports from people who both use git and have a gem version installed.
not really a good place for this, so I‘ll just dump it here.
a source error is either a FatalSourceError or an OutOfSyncSourceError. the superclass SourceError is just a generic.