Deuxfleurs patches for alps webmail (from https://sr.ht/~migadu/alps/)
Go to file
Simon Ser c5afd1a61b
Reconnect to IMAP server when logged out
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
2019-12-09 19:35:15 +01:00
cmd/koushin Add basic theme support 2019-12-04 18:30:01 +01:00
public Drop define in templates 2019-12-09 15:00:01 +01:00
.gitignore Add .gitignore 2019-12-04 18:36:59 +01:00
go.mod Add basic support for plugins 2019-12-09 16:05:40 +01:00
go.sum Add basic support for plugins 2019-12-09 16:05:40 +01:00
handlers.go Reconnect to IMAP server when logged out 2019-12-09 19:35:15 +01:00
imap.go Use imap.BodyStructure.Filename and imap.Address.Address 2019-12-09 13:45:15 +01:00
LICENSE Correct license ownership 2019-12-03 07:48:25 -05:00
plugin.go Make SessionManager create the IMAP client 2019-12-09 18:35:51 +01:00
README.md readme: sync with new Lua API 2019-12-09 17:55:52 +01:00
server.go Reconnect to IMAP server when logged out 2019-12-09 19:35:15 +01:00
session.go Reconnect to IMAP server when logged out 2019-12-09 19:35:15 +01:00
smtp.go Add basic pagination to message list 2019-12-03 19:49:04 +01:00
strconv.go Add basic pagination to message list 2019-12-03 19:49:04 +01:00
template.go Add a Lua API to set template filters 2019-12-09 17:54:24 +01:00

koushin

Usage

go run ./cmd/koushin imaps://mail.example.org:993 smtps://mail.example.org:465

See -h for more information.

Themes

They should be put in public/themes/<name>/.

Templates in public/themes/<name>/*.html override default templates in public/*.html. Assets in public/themes/<name>/assets/* are served by the HTTP server at themes/<name>/assets/*.

Plugins

Lua plugins are supported. They can be dropped in plugins/*.lua.

API:

  • koushin.on_render(name, f): prior to rendering the template name, call f with the template data
  • koushin.set_filter(name, f): set a template function

License

MIT