aboutsummaryrefslogtreecommitdiff
path: root/session.go
Commit message (Collapse)AuthorAgeFilesLines
* go fmtSimon Ser2021-07-051-4/+4
|
* Add notices on action completionDrew DeVault2020-11-191-0/+11
|
* Limit total size of unsent attachmentsDrew DeVault2020-11-191-9/+15
|
* Remove async SMTP queueDrew DeVault2020-11-131-2/+2
|
* Implement JavaScript UI for attachmentsDrew DeVault2020-10-291-7/+66
| | | | | | | | | | | | | | | | 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?
* Rename project to alpsSimon Ser2020-05-131-1/+1
|
* cmd/koushin: add -debug flagSimon Ser2020-02-111-1/+8
|
* Rename Session.connect to Session.connectIMAPSimon Ser2020-02-101-3/+3
|
* koushin: add Store interfaceSimon Ser2020-01-281-2/+16
| | | | References: https://todo.sr.ht/~sircmpwn/koushin/5
* koushin: rename Session.locker to imapLockerSimon Ser2020-01-281-10/+10
|
* Fix dangling goroutine on session expirationSimon Ser2020-01-201-3/+1
| | | | | | | | The timer channel may already have been drained by `case <-timer.C`. In this case, we need not to drain it again or we'll block forever. To fix this, stop draining the timer channel. Since we're not going to use the timer again anyway, it should be fine.
* go fmtSimon Ser2020-01-201-1/+1
|
* Add Session.SetHTTPBasicAuthSimon Ser2020-01-101-0/+8
| | | | | This is not 100% idiot-proof, but still makes it mroe difficult for plugins to steal credentials.
* Document that plugins don't have access to passwordsSimon Ser2019-12-171-0/+3
|
* go fmtSimon Ser2019-12-161-2/+2
|
* Replace Session.ConnectSMTP with Session.DoSMTPSimon Ser2019-12-161-7/+15
| | | | | This gives more flexibility in Session for optimizations, e.g. keep the SMTP connection around for some time if possible.
* Rename Session.Do to Session.DoIMAPSimon Ser2019-12-161-3/+3
|
* Introduce base pluginSimon Ser2019-12-161-4/+37
| | | | | | This plugin offers base IMAP/SMTP functionality. References: https://todo.sr.ht/~sircmpwn/koushin/39
* Fix undefined ErrSessionExpiredSimon Ser2019-12-121-1/+1
| | | | Fixes: f07ab5263246 ("Add docs")
* Add docsSimon Ser2019-12-111-1/+10
|
* Export Server.{Sessions,Plugins}Simon Ser2019-12-111-2/+2
| | | | And unexport a few internal functions.
* Unexport NewSessionManagerSimon Ser2019-12-111-1/+1
| | | | This isn't intended to be used by plugins.
* Export Context.SetSession, unexport Session.TokenSimon Ser2019-12-111-3/+2
| | | | | | | I'm uneasy exposing the token to plugins, I prefer to hide it if possible to prevent mis-use. This change allows plugins to logout users.
* Reconnect to IMAP server when logged outSimon Ser2019-12-091-11/+86
| | | | | | | | | | | | | | | The session manager has been upgraded to deal with reconnections. Each session has its own expiration timer. Each time a request is received, the expiration timer is reset. A session can be closed (this is used when the user wants to logout). When the IMAP connection is closed by the server, it's set to nil in the session. The next time an IMAP command needs to be issued, the connection is re-established. Closes: https://todo.sr.ht/~sircmpwn/koushin/30
* Make SessionManager create the IMAP clientSimon Ser2019-12-091-8/+38
| | | | | This will allow SessionManager to re-connect when the IMAP server logs the user out.
* Rename ConnPool to SessionManagerSimon Ser2019-12-091-0/+91