Custom mail server not working

I have installed ODK on ubuntu20 in Linode. I have added custom mail server. and Build and restart the service container. docker compose build service && docker compose up -d service.

After adding custom mail server i am not able to create new user. Trying to reset the password its keep scrolling. and users not able to receive the mails.

Here are the attached screenshot for .env file and errors logs.

I appreciate your support.

Thanks
odk-central-env


https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-8361e398-8af4-4e97-b147-6c6c4ac95353 suggests you should use port 587. And if you do, EMAIL_SECURE should be set to false.

1 Like

Thanks @yanokwa for your response.

Yes, i did the same but still getting issue. You can see the .env file smtp setting.
EMAIL_HOST=smtp.office365.com
EMAIL_PORT=587
EMAIL_SECURE=false
EMAIL_IGNORE_TLS=false
EMAIL_USER=xxx@xxx.org
EMAIL_PASSWORD=Welcome@xxx

Also i have attached the email logs. Even creating user still scrolling if we use these Smtp setting.

Thanks
odk-central-createrror

Is there anyone who can help me?

Are you still getting 500 errors once you change the port? Or is the problem you are getting no errors, but the messages are not being delivered.

Hello @yanokwa , we are facing the same issue.

We are getting attached error, while click on reset password.

Hello @Mohinder_Singh , perhaps you can check out the following link. There are a lot of suggestions for how to troubleshoot the problem. ODK Central not Sending Emails to Users - #15

Thanks @dicksonsamwel for your response. Now i am using default mail settings (Not using custom mail). i am trying to click forgot password its showing error in the logs:

++-------------------------------------------
central-mail-1 | 1199 H=aspmx.l.google.com [172.217.194.26]: SMTP timeout after initial connection: Connection timed out
central-mail-1 | 1199 Connecting to alt1.aspmx.l.google.com [173.194.202.26]:25 ... TFO mode sendto, no data: EINPROGRESS
central-mail-1 | 1199 connected
central-mail-1 | 1194 SMTP(Connection timed out)<<
central-mail-1 | 1194 SMTP(close)>>
central-mail-1 | 1194 LOG: MAIN
central-mail-1 | 1194 H=alt3.aspmx.l.google.com [142.250.115.27]: SMTP timeout after initial connection: Connection timed out
central-mail-1 | 1193 LOG: MAIN
central-mail-1 | 1193 == sourabh.bhaxxxxx@xxxx.org R=dnslookup T=remote_smtp defer (110): Connection timed out H=alt3.aspmx.l.google.com [142.250.115.27]: SMTP timeout after initial connection
++-------------------------------------------

Trying to telnet 25 port in localhost, but getting error :
root@139-144-13-74:~/central# telnet localhost 25
Trying ::1...
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

When i checked on the process then mail service is up and working:
central-mail-1 /bin/entrypoint.sh exim -b ... Up 25/tcp

Thanks