简体   繁体   中英

How to prevent service messages from being marked as SPAM?

I am supporting a small stand-alone service for authors, who wish to share their texts with others, discuss them and so on.

As any service it requires sending lots of mails: activation (after join), confirmations and so on. I am using PHPMailer for that purpose.

Question: What additional steps should I take to prevent mails, sent by the service to be marked as SPAM? Should I adjust DNS settings somehow? Could I register my server with popular mail services somehow?

Any links as well as what comes from your experience are greatly appreciated.

1. Mail header

Use correct mail haders, when you send an mail.

2. DNS Settings

>> DNS Part 1

Be sure that you have configurated your Zonefile/DNS Server correctly. Create an TXT Record, a small range of providers check the SPF-Record (Replace the IP 255.255.255.255 with your's).

If your provider accept editing the complete Zonefile, add following line:

@ 300 IN TXT "v=spf1 ip4:255.255.255.255 ~all"

Otherwise create an TXT Record with the content v=spf1 ip4:255.255.255.255 ~all

>> DNS Part 2

Add an reverse DNS (rDNS) entry. rDNS resolve your IP 255.255.255.255 to the right hostname (it's the contrary from domain resolving)

>> DNS Part 3

Check if you have set an MX record.

3. Server Settings

Be sure that your server is configured. Check if the correct hostname is configured!

4. Testing

Test your system with a lot of freemailer's like GMX, Google-Mail, Yahoo-Mail and other to check if the mail going to the spam folder.

Good keywords to google for, if you are going to send any emails from your server:

  • SPF (Sender Policy Framework);
  • DKIM (DomainKeys Identified Mail);
  • marketing/transactional emails;
  • mail exchanger record (MX record)
  • Postfix (mail transfer agent)

One more note. It's easier, cheaper and much more reliable to use one of the existing email delivery services (google SendGrid, Amazon SES) if you are small startup service.

Why? Just because emails work that way. Those services have quite a reputation and they do review your application before you can send any emails. So you are buying not only some technical tools, but also a share of their reputation, which is not that easy to earn from scratch.

If you design you mailing system right (always save everything you send out to database!), it would be easy to switch to any other solution in the future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM