slimta / python-slimta

Python libraries to send, receive, and queue email.
https://slimta.org/
MIT License
171 stars 43 forks source link

Any mail sent to any other email provider will end up in "spam" #110

Closed Martmists-GH closed 7 years ago

Martmists-GH commented 7 years ago

I myself am not hugely familiar with the whole working in the web, and my english isn't that good either, which may have caused me to misunderstand things in the docs that might have solved this.

The problem is: when sending an email to e.g. martmists@gmail.com it ends up in my spam folder. Looking up possible causes, I ended up at the following:

Fix messages that aren't authenticated
First, make sure messages you sent are authenticated using DKIM (preferred) or SPF.

Next, check out these tips for sending bulk messages with Gmail:

Use RSA keys that are at least 1024-bits long. Emails signed with less than 1024-bit keys are considered unsigned and can easily be spoofed.

In all honesty, I have no clue what this means, and I couldn't find anything in the docs about it. Can someone point me in the right direction?

icgood commented 7 years ago

Hey @martmists, that is a very good question. "Deliverability," as it's called, is one of the hardest problems to solve in email. It's the primary reason so many choose to outsource their email service.

The python-slimta library provides some of the tools you need, such as authentication, but the rest is up to you to configure. For example, start by setting up authentication. Then, configure an SPF record for your domain (see SPF Record Syntax or try v=spf1 a -all). Finally, check your mail server against common blacklists to see if it's listed (different blacklists have different rules for removal). After taking these steps, most of the common reasons your mail might be blocked should be resolved. Email deliverability can really be a full-time job, so hopefully these steps are enough to get you started.