In production.config.json changing “from” parameter in mail block still has test email sent through ghost http admin interface as ghost@hostname. I’m using mailgun as ghost’s email setup and I also have webmail setup on zoho.com for denimandleather@denimandleather.me. I have SPF and DKIM setup as TXT records for BOTH zoho and mailgun.
"from": "'Denim And Leather' <denimandleather@denimandleather.me>",
Looks correct. But still getting error after restarting ghost and restarting the server.
I don’t see any error messages when I send a test email.
I had “from” inside of “options”: {} instead of “mail”: {}.
But I fixed it but the email is still sent from ghost@hostname. Could it have something to do with the way I have set up SPF and DKIM which is meant to prevent email phishing? The email is sent via mailgun to my email address which is served by 3rd party webmail zoho.com. I don’t have any email server setup on my own VPS.
I had similiar issues setting up my production instance to work with mailgun. I think nodemailer might have an issue with the single quotes in the from field. I did some research back then and if I remember correctly, the single quotes aren’t explicitly necessary. After I got rid of the single quotes it started working. Here’s the mail portion of the config used by the instance (the sender works properly):
With regards to SPF / DKIM, Dmarcian is a well known service which provides inspection of DMARC (it’s a txt record that you add to your domain which configures reporting for DKIM + SPF), and it looks like mailgun isn’t permitted to send (it only allows zoho) via your spf records. You can run your check here. I don’t know what selector you chose for dkim, so I can’t verify it’s setup properly.
You’re sending the test email using the labs page in the admin interface, correct?
Start by checking folder permissions and nginx file setup in /etc/nginx/sites-available and make sure that you have the same file or a soft link in sites-enabled
Bad gateway means ghost didn’t start. Can you paste your config in a JSON validator service (like JSONLint) and make sure there aren’t any errors? The mail {} shouldn’t be the only thing in your config file