Compare commits
5 commits
master
...
deuxfleurs
Author | SHA1 | Date | |
---|---|---|---|
bf9ccc6ed1 | |||
832c17a3a9 | |||
e045227527 | |||
bc40bed6e5 | |||
54d085f7f3 |
6 changed files with 19 additions and 13 deletions
|
@ -34,6 +34,7 @@ func main() {
|
||||||
flag.StringVar(&options.Theme, "theme", "", "default theme")
|
flag.StringVar(&options.Theme, "theme", "", "default theme")
|
||||||
flag.StringVar(&addr, "addr", ":1323", "listening address")
|
flag.StringVar(&addr, "addr", ":1323", "listening address")
|
||||||
flag.BoolVar(&options.Debug, "debug", false, "enable debug logs")
|
flag.BoolVar(&options.Debug, "debug", false, "enable debug logs")
|
||||||
|
flag.BoolVar(&options.SkipTlsVerification, "skiptlsverification", false, "skip TLS hostname verification")
|
||||||
flag.StringVar(&loginKey, "login-key", "", "Fernet key for login persistence")
|
flag.StringVar(&loginKey, "login-key", "", "Fernet key for login persistence")
|
||||||
|
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
|
|
3
imap.go
3
imap.go
|
@ -1,6 +1,7 @@
|
||||||
package alps
|
package alps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/emersion/go-imap"
|
"github.com/emersion/go-imap"
|
||||||
|
@ -16,7 +17,7 @@ func (s *Server) dialIMAP() (*imapclient.Client, error) {
|
||||||
var c *imapclient.Client
|
var c *imapclient.Client
|
||||||
var err error
|
var err error
|
||||||
if s.imap.tls {
|
if s.imap.tls {
|
||||||
c, err = imapclient.DialTLS(s.imap.host, nil)
|
c, err = imapclient.DialTLS(s.imap.host, &tls.Config{InsecureSkipVerify: s.Options.SkipTlsVerification})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to connect to IMAPS server: %v", err)
|
return nil, fmt.Errorf("failed to connect to IMAPS server: %v", err)
|
||||||
}
|
}
|
||||||
|
|
11
server.go
11
server.go
|
@ -365,11 +365,12 @@ func handleUnauthenticated(next echo.HandlerFunc, ctx *Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Upstreams []string
|
Upstreams []string
|
||||||
Theme string
|
Theme string
|
||||||
ThemesPath string
|
ThemesPath string
|
||||||
Debug bool
|
Debug bool
|
||||||
LoginKey *fernet.Key
|
SkipTlsVerification bool
|
||||||
|
LoginKey *fernet.Key
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new server.
|
// New creates a new server.
|
||||||
|
|
3
smtp.go
3
smtp.go
|
@ -1,6 +1,7 @@
|
||||||
package alps
|
package alps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/emersion/go-smtp"
|
"github.com/emersion/go-smtp"
|
||||||
|
@ -14,7 +15,7 @@ func (s *Server) dialSMTP() (*smtp.Client, error) {
|
||||||
var c *smtp.Client
|
var c *smtp.Client
|
||||||
var err error
|
var err error
|
||||||
if s.smtp.tls {
|
if s.smtp.tls {
|
||||||
c, err = smtp.DialTLS(s.smtp.host, nil)
|
c, err = smtp.DialTLS(s.smtp.host, &tls.Config{InsecureSkipVerify: s.Options.SkipTlsVerification})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to connect to SMTPS server: %v", err)
|
return nil, fmt.Errorf("failed to connect to SMTPS server: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -667,9 +667,11 @@ main table tfoot {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
.action-group select {
|
.action-group select {
|
||||||
height: 10rem;
|
height: 10rem;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
.actions-message,
|
.actions-message,
|
||||||
.actions-contacts {
|
.actions-contacts {
|
||||||
|
|
|
@ -32,12 +32,12 @@
|
||||||
">Compose mail</a>
|
">Compose mail</a>
|
||||||
</li>
|
</li>
|
||||||
{{ with .CategorizedMailboxes }}
|
{{ with .CategorizedMailboxes }}
|
||||||
{{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end }}
|
{{ if .Common.Inbox }}{{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end }}{{ end }}
|
||||||
{{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end }}
|
{{ if .Common.Drafts }}{{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end }}{{ end }}
|
||||||
{{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end }}
|
{{ if .Common.Sent }}{{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end }}{{ end }}
|
||||||
{{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end }}
|
{{ if .Common.Junk }}{{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end }}{{ end }}
|
||||||
{{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end }}
|
{{ if .Common.Trash }}{{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end }}{{ end }}
|
||||||
{{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end }}
|
{{ if .Common.Archive }}{{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end }}{{ end }}
|
||||||
{{ if .Additional }}
|
{{ if .Additional }}
|
||||||
<hr />
|
<hr />
|
||||||
{{ range .Additional }}
|
{{ range .Additional }}
|
||||||
|
|
Loading…
Reference in a new issue