aboutsummaryrefslogtreecommitdiffstats
path: root/server.go
Commit message (Collapse)AuthorAgeFilesLines
* Implement JavaScript UI for attachmentsLibravatarLibravatar Drew DeVault 2020-10-291-0/+4
| | | | | | | | | | | | | | | | 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?
* Rig up dowork event queue and graceful terminationLibravatarLibravatar Drew DeVault 2020-10-231-0/+3
|
* go fmtLibravatarLibravatar Simon Ser 2020-05-201-2/+2
|
* login: set encrypted "remember me" tokenLibravatarLibravatar Drew DeVault 2020-05-201-4/+75
|
* Rename project to alpsLibravatarLibravatar Simon Ser 2020-05-131-4/+4
|
* Add default ports for IMAP and SMTPLibravatarLibravatar Simon Ser 2020-02-121-10/+18
|
* cmd/koushin: add -debug flagLibravatarLibravatar Simon Ser 2020-02-111-1/+2
|
* koushin: add Store interfaceLibravatarLibravatar Simon Ser 2020-01-281-1/+1
| | | | References: https://todo.sr.ht/~sircmpwn/koushin/5
* Extract Lua infrastructure into a pluginLibravatarLibravatar Simon Ser 2020-01-201-13/+5
|
* Add Server.LoggerLibravatarLibravatar Simon Ser 2020-01-201-0/+5
|
* Introduce PluginLoaderFuncLibravatarLibravatar Simon Ser 2020-01-201-3/+10
| | | | | | | This allows registered plugins to execute code when loaded. This will also allow the Lua support code to be a plugin. Closes: https://todo.sr.ht/~sircmpwn/koushin/54
* Check IMAP/SMTP servers on startupLibravatarLibravatar Simon Ser 2020-01-201-0/+12
| | | | Closes: https://todo.sr.ht/~sircmpwn/koushin/46
* Disable DNS prefetchingLibravatarLibravatar Simon Ser 2020-01-201-0/+2
|
* Add support for HTML partsLibravatarLibravatar Simon Ser 2020-01-201-1/+3
|
* go fmtLibravatarLibravatar Simon Ser 2020-01-201-1/+1
|
* Auto-discover upstream SMTP and IMAP serversLibravatarLibravatar Simon Ser 2020-01-201-4/+17
| | | | Closes: https://todo.sr.ht/~sircmpwn/koushin/49
* Generalize upstream server URLsLibravatarLibravatar Simon Ser 2020-01-201-31/+86
| | | | | | | | | koushin now takes a list of upstream URLs instead of an IMAP and SMTP URL. This allows to specify upstream server URLs for plugins. In the future, this will allow for auto-discovering upstream servers based on a single domain name. References: https://todo.sr.ht/~sircmpwn/koushin/49
* Redirect to original URL after loginLibravatarLibravatar Simon Ser 2020-01-101-7/+20
|
* Close Lua plugins on reloadLibravatarLibravatar Simon Ser 2020-01-101-2/+11
|
* Implement plugin/template reload on SIGUSR1LibravatarLibravatar Simon Ser 2020-01-081-29/+58
| | | | | | | | There's no way around having a global mutex, because we need to update the HTTP routes when reloading plugins. During reload we need to lock the whole server. Closes: https://todo.sr.ht/~sircmpwn/koushin/43
* Add Server.ReloadLibravatarLibravatar Simon Ser 2020-01-081-2/+8
| | | | | This only reloads templates for now. In the future it'll also reload Lua plugins.
* Make New return the ServerLibravatarLibravatar Simon Ser 2020-01-081-5/+5
| | | | This will be useful to implement hot reload.
* Add a default CSPLibravatarLibravatar Simon Ser 2019-12-181-0/+7
| | | | | Disallows loading external ressources. Providers can override it with their reverse proxy settings.
* Remove the public/ directoryLibravatarLibravatar Simon Ser 2019-12-161-1/+1
| | | | | Now that all templates are provided by plugins, there's no need to have a public/ directory. Themes can be in /themes instead of /public/themes.
* Introduce base pluginLibravatarLibravatar Simon Ser 2019-12-161-28/+7
| | | | | | This plugin offers base IMAP/SMTP functionality. References: https://todo.sr.ht/~sircmpwn/koushin/39
* Add an API for Go pluginsLibravatarLibravatar Simon Ser 2019-12-161-1/+7
| | | | References: https://todo.sr.ht/~sircmpwn/koushin/39
* Fix undefined ErrSessionExpiredLibravatarLibravatar Simon Ser 2019-12-121-1/+1
| | | | Fixes: f07ab5263246 ("Add docs")
* Add docsLibravatarLibravatar Simon Ser 2019-12-111-2/+6
|
* Export Server.{Sessions,Plugins}LibravatarLibravatar Simon Ser 2019-12-111-9/+8
| | | | And unexport a few internal functions.
* Unexport NewSessionManagerLibravatarLibravatar Simon Ser 2019-12-111-1/+1
| | | | This isn't intended to be used by plugins.
* Export Context.SetSession, unexport Session.TokenLibravatarLibravatar Simon Ser 2019-12-111-5/+6
| | | | | | | 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.
* Export ContextLibravatarLibravatar Simon Ser 2019-12-111-9/+14
| | | | This allows plugins to access it.
* Allow plugins to add new routesLibravatarLibravatar Simon Ser 2019-12-101-0/+4
| | | | References: https://todo.sr.ht/~sircmpwn/koushin/6
* Reconnect to IMAP server when logged outLibravatarLibravatar Simon Ser 2019-12-091-0/+1
| | | | | | | | | | | | | | | 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 clientLibravatarLibravatar Simon Ser 2019-12-091-1/+1
| | | | | This will allow SessionManager to re-connect when the IMAP server logs the user out.
* Rename ConnPool to SessionManagerLibravatarLibravatar Simon Ser 2019-12-091-4/+4
|
* Add a Lua API to set template filtersLibravatarLibravatar Simon Ser 2019-12-091-4/+4
|
* Add basic support for pluginsLibravatarLibravatar Simon Ser 2019-12-091-0/+8
|
* Extract HTTP handlers in separate fileLibravatarLibravatar Simon Ser 2019-12-041-263/+2
|
* Add basic theme supportLibravatarLibravatar Simon Ser 2019-12-041-12/+21
| | | | References: https://todo.sr.ht/~sircmpwn/koushin/1
* Make message view's Back link set the mailbox pageLibravatarLibravatar Simon Ser 2019-12-031-4/+5
| | | | | | | This allows to go back and forth between the mailbox view and the message view. References: https://todo.sr.ht/~sircmpwn/koushin/22
* Add basic pagination to message listLibravatarLibravatar Simon Ser 2019-12-031-1/+22
| | | | References: https://todo.sr.ht/~sircmpwn/koushin/22
* Fix missing OutgoingMessage.InReplyTo assignmentLibravatarLibravatar Simon Ser 2019-12-031-9/+5
|
* Add basic support for multiple recipientsLibravatarLibravatar Simon Ser 2019-12-031-3/+2
|
* Add support for replying to a messageLibravatarLibravatar Simon Ser 2019-12-031-5/+59
|
* Add empty CSS stylesheetLibravatarLibravatar Simon Ser 2019-12-031-1/+1
| | | | References: https://todo.sr.ht/~sircmpwn/koushin/19
* Escape mailbox names in URLsLibravatarLibravatar Simon Ser 2019-12-031-2/+10
| | | | Closes: https://todo.sr.ht/~sircmpwn/koushin/14
* Add session lockLibravatarLibravatar Simon Ser 2019-12-031-12/+33
| | | | | | | HTTP requests can be processed in parallel, but we only have one IMAP connection per session. Closes: https://todo.sr.ht/~sircmpwn/koushin/12
* Pre-fill composer with sender addressLibravatarLibravatar Simon Ser 2019-12-031-7/+13
|
* Add basic SMTP supportLibravatarLibravatar Simon Ser 2019-12-031-2/+41
|