Django won't send password-reset email on Linode server, works on local machine

I'm running a Django project on a Linode box. In my I have this:

EMAIL_HOST_PASSWORD = 'my password here'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

When I fill out and submit the form in Django's password_reset template, no email gets sent. Instead I see this in uwsgi.log.

MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Subject: Password reset on Default
From: webmaster@localhost
Date: Wed, 16 May 2018 16:55:23 -0000
Message-ID: <>


You received this email because a request was made to reset the password.

If you requested this, go to the following page and choose a new password:

Your username:

Thank you.


When I fillout the form and submit it when running my Django project on my local machine, I actually get an email at the gmail account specified.

What's going on here?

3 Replies

Linode Staff

This is a long shot, but do you have threads enabled in UWSGI?

UWSGI Best Practices

Django isn't my wheelhouse but it's surprising to me that you can send email from your local machine to gmail without issue. Email is a very tricky thing and there are many many barriers enforced by providers in order to cut down on spam. Email will very commonly not work out of the box on any stock webserver, as email providers will require some basic configurations (usually DNS) proving you're a legitimate sender of email.

On a first look, your "From" address being "webmaster@localhost" is very likely to be something Google will filter as spam, so it looks like maybe your file isn't getting those variables referenced in your application. I would double check that this file is being pulled in properly.

In terms of DNS records you should also confirm you have the following:

  1. IPv4 and IPv6 rDNS (PTR) records
  2. SPF TXT record
  3. MX records

Here's a guide I've found that has more in-depth instructions for these points. Hope this helps!

Hey all, thanks for replying. Strange, but emails started sending correctly after I restart uwsgi.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct