Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Avoid email send by Php/Drupal mark as spam

By editor , 13 February, 2017
Question

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" <john@yourdomain.com> ).

Monitor your abuse accounts, such as abuse@yourdomain.com and postmaster@yourdomain.com. 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.
       -> NOTE : The DNS record must belike : SELECTOR._domainkey.domain.com (Example : email._domainkey.domain.com).


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

 

Tags

  • PHP
  • Server
  • Linux

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer