This commit introduces LibreJS compatible `@license' blocks as per
https://www.gnu.org/software/librejs/free-your-javascript.html
The magnet URI can be opened in a BitTorrent client to retrieve a copy
of the MIT/Expat license. Section 3.2.2.1 from the above link has a
list of magnet URIs for various free software licenses.
I was on the fence about adding this in the first place. The state of an
email being \Deleted but still in this inbox is unusual, and unlikely to
occur unless the user is already somewhat knowledgable about IMAP and
utilizing power-user-level tooling which could cause the situation to
arise. Alps does not target that kind of user, so this can be hidden.
This patch:
1. Copies unsent messages to the outbox before attempting to deliver
them with SMTP
2. Deletes those messages once they're sent, or leaves them if an error
occured
3. Updates the message list to make it obvious when there are unsent
messages in the outbox
This one is a bit of a doozy. A summary of the changes:
- Session has grown storage for attachments which have been uploaded but
not yet sent.
- The list of attachments on a message is refcounted so that we can
clean up the temporary files only after it's done with - i.e. after
copying to Sent and after all of the SMTP attempts are done.
- Abandoned attachments are cleared out on process shutdown.
Future work:
- Add a limit to the maximum number of pending attachments the user can
have in the session.
- Periodically clean out abandoned attachments?
This can happen if an email is deleted by an external client, and this
change fixes a template crash in such cases.
I elected to display (deleted email) rather than to hide deleted
messages so that, if the message is unread, it provides an explanation
for your inbox showing $n unread emails where $n > number of non-deleted
emails.
This partially addresses ~migadu/alps#121