How to avoid an email send with drupal php mark as a junk mail ?
An email is classified as spam or not spam on the receiving end, not the sending end. But you can improve
Use email authentication methods, such as SPF, and DKIM to prove that your emails and your domain name belong together, and to prevent spoofing of your domain name. The SPF website includes a wizard to generate the DNS information for your site.
Check your reverse DNS to make sure the IP address of your mail server points to the domain name that you use for sending mail.
Make sure that the IP-address that you're using is not on a blacklist
Make sure that the reply-to address is a valid, existing address.
Use the full, real name of the addressee in the To field, not just the email-address (e.g. "John Smith" <firstname.lastname@example.org> ).
Monitor your abuse accounts, such as email@example.com and firstname.lastname@example.org. That means - make sure that these accounts exist, read what's sent to them, and act on complaints.
Finally, make it really easy to unsubscribe. Otherwise, your users will unsubscribe by pressing the spam button, and that will affect your reputation.
That said, getting Hotmail to accept your emails remains a black art.
Add DKIM on Postfix / ubuntu
Tutorial : https://help.ubuntu.com/community/Postfix/DKIM
Tips for a server using Debian/Ubuntu and Virtualmin.
Add DKIM (DomainKeys Identified Mail) from Virtualmin
Active / Install DomainKeys Identified Mail (DKIM) from virtualmin
Virtualmin -> Email messages -> DomainKeys Identified Mail
- Install if not already done.
- Set 'Selector for DKIM record name' Example : 'email'
- Add or Exclude domains
- Then add public key shown on 'DNS records for additional domains' to your DNS.
Configure the domain to use in outbound mail (Postfix Mail Server)
- If you want to use a single domain name for all virtual servers, set it on /etc/mailname
- Configure domain on:
Webmin -> Servers -> Postfix Mail Server -> General Options
Configure DNS for DKIM
Selector : Example : selector._domainkey.yourdomain.com