🐛 Bug Report: Cannot send email through Gmail SMTP relay #390

Closed
opened 2025-10-09 16:43:26 +03:00 by OVERLORD · 27 comments
Owner

Originally created by @iNenadnano on GitHub.

Reproduction steps

I have Gmail SMTP relay setup to accept email from specified email addresses with no authentication and encryption on port 25.
Pocked ID configuration is as follows:

  • SMTP Host: smtp-relay.gmail.com
  • SMTP Port: 25

SMTP From is set as well, TLS is not checked.

Expected behavior

Upon pressing Send test email button, I was expecting the email to be sent.

Actual Behavior

However, an error is presented in UI stating Failed to send test email. Check the server logs for more information.
If logs, the following line is recorded:

Error #01: send email content: failed to set sender: EOF
Originally created by @iNenadnano on GitHub. ### Reproduction steps I have Gmail SMTP relay setup to accept email from specified email addresses with no authentication and encryption on port 25. Pocked ID configuration is as follows: - **SMTP Host**: `smtp-relay.gmail.com` - **SMTP Port**: `25` **SMTP From** is set as well, **TLS** is not checked. ### Expected behavior Upon pressing **Send test email** button, I was expecting the email to be sent. ### Actual Behavior However, an error is presented in UI stating **Failed to send test email. Check the server logs for more information.** If logs, the following line is recorded: ``` Error #01: send email content: failed to set sender: EOF ```
OVERLORD added the bug label 2025-10-09 16:43:26 +03:00
Author
Owner

@iNenadnano commented on GitHub:

@kmendell no it is not, I am using setup as described in this article. I have failed to mention that it is for Google Workspace. Here's the configuration:

Image

@stonith404 I have tried with both my email address and a generic one, like id@domain.com.

edited to include Google Workspace comment

@iNenadnano commented on GitHub: @kmendell no it is not, I am using setup as described in [this article](https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F176600%3Fhl%3Den&assistant_id=generic-unu&product_context=176600&product_name=UnuFlow&trigger_context=a). I have failed to mention that it is for Google Workspace. Here's the configuration: ![Image](https://github.com/user-attachments/assets/c1261316-3bf1-42e9-95fe-271a483b5bb3) @stonith404 I have tried with both my email address and a generic one, like `id@domain.com`. *edited to include Google Workspace comment*
Author
Owner

@iNenadnano commented on GitHub:

@iNenadnano Does SMTP work with any other service or is Pocket ID the only one you're using this SMTP server?

It works with many other services, like Metabase, Vaultwarden, OpenProject, my scanner...

@iNenadnano commented on GitHub: > [@iNenadnano](https://github.com/iNenadnano) Does SMTP work with any other service or is Pocket ID the only one you're using this SMTP server? It works with many other services, like Metabase, Vaultwarden, OpenProject, my scanner...
Author
Owner

@kmendell commented on GitHub:

@iNenadnano Is this a custom Email relay? I thought Gmail's SMTP Server required authenication , maybe ive never seen what your using though..

@kmendell commented on GitHub: @iNenadnano Is this a custom Email relay? I thought Gmail's SMTP Server required authenication , maybe ive never seen what your using though..
Author
Owner

@stonith404 commented on GitHub:

What did you set for "SMTP From"?

@stonith404 commented on GitHub: What did you set for "SMTP From"?
Author
Owner

@stonith404 commented on GitHub:

@iNenadnano Does SMTP work with any other service or is Pocket ID the only one you're using this SMTP server?

@stonith404 commented on GitHub: @iNenadnano Does SMTP work with any other service or is Pocket ID the only one you're using this SMTP server?
Author
Owner

@kmendell commented on GitHub:

@iNenadnano Okay was just curious to see if the change we did to the email service in 0.27 effected this at all, but it looks like it didnt, i dont have google workspaces otherwise id spin up a test instance and test... im assuming you need to pay to use that relay? Could you try to use gmail standard email smtp server and see if that works , just as another test.

@kmendell commented on GitHub: @iNenadnano Okay was just curious to see if the change we did to the email service in 0.27 effected this at all, but it looks like it didnt, i dont have google workspaces otherwise id spin up a test instance and test... im assuming you need to pay to use that relay? Could you try to use gmail standard email smtp server and see if that works , just as another test.
Author
Owner

@iNenadnano commented on GitHub:

It is a fresh deployment using docker-compose, version 0.27.0.

@iNenadnano commented on GitHub: It is a fresh deployment using `docker-compose`, version 0.27.0.
Author
Owner

@iNenadnano commented on GitHub:

Couldn't find v0.26.1 tag on docker hub, so I tried with v0.26 with same result.

@iNenadnano commented on GitHub: Couldn't find v0.26.1 tag on docker hub, so I tried with v0.26 with same result.
Author
Owner

@kmendell commented on GitHub:

Out of curiosity, Could you try deploying 0.26.1 on a fresh database and see if the issue still happens?

@kmendell commented on GitHub: Out of curiosity, Could you try deploying 0.26.1 on a fresh database and see if the issue still happens?
Author
Owner

@kmendell commented on GitHub:

What version of Pocket ID did you deploy and see this issue? Was it a fresh deployment ? or a upgrade from a old release?

@kmendell commented on GitHub: What version of Pocket ID did you deploy and see this issue? Was it a fresh deployment ? or a upgrade from a old release?
Author
Owner

@iNenadnano commented on GitHub:

@stonith404 I have pulled the development image and I am getting the following error now:

Error #01: failed to say hello to SMTP server: EOF

@kmendell unfortunately, I do nothing think it is possible as it's Google's server. I cannot find anything with the sender address that I have specified in the logs available to me, which seems logical as the email never got sent.

@iNenadnano commented on GitHub: @stonith404 I have pulled the development image and I am getting the following error now: ``` Error #01: failed to say hello to SMTP server: EOF ``` @kmendell unfortunately, I do nothing think it is possible as it's Google's server. I cannot find anything with the sender address that I have specified in the logs available to me, which seems logical as the email never got sent.
Author
Owner

@kmendell commented on GitHub:

@iNenadnano If other servers work as expected, it makes me thing its something miss configured on the google end? maybe im wrong, sicne that works with other services. Can you see any logs inside google that would help troubleshoot?

@kmendell commented on GitHub: @iNenadnano If other servers work as expected, it makes me thing its something miss configured on the google end? maybe im wrong, sicne that works with other services. Can you see any logs inside google that would help troubleshoot?
Author
Owner

@stonith404 commented on GitHub:

@iNenadnano I think I have identified the error. Could try the stonith404/pocket-id:development image?

It seems the SMTP client is sending “localhost” as the EHLO hostname, which Google rejects. Interestingly, other providers typically accept “localhost” without any issues.

@stonith404 commented on GitHub: @iNenadnano I think I have identified the error. Could try the `stonith404/pocket-id:development` image? It seems the SMTP client is sending “localhost” as the EHLO hostname, which Google rejects. Interestingly, other providers typically accept “localhost” without any issues.
Author
Owner

@kmendell commented on GitHub:

@stonith404 @iNenadnano A theory we came up with after talking to someone i know, Could the docker container hostname maybe be causing a issue?

Image

@kmendell commented on GitHub: @stonith404 @iNenadnano A theory we came up with after talking to someone i know, Could the docker container hostname maybe be causing a issue? ![Image](https://github.com/user-attachments/assets/395445c9-a1b4-410c-9586-4a195e70cc9a)
Author
Owner

@iNenadnano commented on GitHub:

Yes, SMTP relay service is a feature of Google Workspace and needs to be paid.
As for standard Gmail SMTP server, it works as expected.

@iNenadnano commented on GitHub: Yes, SMTP relay service is a feature of Google Workspace and needs to be paid. As for standard Gmail SMTP server, it works as expected.
Author
Owner

@stonith404 commented on GitHub:

I think the hostname is not relevant because the EHLO host gets derived from the "PUBLIC_APP_URL.

@iNenadnano Did you have to set a EHLO or HELO value in your other services that are using the same SMTP server?

@stonith404 commented on GitHub: I think the hostname is not relevant because the EHLO host gets derived from the "PUBLIC_APP_URL. @iNenadnano Did you have to set a EHLO or HELO value in your other services that are using the same SMTP server?
Author
Owner

@iNenadnano commented on GitHub:

It seems that the problem is in line 71 of smtp.go where localhost is hard coded. If I put something different, email gets sent successfully.

@iNenadnano commented on GitHub: It seems that the problem is in line 71 of [smtp.go](https://cs.opensource.google/go/go/+/refs/tags/go1.23.5:src/net/smtp/smtp.go) where `localhost` is hard coded. If I put something different, email gets sent successfully.
Author
Owner

@iNenadnano commented on GitHub:

@stonith404 I did not have to set any of those values.

FYI, this piece of LLM generated code (as I am not at all familiar with go) works without any issues:

package main

import (
	"fmt"
	"log"
	"net"
	"os"
)

func main() {
	// SMTP server address
	smtpServer := "smtp.example.com:25" // Replace with your SMTP server and port

	// Connect to the SMTP server
	conn, err := net.Dial("tcp", smtpServer)
	if err != nil {
		log.Fatalf("Failed to connect to SMTP server: %v\n", err)
	}
	defer conn.Close()

	// Read the server's greeting
	buf := make([]byte, 1024)
	_, err = conn.Read(buf)
	if err != nil {
		log.Fatalf("Failed to read server greeting: %v\n", err)
	}
	fmt.Println("Server Greeting: ", string(buf))

	// Send HELO command
	_, err = fmt.Fprintf(conn, "HELO localhost\r\n")
	if err != nil {
		log.Fatalf("Failed to send HELO: %v\n", err)
	}

	// Read response
	_, err = conn.Read(buf)
	if err != nil {
		log.Fatalf("Failed to read HELO response: %v\n", err)
	}
	fmt.Println("HELO Response: ", string(buf))

	// Send MAIL FROM command
	_, err = fmt.Fprintf(conn, "MAIL FROM:<your-email@example.com>\r\n") // Replace with your email
	if err != nil {
		log.Fatalf("Failed to send MAIL FROM: %v\n", err)
	}

	// Read response
	_, err = conn.Read(buf)
	if err != nil {
		log.Fatalf("Failed to read MAIL FROM response: %v\n", err)
	}
	fmt.Println("MAIL FROM Response: ", string(buf))

	// Send RCPT TO command
	_, err = fmt.Fprintf(conn, "RCPT TO:<recipient@example.com>\r\n") // Replace with recipient's email
	if err != nil {
		log.Fatalf("Failed to send RCPT TO: %v\n", err)
	}

	// Read response
	_, err = conn.Read(buf)
	if err != nil {
		log.Fatalf("Failed to read RCPT TO response: %v\n", err)
	}
	fmt.Println("RCPT TO Response: ", string(buf))

	// Send DATA command
	_, err = fmt.Fprintf(conn, "DATA\r\n")
	if err != nil {
		log.Fatalf("Failed to send DATA: %v\n", err)
	}

	// Read response
	_, err = conn.Read(buf)
	if err != nil {
		log.Fatalf("Failed to read DATA response: %v\n", err)
	}
	fmt.Println("DATA Response: ", string(buf))

	// Send the email body
	_, err = fmt.Fprintf(conn, "Subject: Test Email\r\n\r\nHello, this is a test email.\r\n.\r\n")
	if err != nil {
		log.Fatalf("Failed to send email body: %v\n", err)
	}

	// Read response
	_, err = conn.Read(buf)
	if err != nil {
		log.Fatalf("Failed to read email send response: %v\n", err)
	}
	fmt.Println("Email Send Response: ", string(buf))

	// Send QUIT command to close the connection
	_, err = fmt.Fprintf(conn, "QUIT\r\n")
	if err != nil {
		log.Fatalf("Failed to send QUIT: %v\n", err)
	}

	// Read response
	_, err = conn.Read(buf)
	if err != nil {
		log.Fatalf("Failed to read QUIT response: %v\n", err)
	}
	fmt.Println("QUIT Response: ", string(buf))

	fmt.Println("Hello message sent successfully!")
}

Example function from here fails:

func Example() {
	// Connect to the remote SMTP server.
	c, err := smtp.Dial("mail.example.com:25")
	if err != nil {
		log.Fatal(err)
	}

	// Set the sender and recipient first
	if err := c.Mail("sender@example.org"); err != nil {
		log.Fatal(err)
	}
	if err := c.Rcpt("recipient@example.net"); err != nil {
		log.Fatal(err)
	}

	// Send the email body.
	wc, err := c.Data()
	if err != nil {
		log.Fatal(err)
	}
	_, err = fmt.Fprintf(wc, "This is the email body")
	if err != nil {
		log.Fatal(err)
	}
	err = wc.Close()
	if err != nil {
		log.Fatal(err)
	}

	// Send the QUIT command and close the connection.
	err = c.Quit()
	if err != nil {
		log.Fatal(err)
	}
}
@iNenadnano commented on GitHub: @stonith404 I did not have to set any of those values. FYI, this piece of LLM generated code (as I am not at all familiar with go) works without any issues: ``` package main import ( "fmt" "log" "net" "os" ) func main() { // SMTP server address smtpServer := "smtp.example.com:25" // Replace with your SMTP server and port // Connect to the SMTP server conn, err := net.Dial("tcp", smtpServer) if err != nil { log.Fatalf("Failed to connect to SMTP server: %v\n", err) } defer conn.Close() // Read the server's greeting buf := make([]byte, 1024) _, err = conn.Read(buf) if err != nil { log.Fatalf("Failed to read server greeting: %v\n", err) } fmt.Println("Server Greeting: ", string(buf)) // Send HELO command _, err = fmt.Fprintf(conn, "HELO localhost\r\n") if err != nil { log.Fatalf("Failed to send HELO: %v\n", err) } // Read response _, err = conn.Read(buf) if err != nil { log.Fatalf("Failed to read HELO response: %v\n", err) } fmt.Println("HELO Response: ", string(buf)) // Send MAIL FROM command _, err = fmt.Fprintf(conn, "MAIL FROM:<your-email@example.com>\r\n") // Replace with your email if err != nil { log.Fatalf("Failed to send MAIL FROM: %v\n", err) } // Read response _, err = conn.Read(buf) if err != nil { log.Fatalf("Failed to read MAIL FROM response: %v\n", err) } fmt.Println("MAIL FROM Response: ", string(buf)) // Send RCPT TO command _, err = fmt.Fprintf(conn, "RCPT TO:<recipient@example.com>\r\n") // Replace with recipient's email if err != nil { log.Fatalf("Failed to send RCPT TO: %v\n", err) } // Read response _, err = conn.Read(buf) if err != nil { log.Fatalf("Failed to read RCPT TO response: %v\n", err) } fmt.Println("RCPT TO Response: ", string(buf)) // Send DATA command _, err = fmt.Fprintf(conn, "DATA\r\n") if err != nil { log.Fatalf("Failed to send DATA: %v\n", err) } // Read response _, err = conn.Read(buf) if err != nil { log.Fatalf("Failed to read DATA response: %v\n", err) } fmt.Println("DATA Response: ", string(buf)) // Send the email body _, err = fmt.Fprintf(conn, "Subject: Test Email\r\n\r\nHello, this is a test email.\r\n.\r\n") if err != nil { log.Fatalf("Failed to send email body: %v\n", err) } // Read response _, err = conn.Read(buf) if err != nil { log.Fatalf("Failed to read email send response: %v\n", err) } fmt.Println("Email Send Response: ", string(buf)) // Send QUIT command to close the connection _, err = fmt.Fprintf(conn, "QUIT\r\n") if err != nil { log.Fatalf("Failed to send QUIT: %v\n", err) } // Read response _, err = conn.Read(buf) if err != nil { log.Fatalf("Failed to read QUIT response: %v\n", err) } fmt.Println("QUIT Response: ", string(buf)) fmt.Println("Hello message sent successfully!") } ``` Example function from [here](https://go.dev/src/net/smtp/example_test.go) fails: ``` func Example() { // Connect to the remote SMTP server. c, err := smtp.Dial("mail.example.com:25") if err != nil { log.Fatal(err) } // Set the sender and recipient first if err := c.Mail("sender@example.org"); err != nil { log.Fatal(err) } if err := c.Rcpt("recipient@example.net"); err != nil { log.Fatal(err) } // Send the email body. wc, err := c.Data() if err != nil { log.Fatal(err) } _, err = fmt.Fprintf(wc, "This is the email body") if err != nil { log.Fatal(err) } err = wc.Close() if err != nil { log.Fatal(err) } // Send the QUIT command and close the connection. err = c.Quit() if err != nil { log.Fatal(err) } } ```
Author
Owner

@kmendell commented on GitHub:

@iNenadnano Im pretty sure that's what stonith fixed earlier today see below, when using the development image can you attach more than the one log, from the output of the docker container? im curious if this function he added is getting called or not...

Image

@kmendell commented on GitHub: @iNenadnano Im pretty sure that's what stonith fixed earlier today see below, when using the development image can you attach more than the one log, from the output of the docker container? im curious if this function he added is getting called or not... ![Image](https://github.com/user-attachments/assets/b032153d-40c8-4d96-b087-008113d214c3)
Author
Owner

@iNenadnano commented on GitHub:

In my case it is like this:

Image

@iNenadnano commented on GitHub: In my case it is like this: ![Image](https://github.com/user-attachments/assets/aa89f779-7940-4f5a-b984-c8e00a1ba740)
Author
Owner

@stonith404 commented on GitHub:

Did you replace localhost in the script the LLM has generated on the following line?
_, err = fmt.Fprintf(conn, "HELO localhost\r\n")

I've pushed a new development image where I hard-coded the HELO message to sample.com. Could you try if this works?

@stonith404 commented on GitHub: Did you replace `localhost` in the script the LLM has generated on the following line? `_, err = fmt.Fprintf(conn, "HELO localhost\r\n")` I've pushed a new `development` image where I hard-coded the HELO message to `sample.com`. Could you try if this works?
Author
Owner

@stonith404 commented on GitHub:

Great, thanks for testing it so quickly.

Would you mind to test the development image again 😅? The HELO argument should now be the host (get from os.Hostname()).

@stonith404 commented on GitHub: Great, thanks for testing it so quickly. Would you mind to test the `development` image again 😅? The HELO argument should now be the host (get from `os.Hostname()`).
Author
Owner

@stonith404 commented on GitHub:

@iNenadnano Im pretty sure that's what stonith fixed earlier today see below, when using the development image can you attach more than the one log, from the output of the docker container? im curious if this function he added is getting called or not...

Image

Yeah exactly. It now takes the domain from the PUBLIC_APP_URL as the EHLO argument. @iNenadnano Could it be that your PUBLIC_APP_URL is set to http(s)://localhost?

@stonith404 commented on GitHub: > [@iNenadnano](https://github.com/iNenadnano) Im pretty sure that's what stonith fixed earlier today see below, when using the development image can you attach more than the one log, from the output of the docker container? im curious if this function he added is getting called or not... > > ![Image](https://github.com/user-attachments/assets/b032153d-40c8-4d96-b087-008113d214c3) Yeah exactly. It now takes the domain from the `PUBLIC_APP_URL` as the EHLO argument. @iNenadnano Could it be that your `PUBLIC_APP_URL` is set to `http(s)://localhost`?
Author
Owner

@iNenadnano commented on GitHub:

@kmendell Full log output of newly created container from the development image is as follows:

2025-01-24T07:45:07.085493323Z Creating user and group...
2025-01-24T07:45:07.104870350Z Changing password for pocket-id
2025-01-24T07:45:07.104906863Z New password: 
2025-01-24T07:45:07.104910148Z passwd: password for pocket-id is unchanged
2025-01-24T07:45:07.109054156Z Starting frontend...
2025-01-24T07:45:07.109228355Z Starting backend...
2025-01-24T07:45:07.109494353Z Starting Caddy...
2025-01-24T07:45:07.411402262Z INF | ts=1737704707.411246 msg=using config from file file=/etc/caddy/Caddyfile.trust-proxy 
2025-01-24T07:45:07.412766559Z INF | ts=1737704707.4126685 msg=adapted config to JSON adapter=caddyfile 
2025-01-24T07:45:07.414003758Z 2025/01/24 07:45:07 Updating GeoLite2 City database...
2025-01-24T07:45:07.415462989Z INF | ts=1737704707.4153664 logger=admin msg=admin endpoint started address=localhost:2019 enforce_origin=false origins=["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"] 
2025-01-24T07:45:07.418582315Z WRN | ts=1737704707.4184709 logger=http.auto_https msg=server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server server_name=srv0 http_port=80 
2025-01-24T07:45:07.418790765Z INF | ts=1737704707.4187002 logger=tls.cache.maintenance msg=started background certificate maintenance cache=0xc000581480 
2025-01-24T07:45:07.419312765Z INF | ts=1737704707.419206 logger=http.log msg=server running name=srv0 protocols=["h1","h2","h3"] 
2025-01-24T07:45:07.420017914Z INF | ts=1737704707.4199216 msg=autosaved config (load with --resume flag) file=/home/pocket-id/.config/caddy/autosave.json 
2025-01-24T07:45:07.420035079Z INF | ts=1737704707.4199376 msg=serving initial configuration 
2025-01-24T07:45:07.420459720Z Successfully started Caddy (pid=44) - Caddy is running in the background
2025-01-24T07:45:07.423456594Z INF | ts=1737704707.4233694 logger=tls msg=cleaning storage unit storage=FileStorage:/home/pocket-id/.local/share/caddy 
2025-01-24T07:45:07.423848481Z INF | ts=1737704707.4237595 logger=tls msg=finished cleaning storage units 
2025-01-24T07:45:07.506671481Z Listening on 0.0.0.0:3000
2025-01-24T07:45:09.335352575Z 2025/01/24 07:45:09 GeoLite2 City database successfully updated.
2025-01-24T07:45:12.215025486Z [GIN] 2025/01/24 - 07:45:12 | 200 |     728.484µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:45:12.215063638Z [GIN] 2025/01/24 - 07:45:12 | 200 |     768.789µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:45:19.433378073Z [GIN] 2025/01/24 - 07:45:19 | 401 |      89.382µs |       127.0.0.1 | GET      "/api/users/me"
2025-01-24T07:45:19.433417248Z Error #01: You are not signed in
2025-01-24T07:45:19.433425333Z [GIN] 2025/01/24 - 07:45:19 | 401 |     127.687µs |       127.0.0.1 | GET      "/api/users/me"
2025-01-24T07:45:19.433451438Z Error #01: You are not signed in
2025-01-24T07:45:19.438663335Z [GIN] 2025/01/24 - 07:45:19 | 200 |     286.591µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:45:19.438689145Z [GIN] 2025/01/24 - 07:45:19 | 200 |     323.134µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:45:19.450450728Z [GIN] 2025/01/24 - 07:45:19 | 401 |      39.369µs |       127.0.0.1 | GET      "/api/users/me"
2025-01-24T07:45:19.450481545Z Error #01: You are not signed in
2025-01-24T07:45:19.450493496Z [GIN] 2025/01/24 - 07:45:19 | 401 |      72.055µs |       127.0.0.1 | GET      "/api/users/me"
2025-01-24T07:45:19.450500905Z Error #01: You are not signed in
2025-01-24T07:45:19.452871609Z [GIN] 2025/01/24 - 07:45:19 | 200 |     238.555µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:45:19.452893863Z [GIN] 2025/01/24 - 07:45:19 | 200 |     261.248µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:45:19.626668742Z [GIN] 2025/01/24 - 07:45:19 | 200 |     138.823µs |     10.10.1.121 | GET      "/api/application-configuration/logo?light=true"
2025-01-24T07:45:19.626825000Z [GIN] 2025/01/24 - 07:45:19 | 200 |     357.242µs |     10.10.1.121 | GET      "/api/application-configuration/logo?light=true"
2025-01-24T07:45:19.634903037Z [GIN] 2025/01/24 - 07:45:19 | 200 |    6.050826ms |     10.10.1.121 | GET      "/api/application-configuration/background-image"
2025-01-24T07:45:19.635077653Z [GIN] 2025/01/24 - 07:45:19 | 200 |    6.257812ms |     10.10.1.121 | GET      "/api/application-configuration/background-image"
2025-01-24T07:45:20.036511765Z [GIN] 2025/01/24 - 07:45:20 | 200 |     258.418µs |     10.10.1.121 | GET      "/api/application-configuration/favicon"
2025-01-24T07:45:20.036542330Z [GIN] 2025/01/24 - 07:45:20 | 200 |     291.854µs |     10.10.1.121 | GET      "/api/application-configuration/favicon"
2025-01-24T07:45:25.655324746Z [GIN] 2025/01/24 - 07:45:25 | 401 |      56.814µs |       127.0.0.1 | GET      "/api/users/me"
2025-01-24T07:45:25.655364146Z Error #01: You are not signed in
2025-01-24T07:45:25.655372154Z [GIN] 2025/01/24 - 07:45:25 | 401 |      91.443µs |       127.0.0.1 | GET      "/api/users/me"
2025-01-24T07:45:25.655379469Z Error #01: You are not signed in
2025-01-24T07:45:25.658203938Z [GIN] 2025/01/24 - 07:45:25 | 200 |      280.13µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:45:25.658227090Z [GIN] 2025/01/24 - 07:45:25 | 200 |     314.093µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:45:25.689762053Z [GIN] 2025/01/24 - 07:45:25 | 304 |      90.316µs |     10.10.1.121 | GET      "/api/application-configuration/background-image"
2025-01-24T07:45:25.689796977Z [GIN] 2025/01/24 - 07:45:25 | 304 |     124.163µs |     10.10.1.121 | GET      "/api/application-configuration/background-image"
2025-01-24T07:45:25.690733116Z [GIN] 2025/01/24 - 07:45:25 | 304 |      68.732µs |     10.10.1.121 | GET      "/api/application-configuration/logo?light=true"
2025-01-24T07:45:25.690768806Z [GIN] 2025/01/24 - 07:45:25 | 304 |      83.862µs |     10.10.1.121 | GET      "/api/application-configuration/logo?light=true"
2025-01-24T07:45:26.226318487Z [GIN] 2025/01/24 - 07:45:26 | 304 |     118.809µs |     10.10.1.121 | GET      "/api/application-configuration/favicon"
2025-01-24T07:45:26.226358262Z [GIN] 2025/01/24 - 07:45:26 | 304 |     147.251µs |     10.10.1.121 | GET      "/api/application-configuration/favicon"
2025-01-24T07:45:27.615454536Z [GIN] 2025/01/24 - 07:45:27 | 200 |    5.654492ms |     10.10.1.121 | POST     "/api/one-time-access-token/setup"
2025-01-24T07:45:27.615496061Z [GIN] 2025/01/24 - 07:45:27 | 200 |    5.688047ms |     10.10.1.121 | POST     "/api/one-time-access-token/setup"
2025-01-24T07:45:27.734346474Z [GIN] 2025/01/24 - 07:45:27 | 200 |      689.72µs |       127.0.0.1 | GET      "/api/users/me"
2025-01-24T07:45:27.734377477Z [GIN] 2025/01/24 - 07:45:27 | 200 |     723.281µs |       127.0.0.1 | GET      "/api/users/me"
2025-01-24T07:45:27.736782746Z [GIN] 2025/01/24 - 07:45:27 | 200 |      510.56µs |       127.0.0.1 | GET      "/api/webauthn/credentials"
2025-01-24T07:45:27.736814229Z [GIN] 2025/01/24 - 07:45:27 | 200 |     536.601µs |       127.0.0.1 | GET      "/api/webauthn/credentials"
2025-01-24T07:45:35.429205679Z [GIN] 2025/01/24 - 07:45:35 | 200 |    4.977058ms |     10.10.1.121 | PUT      "/api/users/me"
2025-01-24T07:45:35.429236163Z [GIN] 2025/01/24 - 07:45:35 | 200 |    5.010759ms |     10.10.1.121 | PUT      "/api/users/me"
2025-01-24T07:45:36.970743973Z [GIN] 2025/01/24 - 07:45:36 | 200 |    1.064758ms |       127.0.0.1 | GET      "/api/application-configuration/all"
2025-01-24T07:45:36.970778378Z [GIN] 2025/01/24 - 07:45:36 | 200 |    1.094995ms |       127.0.0.1 | GET      "/api/application-configuration/all"
2025-01-24T07:45:37.144426385Z [GIN] 2025/01/24 - 07:45:37 | 304 |     251.106µs |     10.10.1.121 | GET      "/api/application-configuration/favicon"
2025-01-24T07:45:37.144556554Z [GIN] 2025/01/24 - 07:45:37 | 304 |     439.693µs |     10.10.1.121 | GET      "/api/application-configuration/favicon"
2025-01-24T07:45:37.144773225Z [GIN] 2025/01/24 - 07:45:37 | 200 |     282.542µs |     10.10.1.121 | GET      "/api/application-configuration/logo?light=false"
2025-01-24T07:45:37.144797340Z [GIN] 2025/01/24 - 07:45:37 | 200 |     475.115µs |     10.10.1.121 | GET      "/api/application-configuration/logo?light=false"
2025-01-24T07:45:54.123760874Z [GIN] 2025/01/24 - 07:45:54 | 200 |    7.603339ms |     10.10.1.121 | PUT      "/api/application-configuration"
2025-01-24T07:45:54.123796769Z [GIN] 2025/01/24 - 07:45:54 | 200 |    7.643285ms |     10.10.1.121 | PUT      "/api/application-configuration"
2025-01-24T07:45:54.138253608Z [GIN] 2025/01/24 - 07:45:54 | 200 |     413.448µs |     10.10.1.121 | GET      "/api/application-configuration"
2025-01-24T07:45:54.138288307Z [GIN] 2025/01/24 - 07:45:54 | 200 |     445.802µs |     10.10.1.121 | GET      "/api/application-configuration"
2025-01-24T07:45:56.243968643Z [GIN] 2025/01/24 - 07:45:56 | 500 |  597.496262ms |     10.10.1.121 | POST     "/api/application-configuration/test-email"
2025-01-24T07:45:56.244024193Z Error #01: failed to say hello to SMTP server: EOF
2025-01-24T07:45:56.244032812Z [GIN] 2025/01/24 - 07:45:56 | 500 |  597.542308ms |     10.10.1.121 | POST     "/api/application-configuration/test-email"
2025-01-24T07:45:56.244040100Z Error #01: failed to say hello to SMTP server: EOF
2025-01-24T07:45:56.245012157Z 2025-01-24 07:45:56.244200502 +0000 UTC m=+48.957682656 write error: can't make directories for new logfile: mkdir /var/log/caddy: permission denied
2025-01-24T07:46:42.326024002Z [GIN] 2025/01/24 - 07:46:42 | 200 |     301.284µs |       127.0.0.1 | GET      "/api/application-configuration"
2025-01-24T07:46:42.326065899Z [GIN] 2025/01/24 - 07:46:42 | 200 |     339.385µs |       127.0.0.1 | GET      "/api/application-configuration"

@stonith404 .env file is as follows and I am running the container behind caddy as a reverse proxy:

PUBLIC_APP_URL=https://id.my.domain
TRUST_PROXY=true
MAXMIND_LICENSE_KEY=******************
PUID=1000
PGID=1000
@iNenadnano commented on GitHub: @kmendell Full log output of newly created container from the development image is as follows: ``` 2025-01-24T07:45:07.085493323Z Creating user and group... 2025-01-24T07:45:07.104870350Z Changing password for pocket-id 2025-01-24T07:45:07.104906863Z New password: 2025-01-24T07:45:07.104910148Z passwd: password for pocket-id is unchanged 2025-01-24T07:45:07.109054156Z Starting frontend... 2025-01-24T07:45:07.109228355Z Starting backend... 2025-01-24T07:45:07.109494353Z Starting Caddy... 2025-01-24T07:45:07.411402262Z INF | ts=1737704707.411246 msg=using config from file file=/etc/caddy/Caddyfile.trust-proxy 2025-01-24T07:45:07.412766559Z INF | ts=1737704707.4126685 msg=adapted config to JSON adapter=caddyfile 2025-01-24T07:45:07.414003758Z 2025/01/24 07:45:07 Updating GeoLite2 City database... 2025-01-24T07:45:07.415462989Z INF | ts=1737704707.4153664 logger=admin msg=admin endpoint started address=localhost:2019 enforce_origin=false origins=["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"] 2025-01-24T07:45:07.418582315Z WRN | ts=1737704707.4184709 logger=http.auto_https msg=server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server server_name=srv0 http_port=80 2025-01-24T07:45:07.418790765Z INF | ts=1737704707.4187002 logger=tls.cache.maintenance msg=started background certificate maintenance cache=0xc000581480 2025-01-24T07:45:07.419312765Z INF | ts=1737704707.419206 logger=http.log msg=server running name=srv0 protocols=["h1","h2","h3"] 2025-01-24T07:45:07.420017914Z INF | ts=1737704707.4199216 msg=autosaved config (load with --resume flag) file=/home/pocket-id/.config/caddy/autosave.json 2025-01-24T07:45:07.420035079Z INF | ts=1737704707.4199376 msg=serving initial configuration 2025-01-24T07:45:07.420459720Z Successfully started Caddy (pid=44) - Caddy is running in the background 2025-01-24T07:45:07.423456594Z INF | ts=1737704707.4233694 logger=tls msg=cleaning storage unit storage=FileStorage:/home/pocket-id/.local/share/caddy 2025-01-24T07:45:07.423848481Z INF | ts=1737704707.4237595 logger=tls msg=finished cleaning storage units 2025-01-24T07:45:07.506671481Z Listening on 0.0.0.0:3000 2025-01-24T07:45:09.335352575Z 2025/01/24 07:45:09 GeoLite2 City database successfully updated. 2025-01-24T07:45:12.215025486Z [GIN] 2025/01/24 - 07:45:12 | 200 | 728.484µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:45:12.215063638Z [GIN] 2025/01/24 - 07:45:12 | 200 | 768.789µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:45:19.433378073Z [GIN] 2025/01/24 - 07:45:19 | 401 | 89.382µs | 127.0.0.1 | GET "/api/users/me" 2025-01-24T07:45:19.433417248Z Error #01: You are not signed in 2025-01-24T07:45:19.433425333Z [GIN] 2025/01/24 - 07:45:19 | 401 | 127.687µs | 127.0.0.1 | GET "/api/users/me" 2025-01-24T07:45:19.433451438Z Error #01: You are not signed in 2025-01-24T07:45:19.438663335Z [GIN] 2025/01/24 - 07:45:19 | 200 | 286.591µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:45:19.438689145Z [GIN] 2025/01/24 - 07:45:19 | 200 | 323.134µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:45:19.450450728Z [GIN] 2025/01/24 - 07:45:19 | 401 | 39.369µs | 127.0.0.1 | GET "/api/users/me" 2025-01-24T07:45:19.450481545Z Error #01: You are not signed in 2025-01-24T07:45:19.450493496Z [GIN] 2025/01/24 - 07:45:19 | 401 | 72.055µs | 127.0.0.1 | GET "/api/users/me" 2025-01-24T07:45:19.450500905Z Error #01: You are not signed in 2025-01-24T07:45:19.452871609Z [GIN] 2025/01/24 - 07:45:19 | 200 | 238.555µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:45:19.452893863Z [GIN] 2025/01/24 - 07:45:19 | 200 | 261.248µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:45:19.626668742Z [GIN] 2025/01/24 - 07:45:19 | 200 | 138.823µs | 10.10.1.121 | GET "/api/application-configuration/logo?light=true" 2025-01-24T07:45:19.626825000Z [GIN] 2025/01/24 - 07:45:19 | 200 | 357.242µs | 10.10.1.121 | GET "/api/application-configuration/logo?light=true" 2025-01-24T07:45:19.634903037Z [GIN] 2025/01/24 - 07:45:19 | 200 | 6.050826ms | 10.10.1.121 | GET "/api/application-configuration/background-image" 2025-01-24T07:45:19.635077653Z [GIN] 2025/01/24 - 07:45:19 | 200 | 6.257812ms | 10.10.1.121 | GET "/api/application-configuration/background-image" 2025-01-24T07:45:20.036511765Z [GIN] 2025/01/24 - 07:45:20 | 200 | 258.418µs | 10.10.1.121 | GET "/api/application-configuration/favicon" 2025-01-24T07:45:20.036542330Z [GIN] 2025/01/24 - 07:45:20 | 200 | 291.854µs | 10.10.1.121 | GET "/api/application-configuration/favicon" 2025-01-24T07:45:25.655324746Z [GIN] 2025/01/24 - 07:45:25 | 401 | 56.814µs | 127.0.0.1 | GET "/api/users/me" 2025-01-24T07:45:25.655364146Z Error #01: You are not signed in 2025-01-24T07:45:25.655372154Z [GIN] 2025/01/24 - 07:45:25 | 401 | 91.443µs | 127.0.0.1 | GET "/api/users/me" 2025-01-24T07:45:25.655379469Z Error #01: You are not signed in 2025-01-24T07:45:25.658203938Z [GIN] 2025/01/24 - 07:45:25 | 200 | 280.13µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:45:25.658227090Z [GIN] 2025/01/24 - 07:45:25 | 200 | 314.093µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:45:25.689762053Z [GIN] 2025/01/24 - 07:45:25 | 304 | 90.316µs | 10.10.1.121 | GET "/api/application-configuration/background-image" 2025-01-24T07:45:25.689796977Z [GIN] 2025/01/24 - 07:45:25 | 304 | 124.163µs | 10.10.1.121 | GET "/api/application-configuration/background-image" 2025-01-24T07:45:25.690733116Z [GIN] 2025/01/24 - 07:45:25 | 304 | 68.732µs | 10.10.1.121 | GET "/api/application-configuration/logo?light=true" 2025-01-24T07:45:25.690768806Z [GIN] 2025/01/24 - 07:45:25 | 304 | 83.862µs | 10.10.1.121 | GET "/api/application-configuration/logo?light=true" 2025-01-24T07:45:26.226318487Z [GIN] 2025/01/24 - 07:45:26 | 304 | 118.809µs | 10.10.1.121 | GET "/api/application-configuration/favicon" 2025-01-24T07:45:26.226358262Z [GIN] 2025/01/24 - 07:45:26 | 304 | 147.251µs | 10.10.1.121 | GET "/api/application-configuration/favicon" 2025-01-24T07:45:27.615454536Z [GIN] 2025/01/24 - 07:45:27 | 200 | 5.654492ms | 10.10.1.121 | POST "/api/one-time-access-token/setup" 2025-01-24T07:45:27.615496061Z [GIN] 2025/01/24 - 07:45:27 | 200 | 5.688047ms | 10.10.1.121 | POST "/api/one-time-access-token/setup" 2025-01-24T07:45:27.734346474Z [GIN] 2025/01/24 - 07:45:27 | 200 | 689.72µs | 127.0.0.1 | GET "/api/users/me" 2025-01-24T07:45:27.734377477Z [GIN] 2025/01/24 - 07:45:27 | 200 | 723.281µs | 127.0.0.1 | GET "/api/users/me" 2025-01-24T07:45:27.736782746Z [GIN] 2025/01/24 - 07:45:27 | 200 | 510.56µs | 127.0.0.1 | GET "/api/webauthn/credentials" 2025-01-24T07:45:27.736814229Z [GIN] 2025/01/24 - 07:45:27 | 200 | 536.601µs | 127.0.0.1 | GET "/api/webauthn/credentials" 2025-01-24T07:45:35.429205679Z [GIN] 2025/01/24 - 07:45:35 | 200 | 4.977058ms | 10.10.1.121 | PUT "/api/users/me" 2025-01-24T07:45:35.429236163Z [GIN] 2025/01/24 - 07:45:35 | 200 | 5.010759ms | 10.10.1.121 | PUT "/api/users/me" 2025-01-24T07:45:36.970743973Z [GIN] 2025/01/24 - 07:45:36 | 200 | 1.064758ms | 127.0.0.1 | GET "/api/application-configuration/all" 2025-01-24T07:45:36.970778378Z [GIN] 2025/01/24 - 07:45:36 | 200 | 1.094995ms | 127.0.0.1 | GET "/api/application-configuration/all" 2025-01-24T07:45:37.144426385Z [GIN] 2025/01/24 - 07:45:37 | 304 | 251.106µs | 10.10.1.121 | GET "/api/application-configuration/favicon" 2025-01-24T07:45:37.144556554Z [GIN] 2025/01/24 - 07:45:37 | 304 | 439.693µs | 10.10.1.121 | GET "/api/application-configuration/favicon" 2025-01-24T07:45:37.144773225Z [GIN] 2025/01/24 - 07:45:37 | 200 | 282.542µs | 10.10.1.121 | GET "/api/application-configuration/logo?light=false" 2025-01-24T07:45:37.144797340Z [GIN] 2025/01/24 - 07:45:37 | 200 | 475.115µs | 10.10.1.121 | GET "/api/application-configuration/logo?light=false" 2025-01-24T07:45:54.123760874Z [GIN] 2025/01/24 - 07:45:54 | 200 | 7.603339ms | 10.10.1.121 | PUT "/api/application-configuration" 2025-01-24T07:45:54.123796769Z [GIN] 2025/01/24 - 07:45:54 | 200 | 7.643285ms | 10.10.1.121 | PUT "/api/application-configuration" 2025-01-24T07:45:54.138253608Z [GIN] 2025/01/24 - 07:45:54 | 200 | 413.448µs | 10.10.1.121 | GET "/api/application-configuration" 2025-01-24T07:45:54.138288307Z [GIN] 2025/01/24 - 07:45:54 | 200 | 445.802µs | 10.10.1.121 | GET "/api/application-configuration" 2025-01-24T07:45:56.243968643Z [GIN] 2025/01/24 - 07:45:56 | 500 | 597.496262ms | 10.10.1.121 | POST "/api/application-configuration/test-email" 2025-01-24T07:45:56.244024193Z Error #01: failed to say hello to SMTP server: EOF 2025-01-24T07:45:56.244032812Z [GIN] 2025/01/24 - 07:45:56 | 500 | 597.542308ms | 10.10.1.121 | POST "/api/application-configuration/test-email" 2025-01-24T07:45:56.244040100Z Error #01: failed to say hello to SMTP server: EOF 2025-01-24T07:45:56.245012157Z 2025-01-24 07:45:56.244200502 +0000 UTC m=+48.957682656 write error: can't make directories for new logfile: mkdir /var/log/caddy: permission denied 2025-01-24T07:46:42.326024002Z [GIN] 2025/01/24 - 07:46:42 | 200 | 301.284µs | 127.0.0.1 | GET "/api/application-configuration" 2025-01-24T07:46:42.326065899Z [GIN] 2025/01/24 - 07:46:42 | 200 | 339.385µs | 127.0.0.1 | GET "/api/application-configuration" ``` @stonith404 `.env` file is as follows and I am running the container behind `caddy` as a reverse proxy: ``` PUBLIC_APP_URL=https://id.my.domain TRUST_PROXY=true MAXMIND_LICENSE_KEY=****************** PUID=1000 PGID=1000 ```
Author
Owner

@iNenadnano commented on GitHub:

@stonith404 correct, that was the line I replaced.
It works now with the latest development image!

@iNenadnano commented on GitHub: @stonith404 correct, that was the line I replaced. It works now with the latest `development` image!
Author
Owner

@stonith404 commented on GitHub:

Fixed in 0.27.1.

@stonith404 commented on GitHub: Fixed in `0.27.1`.
Author
Owner

@iNenadnano commented on GitHub:

Tested and working! Thank you!

@iNenadnano commented on GitHub: Tested and working! Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-2#390