ON-PREM: Mail server configuration

I followed the installation instructions for Proof-of-Concept Installation and cant configure smtp server. Sent emails are not displayed in mailhog web interface.

My settings

    mail {
        outgoing {
            enabled = enable

            fromAddress = "space@example.com"
            host = "mailhog"
            port = 1025
            protocol = "SMTP"
            login = "space"
            password = "space"
            messageQueuePrefix = "mailQueue"

            aggregationDelaySecs = 900
            rateLimitPerSecond = 3
        }
    }
2
8 comments

Ushatpomoyev, please change the config to the following:

    mail {
        outgoing {
          enabled = true
...

There's a mistake in the documentation, we'll fix it soon. Sorry for that.

3

Thanks, it works now

0

Pavel Boger I have edited my real smtp server like this. But still not receiving the mails, can you please check this.
My mail server is mail.aimway.de
and user is space@aimway.de
SMTP Port:25

    mail {

        outgoing {

            enabled = true

 

            // SMTP settings

            fromAddress = "space@aimway.de"

            host = "aimway.de"

            port = 25

            protocol = "SMTP"

            login = "space"

            password = "*********"

            messageQueuePrefix = "mailQueue"

 

            // handling properties

            aggregationDelaySecs = 900

            rateLimitPerSecond = 3

        }

    }

0

Nofilter Bol, may I ask if you see any errors in the main Space container when the email is supposed to be sent? By the way, what is exact email you expect?

0

I expect an invitation email, I invited some users (my team members). How can i see the errors ?
Thanks for your response.

0

Nofilter Bol, the Docker Compose installation should produce logs directly in the terminal it's been started from. Please send an invitation once again and check if the main Space container throws any exceptions to the logs.

0

You may use third party SMTP Server to send mails. I have used https://www.sendinblue.com free service, you may use whatever works best for you. It worked for me. Make sure to update port in docker-compose.yml file like below.

mailhog:
image: mailhog/mailhog
ports:
- 1025:587 # SMTP server port
- 8025:465 # UI port

then Edit space.on-premises.conf file like this.

mail {
outgoing {
enabled = true

// SMTP settings
fromAddress = "space@repo.example.com"
host = "smtp-relay.sendinblue.com"
port = 587
protocol = "SMTP"
login = "smtp_user_id"
password = "smtp_password"
messageQueuePrefix = "mailQueue"

// handling properties
aggregationDelaySecs = 900
rateLimitPerSecond = 3
}
}
1

I also 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`. 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.

1

Please sign in to leave a comment.