Forgot Password does not work

Hi there,

I tried using the “Forgot password” function, but it always throws this error:

Mail System not configured. Please define some AD_MailConfig or set AD_Client.SMTPHost; AD_MailConfig search parameters: AD_Client_ID=ClientEMailConfig(clientId=ClientId(repoId=1000000), sendEmailsFromServer=false, smtpHost=, smtpPort=25, startTLS=false, email=null, smtpAuthorization=false, username=, passwordResetMailTemplateId=Optional[MailTemplateId(repoId=50000)]

I am on 5.162.2-267+release on docker using ubuntu 18.04.
SMTP settings are entered for system user (via java client) and all other users via web ui (but they do not reflect these settings) and sending test mails from the web ui does work.

Can you hint me where to enter the default mailserver for the “Forgot Password” function?

Thanks,
Timo

hi timo,

the problem is a missing mail server config.

Try setting one up as described here: How do I set up a mailbox for outbound documents?

Then create a routing as described here:
https://docs.metasfresh.org/webui_collection/EN/Setup_email_server_routing

BUT: instead of configuring the routing for a document or Process you select “Custom Type”:

Might be that you need a server cache reset to make it effective.

Let me know if that worked for you!

Norbert

1 Like

Wow, thanks for the quick reply. It worked.
A follow up question:
The resulting reset link comes with localhost and the wrong port, even though metasfresh runs (and should know) its public DNS entry.
http://localhost:3000/resetPassword?token=XY

Do I have to tell metasfresh somewhere else on which domain/port it is running?

Thanks alot,
Timo

hi,

yes, there is a sysconfig where you can configure that DNS entry with the name webui.frontend.url.
You can access it either using Role Systemadministrator in window System Konfig
or via sql:

select value from ad_sysconfig where name='webui.frontend.url'

You would fill up value with something like https://myserver.tld
Then you do a restart or server cache reset.

Hope that helps.

UPDATE: Figured out I had to put ‘*’ for organisation and not the default one being filled in by the system.
hi Norbert (@metasnw),
unfortunately, the described approach does not work on my setup. I am running metasfresh with docker-compose v2 behind traefik 2.4 with the latest git reapository.

I still get the same error as Timo described above.

Logging in with the metasfresh user, I see two outbound mailboxes. A standard one @localhost.org and one created by me. It seems the system sticks to using the localhost.org mailbox instead of the one I created. I cannot edit or delete that one though. Do you know, if there is a way to change that?

Would be grateful for any hints or help.

Cheers
Luke

Hey Luke,

have you tried this steps to make sure metasfresh knows you want to use the other mailbox including the server cache reset or restart?

cheers
Norbert

Hey Norbert,
sry, my Update was obviously not prominent enough, my bad. I got it working with the above hints and some brain grease xD

I still wonder, why I am not able to edit or delete the default @localhost.org mailbox though. Do you have any hints on that as well?

Greetings from Berlin
Luke