list

server

This is the main dovel repository, it has the Go code to run dovel SMTP server.

curl https://dovel.email/server.tar tar

7b45792

Author: blmayer (git@mail.blmayer.dev)

Date: Thu May 25 02:00:13 2023 -0300

Parent: 1fbfe59

Adjusted style

- Fixed time with timezone

Diff

cmd/dovel/web.go

commit 7b457923e9bbeb5423ac07d12c259a1b76a4789f
Author: blmayer <git@mail.blmayer.dev>
Date:   Thu May 25 02:00:13 2023 -0300

    Adjusted style
    
    - Fixed time with timezone

diff --git a/cmd/dovel/web.go b/cmd/dovel/web.go
index fcd76be..8ef1407 100644
--- a/cmd/dovel/web.go
+++ b/cmd/dovel/web.go
@@ -33,16 +33,19 @@ func (h webHandler) indexHandler() http.HandlerFunc {
 			r.URL.Path = "/index.html"
 		}
 
+		u := h.vault.GetUser(user)
 		err := h.templates.ExecuteTemplate(
 			w, r.URL.Path[1:],
 			struct {
 				Query  url.Values
 				Mailer interfaces.Mailer
 				User   interfaces.WebUser
+				TimeZone *time.Location
 			}{
 				r.URL.Query(),
 				h.mailer,
-				h.vault.GetUser(user),
+				u,
+				time.FixedZone(u.TimeZone.Name, u.TimeZone.Offset),
 			},
 		)
 		if err != nil {

www/inboxes.html

commit 7b457923e9bbeb5423ac07d12c259a1b76a4789f
Author: blmayer <git@mail.blmayer.dev>
Date:   Thu May 25 02:00:13 2023 -0300

    Adjusted style
    
    - Fixed time with timezone

diff --git a/www/inboxes.html b/www/inboxes.html
index 6214dfa..470e079 100644
--- a/www/inboxes.html
+++ b/www/inboxes.html
@@ -9,10 +9,12 @@
 <a href="index.html">index</a>&emsp;
 <a href="compose.html?inbox={{.Query.Get "inbox"}}">compose</a>&emsp;
 <a href="delete?id={{.Query.Get "inbox"}}">delete</a>
+
+{{$format := "02 Jan 2006 15:04:05"}}
 {{range (.Mailer.Mailboxes (.Query.Get "inbox"))}}
 <p>
-	<a href="mails.html?inbox={{$.Query.Get "inbox"}}&subj={{.Title}}">{{.Title}}</a><br>
-	Updated: {{.LastMod.Format "Mon, 02 Jan 2006 15:04:05 MST"}}
+	<a href="mails.html?inbox={{$.Query.Get "inbox"}}&subj={{.Title}}">{{.Title}}</a>
+	<small>{{(.LastMod.In $.TimeZone).Format $format}}</small>
 </p>
 {{end}}
 </body>

www/index.html

commit 7b457923e9bbeb5423ac07d12c259a1b76a4789f
Author: blmayer <git@mail.blmayer.dev>
Date:   Thu May 25 02:00:13 2023 -0300

    Adjusted style
    
    - Fixed time with timezone

diff --git a/www/index.html b/www/index.html
index 00b8540..a7cd774 100644
--- a/www/index.html
+++ b/www/index.html
@@ -23,7 +23,7 @@ _  __  /_  __ \_ | / /  _ \_  /
 {{range (.Mailer.Mailboxes ".")}}
 <p>
 	<a href="inboxes.html?inbox={{.Title}}">{{.Title}}</a>
-	<small>{{(.LastMod.In $.User.TimeZone.Name $.User.TimeZone.Offset).Format $format}}</small>
+	<small>{{(.LastMod.In $.TimeZone).Format $format}}</small>
 </p>
 {{end}}
 </body>