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

NameHero Blog

Web Hosting Tips & Resources From NameHero

  • Hosting
    • Web Hosting
    • VPS Hosting
    • WordPress Hosting
    • WooCommerce Hosting
  • Reseller
  • Enterprise
  • Domains
  • Account
  • Blog Home
  • Categories

How To Disable Inbound Mail On A Managed VPS

Bhagwad Park

Published on: December 5, 2022

Categories: VPS Hosting 0

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

Follow & Subscribe

Exclusive promos, content and more!

Most Popular Posts

Speed up your site: solving the WordPress slowdown

NameHero’s Recommended WordPress Plugin and Theme Setup (2023)

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • Website Performance
  • Web Hosting
  • Resellers
  • Website Development
  • Website Security
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • Domains
Help & Support
  • NameHero Blog
  • Knowledgebase
  • Announcements
  • Affiliates
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2023 NameHero, LLC. All rights reserved.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA