[Solved] Email content link formatting on Beanstalk


#1

Hi all. I’ve run into an issue that I don’t have much insight into, namely the construction of URLs in Metabase-sent emails.

In particular, I’m seeing http and the Beanstalk instance’s internal IP instead of https and the instance’s FQDN. So, users get a password reset link like:
http://172.31.72.225/auth/reset_password/2_6a7f5439-5a73-42f4-a7da-e26b7cb5e3a8

instead of the correct:
https://metabase.company.com/auth/reset_password/2_6a7f5439-5a73-42f4-a7da-e26b7cb5e3a8

When I initially set up the instance, there were outstanding issues with Metabase communicating directly with Office365 as an email provider. If those are resolved I can probably point Metabase at Office365 directly and solve the issue. Currently I’m using an SMTP relay set up on another EC2 instance to hit Office365. The Metabase instance hits the SMTP relay via its internal 172.31.x.x address, which is what shows up as the host in the links generated for the emails.

Updated to v0.31.1 and am now connecting to Office365 directly, but email invites etc still show the internal IP.

My question is, ultimately, how are the URLs within Metabase emails constructed, and is there some easy way to define the protocol and FQDN to use therein? If not, what values are used to dynamically construct the URLs so that I can attempt to tweak things so that those values line up with what I need?

Thanks!


#2

I’m dumb, and somehow completely overlooked the General tab of the admin setup menu.

Seems Metabase on Beanstalk uses the internal IP and http by default for the “Site URL” value, updated it to the correct https + FQDN and sorted things out.