ON-PREM: Mail not working.
Hello everyone,
I have a problem with Space not sending emails.
MailHog is running correctly and I can access the UI.
I can curl to MailHog with: `curl http://mailhog:8025` from the docker on-prem container. So the connection is there.
It's also not my firewall, as I've allowed for port 1025 and 8025. The logs did not show any denials.
The email address is also correct.
This is the config added to the top of space.on-premises.conf:
mail {
outgoing {
enabled = true
// protocol settings
fromAddress = "space@space.example.com"
host = "mailhog"
port = 1025
protocol = "SMTP" // "SSL" and "TLS" are also supported
login = "space"
password = "space"
messageQueuePrefix = "mailQueue"
// handling properties
aggregationDelaySecs = 900
rateLimitPerSecond = 3
}
}
This has been added to docker-compose.yml under services:
mailhog:
image: mailhog/mailhog
ports:
- 1025:1025 # SMTP server port
- 8025:8025 # UI port
networks:
- "frontend"
Here are the docker logs, as you can see MailHog is running:
2023-11-29 13:28:41 space-on-premises-mailhog-1 | [APIv1] KEEPALIVE /api/v1/events
2023-11-29 13:29:41 space-on-premises-mailhog-1 | [APIv1] KEEPALIVE /api/v1/events
2023-11-29 13:30:41 space-on-premises-mailhog-1 | [APIv1] KEEPALIVE /api/v1/events
2023-11-29 13:31:15 space-on-premises-space-1 | 2023-11-29 12:31:15.610 [[tx-pool] shared-16] INFO c.server.mail.EmailVerification [trace_id=<redacted_trace_id_1>, orgDomain=space, txOriginName=EmailVerification/sendVerificationEmail, ip=<redacted_ip_1>, dbType=postgresql, clientTimezone=Europe/Amsterdam, principalName=<redacted_user_1>, principalId=<redacted_principal_id_1>, userId=<redacted_user_id_1>, orgId=<redacted_org_id_1>, dbKey=postgres, clientType=Browser, requestId=<redacted_request_id_1>, connectionId=<redacted_connection_id_1>] - Email: "<redacted_email_1>", profile: "<redacted_profile_id_1>" - attempting to send the verification mail
2023-11-29 13:31:15 space-on-premises-space-1 | 2023-11-29 12:31:15.611 [[tx-pool] shared-16] INFO c.server.mail.EmailVerification [trace_id=<redacted_trace_id_1>, orgDomain=space, txOriginName=EmailVerification/sendVerificationEmail, ip=<redacted_ip_1>, dbType=postgresql, clientTimezone=Europe/Amsterdam, principalName=<redacted_user_1>, principalId=<redacted_principal_id_1>, userId=<redacted_user_id_1>, orgId=<redacted_org_id_1>, dbKey=postgres, clientType=Browser, requestId=<redacted_request_id_1>, connectionId=<redacted_connection_id_1>] - Email: "<redacted_email_1>", profile: "<redacted_profile_id_1>" - creating a new email verification request with id: <redacted_id_1>
2023-11-29 13:31:41 space-on-premises-mailhog-1 | [APIv1] KEEPALIVE /api/v1/events
2023-11-29 13:32:41 space-on-premises-mailhog-1 | [APIv1] KEEPALIVE /api/v1/events
2023-11-29 13:33:41 space-on-premises-mailhog-1 | [APIv1] KEEPALIVE /api/v1/events
Can anybody help me. I have no intelli-idea what to do next.
Please sign in to leave a comment.
Thanks for the question. Please note that mailhog is not a real SMTP server that sends emails to the end users. Instead, it's a handy tool to intersect emails sent by the Space installation itself. In other words, it's just an example of how SMTP is supposed to be configured and the easiest way to check the configuration works. For a production installation, it's necessary to spin up a real SMTP server and connect it to Space as described in the example above.
Thank you very much! I'll let you know if it worked out.