• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Startup Hero

The Official Blog Of Name Hero

Learn To Fly Above The Competition Get Started
  • HomeWelcome
  • CoursesVideo Training Center
  • About UsWhat is StartupHero?
  • BlogGet the latest
  • Start HereStartup 101
  • SpeakingPodcast & Media
  • ResourcesTools to help You
    • Reselling WordPress Hosting
    • Resell Hero
    • How To Start A Blog
  • NameHeroCloud Web Hosting

How To Disable Inbound Mail On A Managed VPS

By Bhagwad Park on December 5, 2022 0

How To Disable Inbound Mail On A Managed VPS

If you’re like me, you don’t use your VPS server for incoming mail. Instead, I only want to receive e-mails from my VPS for server events. But the hassle of configuring an incoming mail server, dealing with spam, storage issues, and more are too much for me. Instead, I outsource all that to a dedicated service. But if you use a managed VPS server like NameHero, the services that accept incoming mail are still active. Here’s how to disable them.

Find the Right Modules to Disable

The challenge is to disable the mail modules that accept incoming mail without disabling the modules that sent outgoing mail. With NameHero, I use the InterWorx web hosting control panel, so when you log into your dashboard, you first see a list of VPS modules and the current enabled or disabled status. For my VPS, here is what I see:

Disable Dovecot and Mailman
Disable Dovecot and Mailman

You can see that I’ve disabled four main services:

  1. Dovecot
  2. Mailman
  3. Spam Filtering
  4. Virus Filtering

At the same time, I’ve kept the “Outbound Mail” and SMTP server modules. I find that this is sufficient to ignore all incoming mail and still receive VPS e-mails for things like backups and OS updates.

You Can Disable the MDA Module

MDA stands for “Message Delivery Agent”, and if you search for what it does, you might get the impression that you need it for outgoing mail. But you don’t. In the InterWorx dashboard, I’ve disabled the MDA module entirely:

Disable MDA Settings
Disable MDA Settings

This is nothing but Dovecot, which you can disable directly from the home screen as shown above.

That’s Fine – But Why Disable Virus Filtering? Isn’t that Dangerous?

You might not know that the “virus filtering” module in a VPS primarily deals with incoming message attachments. It’s not a traditional anti-virus that you run on your Windows PC at home. Instead, the most popular anti-virus software for Linux servers is called ClamAV, which uses a huge amount of memory – up to 40% of available memory on my VPS server with 2GB RAM.

ClamAV’s main purpose is to scan mail attachments for viruses. The threat vectors that make a desktop PC an attractive target don’t exist on a Linux VPS server. So if you disable all incoming mail functionality, then there’s no need for your to install an anti-virus software either. As a result, disabling the antivirus on Linux is safe.

Hardening the VPS Server is More Important

Instead of anti-virus, a server needs to be “hardened” by disabling root logins via SSH, configuring your firewall, changing the port, and much more. You can even disable logins via passwords and require SSH keys. The point is that, unlike a desktop PC, anti-virus isn’t much help for a Linux VPS and requires different precautions.

Ensure that your VPS Outgoing E-mails Aren’t Marked as Spam

If you haven’t already, make sure that you add SPF records to your domain nameservers so that you receive important notification emails from your servers. Otherwise, e-mail providers like Gmail and Outlook can mark them as spam – and you might not even notice until a few months later. It happened to me!

Use Cloudflare’s E-mail Routing for Free Incoming Mail Service

You can leverage Cloudflare’s free incoming mail routing service to forward e-mails to your Gmail, Outlook, or Yahoo e-mail provider for easy incoming mail handling. It works great, and I can create as many disposable e-mails as I want, and Cloudflare automatically filters out junk like spam. The best part is that you don’t have to worry about configuring a VPS server to receive your e-mail and deal with the hassle of scanning attachments and forwarding mail.

So take my advice and block incoming mail on your VPS. If you require full-fledged mail functionality, I suggest you outsource your e-mail needs to a 3rd party that knows what they’re doing.

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Connect With Us!

Superhero Resources

Fix Common Issues

  • How To Setup Free And Automatic SSL Certificates
  • How To Setup Cloudflare With Railgun
  • How To Fix Memory Exhausted Errors In WordPress
  • How To Edit PHP Version/Upload Limit/Add Extensions
  • How To Move/Migrate Your Business To Name Hero

Free Guides

  • How To Setup NameHero Hosting
  • How To Create A Web Hosting Business With WordPress
  • How To Start A WordPress Blog
  • How To Migrate WordPress To A VPS
  • How To Speed Test And Optimize Your WordPress Website
  • Magento 2.X Installation Guide
  • How To Clean Up A WordPress Hack

Training

Recent Posts

  • The Best WordPress Plugin To Combat Plagiarism
  • Is It Time to Bring Back Blog Comments?
  • Two Filters That No Longer Work In Gutenberg (And Workarounds)
  • Migrating To The New Cloudflare Managed Rules Interface
  • How To Sort Posts By The “Last Modified” Date
  • How To Make WordPress Send E-mail From Another Address
Subscribe in a reader
  • Web Hosting
  • WordPress Hosting
  • Reseller Hosting
  • VPS Hosting
  • Twitter
  • Facebook
  • LinkedIn
  • YouTube
  • FTC Disclosure
  • Earnings Disclosure
  • Privacy Policy

Copyright © 2023 · Smart Passive Income Pro on Genesis Framework · WordPress · Log in