Closed gegenschall closed 1 month ago
Thanks for reporting.
I wasn't able to reproduce this issue. I tested with both a Linux and Windows container with your Compose file.
Can you check the console output for the container and see if there's anything there? Is it starting up OK?
This is the log output for the service:
Attaching to smtp-1
smtp-1 | smtp4dev version 3.6.1+5e577a8b4152ceb7276a5b8d4432430c9ff9055d
smtp-1 | https://github.com/rnwood/smtp4dev
smtp-1 | .NET Core runtime version: .NET 8.0.4
smtp-1 |
smtp-1 | > For help use argument --help
smtp-1 |
smtp-1 | Install location: /
smtp-1 | DataDir: /smtp4dev
smtp-1 | Default settings file: /app/appsettings.json
smtp-1 | User settings file: /smtp4dev/appsettings.json
smtp-1 | Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
smtp-1 | Parsing AutomaticRelayExpression
smtp-1 | Parsing CredentialsValidationExpression
smtp-1 | Parsing RecipientValidationExpression
smtp-1 | Parsing MessageValidationExpression
smtp-1 | No XML encryptor configured. Key {ebffe5e1-66be-43ca-9ab4-935bbd140d0b} may be persisted to storage in unencrypted form.
smtp-1 | Using Sqlite database at /smtp4dev/database.db
smtp-1 | TLS mode: None
smtp-1 | SMTP Server is listening on port 25 (::).
smtp-1 | Keeping last 100 messages per mailbox and 100 sessions.
smtp-1 | IMAP Server is listening on port 143 (::)
smtp-1 | Overriding HTTP_PORTS '80' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://*:80'.
smtp-1 | Now listening on: http://[::]:80
Here's the log of a request to it:
curl -v localhost:5000
* Host localhost:5000 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
* Trying [::1]:5000...
* Connected to localhost (::1) port 5000
> GET / HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 403 Forbidden
< Content-Length: 0
< Server: AirTunes/800.74.5
< X-Apple-ProcessingTime: 0
< X-Apple-RequestReceivedTimestamp: 55741890
<
* Connection #0 to host localhost left intact
The SMTP itself is accepting incoming connections and seems to handle emails just fine. If it helps, I'm on an Apple Silicon Mac, so the architecture is arm64.
edit: Looking at the user agent I just realized that port 5000 seems to be a macOS service that I'm not aware of. One would think that Docker would not be able to bind to that port then and fail but doesn't seem to be the case.
Terribly sorry for opening this. Seems to be resolved, apologies!
I'm using smtp4dev with Docker Compose like so:
The server starts up just fine and reports it's running on ports 80, 25 and 143 for HTTP, SMTP, and IMAP. When I open a browser to
http://localhost:5000
I am only presented with a HTTP 403 error with an empty respose.Is there anything I need to configure to make the frontend work? I couldn't find anything in the docs.