Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A reliable VPS mail server is a chain of three services: Exim4 accepts and transfers SMTP mail, Dovecot provides IMAP or POP3 access to stored messages, and ClamAV scans message content for malware. Build the chain in that order, give the VPS a correct fully qualified domain name (FQDN), protect every authenticated SMTP session with TLS, and test locally before trusting the server with production mail.

This guide uses Debian or Ubuntu conventions and shows a maintainable split Exim configuration, Dovecot mailbox access, and an Exim-to-clamd virus-scanning policy. Package names and paths can vary slightly by supported release, so read the generated configuration and service status after each change.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What each service does

Mail delivery is not one operation. A mail user agent (for example, a desktop or mobile mail app) submits a message to a mail transfer agent (MTA). The MTA transfers it to another MTA or to a local delivery agent, which writes it to a mailbox. The recipient’s mail app then retrieves it through IMAP or POP3.

Component Role in this setup What it does not provide
Exim4 SMTP submission, reception, routing and transfer It is not the mailbox-reading service for users.
Dovecot IMAP and POP3 access to messages stored by the delivery system It does not replace Exim as the SMTP transfer agent.
ClamAV Scans message content for malware through the clamd daemon It is not a spam-filtering, reputation or deliverability system.

Keeping these boundaries clear makes troubleshooting easier. An SMTP connection problem belongs first to Exim and the firewall; a mailbox-login problem belongs to Dovecot; a virus rejection problem belongs to the ClamAV socket, permissions and Exim ACL.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Prepare the VPS before installing mail software

Use a supported operating system and stable hostname

Start with a supported Debian or Ubuntu release and a VPS provider that permits mail traffic. Some providers block outbound SMTP, especially TCP port 25, until you request an exception. Confirm that policy before spending time on configuration.

Choose a permanent host name such as mail.example.net and set it as the system’s FQDN. The name used by Exim for TLS must match the system FQDN; Ubuntu’s Exim documentation warns that the “Server name” setting is the most important value because TLS will not work correctly when it is wrong. Use the same public name when obtaining the production certificate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan the mail domain and DNS

Decide which domain the server will handle, for example example.net, and which host will receive its mail, such as mail.example.net. Create an address record for the host and an MX record for the mail domain that points to that host. Also plan reverse DNS (PTR) with the VPS provider. Forward and reverse names that agree are important for reputation, but they are not configured by Exim or Dovecot themselves.

Before opening the service to users, publish and verify the domain’s sender-authentication records (SPF, DKIM and DMARC) according to your chosen signing and policy design. The procedures below validate local service wiring; they do not prove that remote providers will accept your mail or that your DNS policy is correct.

Decide how mail will leave the VPS

Routing model Control Operational burden When it fits
Direct delivery from Exim Maximum control over SMTP routing and queueing You manage reverse DNS, reputation, rate limits, TLS policy and remote-provider blocks. Teams prepared to operate internet-facing mail infrastructure.
Smarthost relay The relay provider handles onward delivery and much of its reputation You depend on that provider’s credentials, limits and availability. Small deployments that want simpler outbound delivery.

The Ubuntu and Debian configuration mechanisms do not select a universal choice. Make this decision before the Exim wizard so its system-wide routing mode matches your plan.

Install and configure Exim4

Install the package and choose a configuration layout

  1. Refresh package metadata and install Exim4 with your distribution’s package manager. On Debian or Ubuntu this is typically sudo apt update followed by sudo apt install exim4.
  2. Run sudo dpkg-reconfigure exim4-config to launch the Debian configuration wizard.
  3. Choose split configuration if you want modular files under /etc/exim4/conf.d. Choose the single-template layout if you deliberately prefer one generated template. Split files are easier to isolate and maintain as the ACL and transport rules grow; a single template can be simpler for a very small, tightly controlled installation.
  4. Enter the system mail name, the FQDN and the domains for which this server accepts mail. Select direct delivery or smarthost behavior to match the routing decision above.
  5. Start Exim with sudo service exim4 start if the service is not already running.

Do not edit generated files blindly. The wizard writes the base values, and later changes should be made in the appropriate source file before regenerating the active configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Enable authenticated SMTP

Submission clients need authentication so an internet-facing server cannot be used as an open relay. Exim can authenticate through PAM-backed saslauthd or through an Exim password database. Select one method and document where its credentials come from.

Both methods can expose clear-text passwords on the wire if a client connects without TLS. Treat authentication and encryption as one requirement: do not permit users to submit credentials over an unencrypted connection. Configure the client submission service to require TLS, then test an authenticated login only after the certificate and protocol settings are working.

Configure Exim TLS

  1. Install a certificate whose subject name covers the mail FQDN. A self-signed certificate is useful for initial wiring tests, but production clients and remote MTAs should receive a certificate issued by a trusted authority.
  2. Set the Exim TLS option MAIN_TLS_ENABLE = yes in the appropriate configuration source.
  3. Ensure the certificate and private-key paths are readable by the Exim process while the private key remains protected from unprivileged users.
  4. Regenerate the active configuration with sudo update-exim4.conf.
  5. Restart Exim and inspect its service status and logs before testing a client connection.

The certificate name and Exim’s “Server name” must agree with the FQDN. A mismatch commonly appears as a client certificate warning or a failed TLS negotiation even though the SMTP port is reachable.

Install Dovecot for mailbox access

Install IMAP and POP3 support

  1. Install the protocol packages: sudo apt install dovecot-imapd dovecot-pop3d.
  2. Review /etc/dovecot/dovecot.conf and the files in /etc/dovecot/conf.d/ rather than assuming the package defaults match your mailbox design.
  3. Choose either mbox or Maildir deliberately. The delivery format selected in Exim must be the same format Dovecot reads.
  4. Restart Dovecot after changing its configuration.

Choose mbox or Maildir

Format Mailbox layout Operational implication
mbox Messages are stored together in a mailbox file. File locking and large-file handling become important as the mailbox grows. Select it only when your delivery and backup procedures are designed for that layout.
Maildir Messages are stored as individual files in a directory tree. Per-message files can simplify incremental handling and some recovery tasks, but backups and file-count limits must be planned.

Neither format is universally best. The critical requirement is consistency: Exim’s local delivery transport, Dovecot’s mail location and your backup procedure must all describe the same layout.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the documented client ports

Ubuntu Server documentation lists these Dovecot ports (2026):

Protocol Port Encryption model
IMAP 143 Plain protocol port; use it only with a TLS upgrade policy such as STARTTLS.
IMAPS 993 TLS-wrapped IMAP from the first byte.
POP3 110 Plain protocol port; use it only with a TLS upgrade policy such as STARTTLS.
POP3S 995 TLS-wrapped POP3 from the first byte.

Ubuntu states that “IMAPS and POP3S are more secure because they use SSL encryption to connect.” For new clients, prefer the TLS-wrapped ports unless you have a specific reason to use STARTTLS on 143 or 110. Open only the ports you actually operate in the VPS firewall.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Configure Dovecot TLS

  1. Open Dovecot’s SSL settings, normally in /etc/dovecot/conf.d/10-ssl.conf.
  2. Point the certificate and private-key settings at the trusted certificate for the mail FQDN.
  3. Set a policy that prevents password authentication from being accepted on an unencrypted connection. The exact directive names depend on the supported Dovecot release, so validate the generated configuration rather than copying a setting meant for another version.
  4. Restart Dovecot and test both a successful TLS connection and a deliberately rejected insecure login.

Certificate renewal is part of operations. Replace the certificate before expiry, reload or restart Dovecot and Exim as required, and verify that clients see the renewed name and chain.

Add ClamAV malware scanning

Install the scanner and signature updater

  1. Install the scanner, daemon and updater packages: sudo apt install clamav clamav-daemon clamav-freshclam.
  2. Keep the signature database current with clamav-freshclam. Debian documentation identifies this component as the database updater and clamav-daemon as the scanning daemon.
  3. Start or restart the daemon after installation and confirm that its Unix socket exists.

ClamAV scanning adds content inspection to the SMTP path. It does not replace authentication, TLS, spam controls, backups or a policy for handling false positives.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Connect Exim to clamd

On a split Exim configuration, set the scanner endpoint to:

av_scanner = clamd:/var/run/clamav/clamd.ctl

Then add a DATA ACL that rejects a message when Exim’s malware result is nonempty. The important behavior is the condition, not a particular rejection sentence: a message identified by ClamAV should be refused during SMTP processing rather than silently delivered.

  1. Place the scanner setting in the appropriate split configuration file.
  2. Add the malware check to the DATA ACL, using a rule equivalent to “reject when malware = *”.
  3. Add the clamav user to the Debian-exim group so the scanner can access the Exim spool as required by the integration.
  4. Restart clamav-daemon, regenerate the Exim configuration with sudo update-exim4.conf, and restart Exim.
  5. Check both services’ logs for socket, permission or protocol errors.

The socket path, ACL and permissions are a single dependency chain. A correct ACL cannot scan anything if clamd is stopped; a running daemon cannot scan if Exim cannot reach /var/run/clamav/clamd.ctl; and a reachable socket still fails when the service account lacks the required spool access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Firewall and service exposure

Permit only the traffic your design needs. A typical direct-delivery server needs SMTP on TCP 25 for MTA-to-MTA transfer, an authenticated submission service for users, and the selected Dovecot ports. If you expose both encrypted and plaintext protocol ports, enforce STARTTLS and authentication rules on the plaintext ports rather than treating a firewall opening as encryption.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
  • SMTP transfer: TCP 25.
  • IMAP: TCP 143, normally with a TLS-upgrade policy.
  • IMAPS: TCP 993.
  • POP3: TCP 110, normally with a TLS-upgrade policy.
  • POP3S: TCP 995.

The exact authenticated-submission port is determined by your Exim configuration and client policy; do not advertise a port you have not configured and tested. Restrict administrative access, keep package updates current and monitor disk space, queue growth, certificate expiry and service restarts.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Validate the complete chain

Check service state and generated configuration

  1. After every restart, inspect Exim, Dovecot and ClamAV service status.
  2. Regenerate Exim’s configuration after editing source files and verify that the active configuration contains the TLS and scanner settings.
  3. Confirm that the Dovecot certificate paths exist and that the private keys have restrictive permissions.
  4. Confirm that the ClamAV socket exists at /var/run/clamav/clamd.ctl and that the service accounts have the required access.
  5. Watch logs while performing each protocol test so a failed client action can be matched to a server-side error.

Test POP3 locally

Ubuntu’s Dovecot guide demonstrates a localhost protocol check with Telnet. Connect to the POP3 listener on port 110 and expect a greeting such as +OK Dovecot ready. This confirms that Dovecot is listening and speaking POP3; it does not prove that TLS, authentication or external firewall rules are correct.

Repeat the check against the TLS-wrapped service with a TLS-capable client, and test an actual mailbox login using a non-production account. Verify that a message delivered by Exim appears in the mailbox format Dovecot is configured to read.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test SMTP submission and delivery

From a controlled client, establish TLS, authenticate, submit a message and confirm that Exim queues or delivers it according to your routing mode. Test a local recipient first. For direct delivery, then test a recipient at an external provider and inspect the remote response, headers and any bounce. A successful local submission does not establish internet-wide deliverability.

Run the EICAR antivirus test

The Exim/ClamAV integration guidance recommends sending the standard EICAR test string as an attachment or message body from a controlled test account. A correctly wired server should reject it immediately during SMTP processing. Remove the test message and confirm that ordinary, non-test mail still passes.

This test validates scanner wiring and the ACL decision. It does not measure detection of every malware family, spam performance or remote-provider acceptance.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Troubleshoot by symptom

Clients cannot establish TLS

  • Verify that the certificate name matches the system FQDN and the hostname users enter.
  • Check that Exim has MAIN_TLS_ENABLE = yes and that the generated configuration was rebuilt.
  • For Dovecot, verify the paths in 10-ssl.conf, certificate readability and a completed service restart.
  • Check the VPS clock; an incorrect clock can make an otherwise valid certificate appear invalid.

Authentication fails or credentials appear exposed

  • Confirm that the selected PAM or Exim password-database method is enabled and points to the intended account source.
  • Do not troubleshoot credentials by disabling TLS. Authentication methods can use clear-text passwords unless TLS protects the connection.
  • Test with a dedicated account and rotate it after troubleshooting.

Dovecot accepts a connection but shows no mail

  • Compare Exim’s local delivery format with Dovecot’s mbox or Maildir setting.
  • Check mailbox ownership and permissions for the user account.
  • Inspect Exim’s delivery log to determine whether the message was delivered, deferred or routed elsewhere.

ClamAV scanning is bypassed or every message fails

  • Confirm that clamd is running and that the socket path exactly matches av_scanner = clamd:/var/run/clamav/clamd.ctl.
  • Check that the clamav user belongs to the Debian-exim group and that group membership took effect for the running processes.
  • Verify the DATA ACL condition that rejects malware = *.
  • Restart clamav-daemon and Exim after correcting permissions or configuration, then repeat the EICAR test.

Local delivery works but remote mail is rejected

Local protocol tests cannot prove reverse-DNS reputation, SPF, DKIM, DMARC correctness, provider-specific rate limits or acceptance by remote providers. Check the VPS provider’s SMTP policy, PTR record, sender-authentication records, certificate identity, queue and bounce message. If operating a smarthost, verify its credentials and account limits instead of assuming that direct-delivery diagnostics apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Operational choices that affect maintenance

Split versus single Exim configuration

Split configuration keeps routers, transports, ACLs and authentication fragments in separate files under /etc/exim4/conf.d. That structure is easier to review and change incrementally, especially when adding the ClamAV DATA ACL. A single template can reduce file navigation for a minimal installation. Whichever layout you choose, make source edits, run update-exim4.conf and restart deliberately so the running daemon matches the files you reviewed.

IMAP versus POP3 for users

IMAP keeps message state on the server and is generally the better fit for multiple devices, folders and synchronized read status. POP3 is a simpler retrieval model and can be appropriate for a single-device workflow, but users must understand download and deletion behavior. Dovecot can provide both; expose only the protocol ports you intend to support.

Direct delivery versus a smarthost

Direct delivery gives Exim control over remote SMTP conversations but makes you responsible for reputation, reverse DNS, TLS interoperability, queue management and block-list remediation. A smarthost reduces those responsibilities but introduces provider dependence and may impose recipient, volume or authentication limits. Neither route removes the need for local TLS, mailbox security and malware scanning.

Production checklist

  • Supported Debian or Ubuntu release with a stable FQDN.
  • Provider approval for required mail traffic.
  • Forward DNS, MX and provider-managed reverse DNS planned and verified.
  • Exim routing mode selected and generated configuration reviewed.
  • Authenticated SMTP enabled and protected by TLS.
  • Trusted certificate name matching the mail FQDN installed for Exim and Dovecot.
  • Dovecot mailbox format aligned with Exim delivery.
  • Only intended IMAP, POP3 and SMTP ports exposed.
  • ClamAV signatures updating, clamd reachable and the malware DATA ACL active.
  • Local POP3 or IMAP, authenticated SMTP and EICAR rejection tests recorded.
  • Backups, disk monitoring, queue monitoring, certificate renewal and log review assigned to an operator.

Passing this checklist means the three services are wired together and behaving as configured. It still does not guarantee delivery to every external mailbox; that requires ongoing DNS, reputation and provider-response management.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.