DISCOURSE_MAIL_ENDPOINT not updating after changing domain name

I’ve had to change the domain name on a discourse server I had set up. It was configured with incoming mail (direct, not pop3).

I’ve edited mail-receiver.yml and app.yml and rebuilt the app to use the new domain name (newname.com), but when I restart the mail-receiver, the logs still show it as using the old settings (kinnship.org) for DISCOURSE_MAIL_ENDPOINT, DISCOURSE_API_KEY, and MAIL_DOMAIN.

Any tips on how to fix? Thank you!

<22>Jul 25 22:01:58 postfix/anvil[89]: statistics: max cache size 2 at Jul 25 21:52:13
Operating environment:
HOSTNAME=discourse-kinship-mail-receiver
GEM_HOME=/usr/local/bundle
TERM=xterm
BUNDLE_SILENCE_ROOT_WARNING=1
BUNDLE_APP_CONFIG=/usr/local/bundle
PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUBY_DOWNLOAD_SHA256=341cd9032e9fd17c452ed8562a8d43f7e45bfe05e411d0d7d627751dd82c578c
DOCKER_HOST_IP=172.17.0.1
PWD=/
DISCOURSE_API_USERNAME=system
LANG=en_US.UTF-8
RUBY_MAJOR=2.3
RUBYGEMS_VERSION=2.6.11
BUNDLE_BIN=/usr/local/bundle/bin
SHLVL=1
HOME=/root
DISCOURSE_MAIL_ENDPOINT=https://kinnship.org/admin/email/handle_mail
DISCOURSE_API_KEY=xxxxxxxxxxxx
BUNDLE_PATH=/usr/local/bundle
MAIL_DOMAIN=kinnship.org
RUBY_VERSION=2.3.4
BUNDLER_VERSION=1.14.6
_=/usr/bin/env
Delivering mail sent to kinnship.org to Discourse
Starting Postfix
<22>Jul 25 22:04:05 postfix/master[1]: daemon started -- version 3.1.1, configuration /etc/postfix
1 Like

I see one spelling of “kinship” in the line HOSTNAME=discourse-kinship-mail-receiver

I see a different spelling in: “DISCOURSE_MAIL_ENDPOINT=https://kinnship.org/…”

Down in the DISCOURSE_API_KEY lines there are 2 "n"s in “kinship”:
"MAIL_DOMAIN=kinnship.org
“Delivering mail sent to kinnship.org to Discourse”

Either you lost an “n” in the first line or the other 3 lines have an extra “n” in the domain name.

1 Like

ah key point that I should have said in the original is that the new domain name is entirely different! This is the old one.

1 Like

I can’t tell whether you know this, but you should

./launcher rebuild mail-receiver

Though

 ./launcher destroy mail-receiver
 ./launcher start mail-receiver

would probably work.

3 Likes

You’re amazing! I was doing ./launcher bootstrap mail-receiver thinking it did the same. Epic! Thank you!

(Now to forgot about those 3 hours I spent trying and will never get back…!)

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.