User Controls

ISS email server

  1. #1
    Soyboy V: A Cat-Girl/Boy Under Every Bed African Astronaut [my no haunted nonbeing]
    Just curious, what email server was set up on this deployment? Just a local SMTP?

    At the minute the github seems to send emails to locmem by default, and I have no idea how to read them. The documentation says that "the 'locmem' backend stores messages in a special attribute of the django.core.mail module. It’s a list with an EmailMessage instance for each message that would be sent."

    I'm guessing that is all Python/Django stuff.

    Is sending emails using something like Mailgun or SendGrid a more portable alternative to setting up a local email server?
  2. #2
    Lanny Bird of Courage
    Unfortunately running an SMTP server that actually does what you want is kind of a black art. I've written an SMTP server before, it's not that it's particularly technically challenging, the problem is that out of necessity novel hosts are considered spam by most reputable nodes. Like if I ran a SMTP server on the machine that hosts the site, google/MS/yahoo would spamcan everything. I don't even know what the process for getting considered a non-spammer is but it's not an ordeal I want to undergo.

    As a result, in production I'm using gandi's SMTP server, gandi being the registrar for the domain. Mailgun and sendgrid are also options to get around trust issues in the SMTP ecosystem and are probably better than Gandi's service since their business model depends on their outbound email not getting trashed.

    For local development I suggest adding this to your settings file:


    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'


    The locmem backend is nice for unit testing because you can programmatically inspect emails, but for development that one will print out emails to stdout while the dev server is running which makes it easier to inspect them manually.
    The following users say it would be alright if the author of this post didn't die in a fire!
  3. #3
    ECAP Tuskegee Airman
    ISIS
  4. #4
    Dfg Tuskegee Airman [compulsively riposte the emigrant]
    Originally posted by Lanny Unfortunately running an SMTP server that actually does what you want is kind of a black art. I've written an SMTP server before, it's not that it's particularly technically challenging, the problem is that out of necessity novel hosts are considered spam by most reputable nodes. Like if I ran a SMTP server on the machine that hosts the site, google/MS/yahoo would spamcan everything. I don't even know what the process for getting considered a non-spammer is but it's not an ordeal I want to undergo.

    As a result, in production I'm using gandi's SMTP server, gandi being the registrar for the domain. Mailgun and sendgrid are also options to get around trust issues in the SMTP ecosystem and are probably better than Gandi's service since their business model depends on their outbound email not getting trashed.

    For local development I suggest adding this to your settings file:


    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'


    The locmem backend is nice for unit testing because you can programmatically inspect emails, but for development that one will print out emails to stdout while the dev server is running which makes it easier to inspect them manually.

    Google apps works just as well, it's cheaper and you do get more out of it.
  5. #5
    -SpectraL coward [the spuriously bluish-lilac bushman]
    You can easily run a full-fledged SMTP server right off your own box.
  6. #6
    Soyboy V: A Cat-Girl/Boy Under Every Bed African Astronaut [my no haunted nonbeing]
    Originally posted by Lanny Unfortunately running an SMTP server that actually does what you want is kind of a black art. I've written an SMTP server before, it's not that it's particularly technically challenging, the problem is that out of necessity novel hosts are considered spam by most reputable nodes. Like if I ran a SMTP server on the machine that hosts the site, google/MS/yahoo would spamcan everything. I don't even know what the process for getting considered a non-spammer is but it's not an ordeal I want to undergo.

    As a result, in production I'm using gandi's SMTP server, gandi being the registrar for the domain. Mailgun and sendgrid are also options to get around trust issues in the SMTP ecosystem and are probably better than Gandi's service since their business model depends on their outbound email not getting trashed.

    For local development I suggest adding this to your settings file:


    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'


    The locmem backend is nice for unit testing because you can programmatically inspect emails, but for development that one will print out emails to stdout while the dev server is running which makes it easier to inspect them manually.

    I actually might try with the backend that outputs email to the filesystem. I have a weird system due to still being on BASH on Windows. Next lappy will be a decent Linux one hopefully.
Jump to Top