I have set up a Zoho email account to handle my email delivery from my site on Digitial Ocean.
I have an MX record for the site pointing to the Zoho server, and the emails are being delivered, but sometimes flagged as spam, depending on how sensitive the receiving email client is. My Yahoo account receives them fine; my Gmail account receives them but with a warning that sender can’t be confirmed. A third account sends them to spam.
The Zoho help files mentions the following, which may be the issue –
“In case you use webforms in your websites, which sends emails, the email sending server at your web-host, in most cases, tries to deliver the email locally, as the domain name in the ‘To Address’ matches with the domain name used with the website. Hence make sure that you configure ‘Remote Server’ for email delivery to ensure that you receive emails without any errors. Switch off any Local Host or Local email delivery configuration, which causes the emails to not reach the Zoho Mail servers at all.”
Does anyone have any ideas on how to set up my server to switch off local email delivery, or is this perhaps not the issue?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If you don’t understand, read about it. You will learn by doing.
Perform a backup of some sort-- snapshot, web server block html folder, database, postfix folder.
I use the portable editions of WinSCP and PuTTY (have had issues with the DO QEMU console).
Digital Ocean Ubuntu NGINX Lemp droplet.
Zoho email service (ie external server).
Need to send email from a PHP form using mail() to an existing email address at Zoho.com.
No credentials required. Authenticates on DMARC, DKIM, SPF, reverse DNS.
Now NSLookup and ping -a return ‘domain.ext’ instead of ‘lemp-s-1vcpu-2gb-sfo2-01.’
Substitute your domain name everywhere ‘domain.ext’ appears.
You will need A and AAAA records for both www.domain.ext and domain.ext.
Create a CNAME entry for Zoho login URL. For example: webmail.domain.ext to alias business.zoho.com.
https://www.digitalocean.com/docs/networking/dns/how-to/
Use the link below to
Set up the MX records for the Zoho mail service.
Generate DMARC, SPF, DKIM TXT DNS records.
Verify the domain.
https://www.zoho.com/mail/help/adminconsole/email-hosting-setup.html
v=spf1 ip4:dropletIPaddress include:zoho.com ~all
Authorizes Zoho to accept messages from stated ip address.
Use the MX Tool Box site to test if desired–
Install Postfix as the MTA (more secure than sendmail, widely used)–
Modify Postfix Config–
First, open /etc/postfix/main.cf with a text editor like Nano.
Make the following changes and additions (Comment out the original entry with a leading # as backup.). Use your actual domain name in place of domain.ext.
myhostname = domain.ext
mydestination =
(The following three are for hardening Postfix security.)
inet_interfaces = loopback-only
disable_vrfy_command = yes
smtpd_helo_required = yes
Run 'service postfix reload' after saving the file to apply settings.
https://linux-audit.com/postfix-hardening-guide-for-security-and-privacy/
If you are confident in your PHP script, then visit the file with a web browser to trigger an email.
Otherwise, to simply test functionality of the PHP mail() command, download a free PHP mail test script.
Note any error messages if any. Look them up on the web for insight and explanation.
Check the mail.log file at /var/log/mail.log to aid in troubleshooting.
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.