Trouble with setting up mail and local SSL certs


(Rene Vucko) #1

Hi, I just sucessfully installed a mail server on my virtual machine. I tested it out, and it can send mail out(I sent a mail from the computer to my gmail account and I recieved it). Now I installed discourse, the forums are running perfectly, but I can’t seem to get the confirmation mail for my first admin account. When I launch

sudo ./launcher mailtest app`

I get the error: ERROR: hostname ‘mail.server.com’ doesn’t match ‘ubuntu’.
Now my settings are like this(in the app,yml):
DISCOURSE_DEVELOPER_EMAILS: 'mymai@domain.com’
DISCOURSE_HOSTNAME: ‘localhost’ --the virtual machine box IP is 10.1.0.210, where I can access the forums
DISCOURSE_SMTP_ADDRESS: 'mail.server.com
okay so the “mail.server.com” is my postfix hostname. In my /etc/hosts I have edited it like this

10.1.0.210 mail.server.com
127.0.0.1 localhost
127.0.1.1 ubuntu

I didn’t change anything here except for the added mail.server.com.
Now my etc/hostname looks like this

ubuntu
10.1.0.210 mail.server.com

My postfix is configured with the relay mail server of our company, and when I try to send mail to any email accounts from the command line, it works. I get the email. It’s not even in the spam folder. So I guess this is configured correctly.

DISCOURSE_SMTP_PORT: 25
I have tried using 587 but it gives me even more errros and says conn refused.
DISCOURSE_SMTP_USER_NAME: 'mymail@domain.com’
DISCOURSE_SMTP_PASSWORD: ‘mypassword’

And that’s it from my side, hope you guys can help.

The initial goal was to connect drupal with these forums, is this even possible? Thanks!


(Rene Vucko) #2

Now it shows me the error:
SMTP AUTH extension not supported by server.
Authorization is not available - you may need to use TLS.


(Rene Vucko) #8

Well I managed to set it up now, but your installation instructions are missing the VITAL part to setting up discourse.
In the app.yml I added

DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: peer

or whatever your mail server is using
and below I had to edit

#-exec rails r "SiteSetting.notification_email='nonedited'"

here I had to uncomment this line and insert my email.

If you don’t do this when you first install discourse, the mail server WILL NOT WORK.


(Jeff Atwood) #9

This implies the SSL cert is only valid on your computers, e.g. your client will be validating the certificate, not a central certificate authority. So this is peculiar to you.