New setup - am not receiving admin email

I’ve set up discourse on digitalocean server with ubuntu - it all installed fine.

I have my own smtp server that sends out emails fine from various apps. I can telnet into it without a problem on port 25 from any location including the discourse server.

When I try to login or register or rebuilt discourse I don’t seem to receive any emails.When trying to create a new user I can’t as the system seems to hang verifying my user id. Tried using mandrill but it wants apis as password which I can’t seem to find on their site.

Not sure how to move forward - the logs don’t seem to show any errors or problems. Am pretty stuck.

What does forum.example.com/logs say? Did you follow our email troubleshooting howto? The mandrill API keys are under API section, they are not hard to find.

I did follow the guide - can’t seem to spot the problem - my config file on our sandbox has:

DISCOURSE_DEVELOPER_EMAILS: 'xxx@gmail.com'
DISCOURSE_HOSTNAME: 'monthlysend.com'
DISCOURSE_SMTP_ADDRESS: 209.190.96.26          # (mandatory)
DISCOURSE_SMTP_PORT: 25                        # (optional)
DISCOURSE_SMTP_USER_NAME: discourse            # (optional)
DISCOURSE_SMTP_PASSWORD:  xxx # (optional)
DISCOURSE_SMTP_AUTHENTICATION: "login"

I do telnet 209.190.96.26 and that works fine - I can see the inbound queue on the mta and no emails are coming in.

After any updates to config I rerun:

cd /var/discourse/
./launcher rebuild app
which runs fine.

I see the following in the log file:

run-parts: executing /etc/runit/1.d/00-ensure-links
run-parts: executing /etc/runit/1.d/anacron
run-parts: executing /etc/runit/1.d/cleanup-pids
Cleaning stale PID files
run-parts: executing /etc/runit/1.d/copy-env
run-parts: executing /etc/runit/1.d/ensure-web-nginx-read
Started runsvdir, PID is 29
ok: run: redis: (pid 37) 0s
ok: run: postgres: (pid 42) 0s
rsyslogd: invalid or yet-unknown config file command 'KLogPermitNonKernelFacility' - have you forgotten to load a module? [try http://www.rsyslog.com/e/3003 ]
rsyslogd: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
rsyslogd: Could no open output pipe '/dev/xconsole': No such file or directory [try http://www.rsyslog.com/e/2039 ]
37:M 12 Aug 03:43:44.439 * Redis 3.0.1 (00000000/0) 64 bit, standalone mode, port 6379, pid 37 ready to start.
37:M 12 Aug 03:43:44.442 # Server started, Redis version 3.0.1
37:M 12 Aug 03:43:44.443 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1'$
37:M 12 Aug 03:43:44.444 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. T$
37:M 12 Aug 03:43:44.447 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
Server listening on 0.0.0.0 port 22.

Server listening on :: port 22.

37:M 12 Aug 03:43:44.478 * DB loaded from disk: 0.029 seconds
37:M 12 Aug 03:43:44.488 * The server is now ready to accept connections on port 6379
2015-08-12 03:43:44 UTC [61-1] LOG:  database system was shut down at 2015-08-12 03:42:56 UTC
2015-08-12 03:43:44 UTC [42-1] LOG:  database system is ready to accept connections
2015-08-12 03:43:44 UTC [65-1] LOG:  autovacuum launcher started
supervisor pid: 43 unicorn pid: 67
37:M 12 Aug 03:48:45.021 * 10 changes in 300 seconds. Saving...
37:M 12 Aug 03:48:45.025 * Background saving started by pid 449
449:C 12 Aug 03:48:45.041 * DB saved on disk
449:C 12 Aug 03:48:45.042 * RDB: 0 MB of memory used by copy-on-write
37:M 12 Aug 03:48:45.127 * Background saving terminated with success
37:M 12 Aug 03:53:46.096 * 10 changes in 300 seconds. Saving...
37:M 12 Aug 03:53:46.099 * Background saving started by pid 775
775:C 12 Aug 03:53:46.129 * DB saved on disk
775:C 12 Aug 03:53:46.131 * RDB: 0 MB of memory used by copy-on-write
37:M 12 Aug 03:53:46.200 * Background saving terminated with success
37:M 12 Aug 03:58:47.055 * 10 changes in 300 seconds. Saving...
37:M 12 Aug 03:58:47.056 * Background saving started by pid 1100
...
27439:C 12 Aug 10:40:07.085 * DB saved on disk
27439:C 12 Aug 10:40:07.087 * RDB: 0 MB of memory used by copy-on-write
37:M 12 Aug 10:40:07.150 * Background saving terminated with success
37:M 12 Aug 10:45:08.087 * 10 changes in 300 seconds. Saving...
37:M 12 Aug 10:45:08.095 * Background saving started by pid 27768
27768:C 12 Aug 10:45:08.111 * DB saved on disk
27768:C 12 Aug 10:45:08.111 * RDB: 0 MB of memory used by copy-on-write
37:M 12 Aug 10:45:08.197 * Background saving terminated with success

Any thoughts on this codinghorror? I’m struggling with this registration thing - isn’t it possible to activate via ssh command line or something? This is really frustrating to get going - I’ve spent a no of days on this with no test system…I must say it’s been the most difficult app I’ve ever tried to install on linux (I initially tried centos - and finally found without a kernal patch it wasn’t going to work!)

Yes, if you search howto topics you can set up an admin manually.

You are still in a world of pain if you cannot get email going since nobody will be able to sign up for your site. I suggest purchasing our $99 install option if you want functional email, as we will set it up on your behalf.

(You also get a sweet mandrill free email deal since we have a private promo code that I can’t disclose, but uh… let’s just say It is a very good deal enough that the mail part of the install becomes kind of a crazy bargain even if you threw everything else away.)

Cracked it - my voluntary group’s computers all go through a proxy!

Something I should have checked at the beginning - well, at least all those hours of research has improved my knowledge of discourse files/support/forums…

Everything is working beautifully now.

Thanks for your help CH. Appreciated!

2 Likes