Skip to main content
How to Run a VPS Email Server Like a Pro - Virtarix Blog

VPS Email Server Maintenance: Security and Delivery Checks

February 5, 2025 · Blog / Technical Guides

An email server needs regular checks after the first successful delivery. Queues can grow, certificates can expire, and a compromised account can damage the reputation of an otherwise well-maintained host. A useful maintenance routine covers both security and whether messages reach their intended recipients.

Start with the hosting arrangement, then review access, authentication, delivery logs and recovery. Keep a record of changes so a new problem can be traced back to a configuration update, deployment or sending pattern.

Confirm the host permits the workload

Check the provider's mail-use policy before installing or moving a mail server. Open ports alone do not establish permission to run the workload. The Virtarix port 25 policy explains the restrictions that apply on this platform; alternative ports or a relay do not override a provider's workload policy.

For direct Internet mail delivery, servers communicate over TCP port 25. Ports 587 and 465 are used for authenticated message submission, typically from a client to its mail service. They are not interchangeable replacements for delivery to another domain's MX server.

On a host that permits mail use, confirm stable addressing, reverse-DNS control, inbound and outbound connectivity, and the support process for address-reputation problems. A dedicated IP gives you an address to manage; it does not guarantee inbox placement or freedom from blocklists.

Assess availability and capacity against the service you need. Include maintenance windows, recovery time, storage growth and network quality rather than choosing from an arbitrary uptime threshold. Verify how resource changes work and whether they require downtime.

Review access and authentication

Keep the operating system, mail transfer agent and mailbox services on supported releases. Postfix and Exim are established MTA options, but their security depends on configuration and maintenance. Limit administrative access and use separate credentials for users and automation.

Check these controls after relevant changes:

  • SPF includes the legitimate senders for the domain.
  • DKIM signing works and its public key is available in DNS.
  • DMARC alignment and reports reflect the actual sending services.
  • Forward and reverse DNS agree with the intended mail hostname.
  • Authenticated submission requires encryption and valid credentials.
  • Unauthenticated clients cannot relay messages between unrelated domains.

SPF, DKIM and DMARC help receivers assess sender identity. They do not guarantee acceptance or stop every form of impersonation. Review failures before enforcing a stricter DMARC policy so legitimate senders are not rejected accidentally.

Monitor certificate expiry and renewal for each service. Client submission and server-to-server SMTP have different TLS compatibility requirements. Use supported secure settings and test the affected paths after changing them.

Limit abuse without blocking legitimate mail

Restrict unnecessary listeners with firewall rules and protect administrative interfaces. Fail2Ban can reduce repeated login attempts when its jail recognises the correct service logs and client addresses. Check false positives, especially behind proxies or shared networks.

Postgrey performs greylisting: it temporarily defers unfamiliar senders and expects compliant sending servers to retry. It is not a substitute for login protection, and the delay can matter for time-sensitive messages. Decide whether that trade-off fits your users.

Use filtering tools such as Rspamd or SpamAssassin with rules appropriate to the mail flow. Review false positives and quarantine access. Outbound rate limits also matter: a compromised mailbox can send abuse even when the server is not an open relay.

Investigate delivery from the queue and logs

Look at both queue size and message age. A small queue containing old messages can be more significant than a brief surge that drains normally. For a directly installed MTA, inspect its queue with the command that matches the service:

Inspect the Postfix mail queue
postqueue -p
Inspect the Exim mail queue
exim -bp

For a containerised stack, run the command in its documented MTA container. Review sender and recipient details privately because queue output can contain personal information.

Read the delivery response for affected messages. Distinguish DNS failures, connection errors, temporary deferrals, authentication failures and permanent recipient rejections. Fix the underlying cause before forcing retries or changing sending limits. Do not delete queued mail merely to clear an alert.

Check relevant blocklists and provider delivery reports when logs indicate a reputation problem. Tools such as MXToolbox can assist discovery, but receiving systems make their own delivery decisions. Reverse DNS is one prerequisite; it does not prevent an address from being listed.

For legitimate sending from a new address, use expected, consent-based traffic and monitor the response as volume grows. There is no universal warm-up schedule that guarantees delivery. Avoid sudden unexplained volume increases, and honour recipient opt-outs and applicable sending requirements.

Maintain storage, backups and recovery

Monitor free space, mailbox quotas, queue growth, CPU, memory and storage latency. Leave room for temporary files, indexes, logs and maintenance. An alert should arrive before a full filesystem interrupts delivery.

Schedule backups of mailbox data, configuration and any databases or keys required for restoration. Check that jobs finish and keep independent recovery copies. Test a restore in isolation, including mailbox access and message integrity; a completed backup job alone does not prove recovery works.

Send critical alerts to a channel outside this mail server. Logwatch or a central logging system can help review events, but someone still needs to investigate failures and unusual sending activity.

Review privacy, retention and security requirements for the organisation's actual use. GDPR or HIPAA obligations depend on the relevant jurisdiction, data and relationships; installing a mail stack does not establish compliance. Protect logs and backups as well as live mailboxes.

Make each maintenance change verifiable

Before an update, retain a usable backup and a record of the configuration. Afterwards, test external receipt and delivery, authenticated submission, mailbox access and certificate status. Check the queue again and confirm that monitoring still reports failures.

Assign an owner to delivery incidents, abuse reports, updates and recovery. The goal is a mail service whose failures can be detected and resolved, with evidence that its essential paths still work.

Peter French
About the Author Peter French is the Managing Director at Virtarix, with over 17 years in the tech industry. He has co-founded a cloud storage business, led strategy at a global cloud computing leader, and driven market growth in cybersecurity and data protection.