The Handbook

    Theme
    • Guides
        • Check a system before installing FreeBSD
        • Orient a Linux administrator on FreeBSD
        • Supported FreeBSD releases
        • Choose a FreeBSD documentation and support channel
        • Move files safely without GNU mv -t
        • Update, upgrade, or update packages?
        • Upgrade 14.4 or 15.0 to FreeBSD 15.1
        • Choose packages, ports, or poudriere
        • Choose the quarterly or latest package branch
        • Choose a FreeBSD download or package mirror
        • Make a system setting persistent
        • Configure locale, keyboard, and time zone
        • Configure a serial console for recovery
        • Choose a custom kernel, module, or loader setting
        • Run a Linux binary with the compatibility layer
        • Check desktop and laptop hardware before installation
        • Choose and check a graphics driver
        • Choose Xorg or Wayland
        • Build a maintainable desktop baseline
        • Install and check a desktop browser
        • Check laptop Wi-Fi, power, and suspend
        • Check multimedia readiness
        • Choose and configure a printing stack
        • Run Windows applications with Wine
        • Snapshot and replicate a ZFS dataset
        • Choose a filesystem and storage layout
        • Operate ZFS without losing the recovery path
        • Restore files from a ZFS snapshot
        • Read ZFS pool health and run a scrub
        • Replace a failed device in a ZFS mirror
        • Replicate a ZFS dataset over SSH
        • Change PF safely on a remote host
        • Configure a narrow WireGuard tunnel
        • Plan a FreeBSD home server
        • Choose a mail server or an outgoing relay
        • Publish a network service safely
        • Choose a jail network model
        • Choose native jails or a jail manager
        • Choose a jail or a bhyve virtual machine
        • Establish a FreeBSD security baseline
        • Choose a MAC policy
        • Audit security-relevant activity
        • Start a DTrace performance investigation
    • Integrations
        • Create a first jail with Bastille
        • Compare jail managers and OCI tooling
        • Publish a Bastille service through PF
        • Mount a ZFS dataset in a Bastille jail
        • Update and upgrade Bastille jails
        • Back up and restore a Bastille jail
        • Prepare bhyve and vm-bhyve
        • Choose NFS or Samba for file sharing
        • Choose ZFS backup automation
        • Operate a signed poudriere repository
        • Manage FreeBSD configuration with Ansible or Salt
        • Run Motion with webcamd on FreeBSD
        • Design a reverse proxy, certificates, and monitoring
    • FAQ
      • Troubleshooting
          • Recover an interrupted freebsd-update run
          • Resolve a package repository or ABI mismatch
          • Diagnose the FreeBSD boot path
          • Recover with a ZFS boot environment
          • Diagnose DNS, routing, and firewall paths
          • Diagnose network mbuf exhaustion
          • Bind a service to a low port without running it as root
          • Diagnose audio output or input
          • Diagnose webcamd, cuse, and a webcam
          • Fix USB device permissions without opening every device
      • About this handbook
      • Synopsis
      • Choose the role
      • Establish identity and DNS first
      • Prefer a relay for host notifications
      • Treat public mail as a service stack
      • Protect local operational mail
      • Primary references

      Choose a mail server or an outgoing relay

      Last reviewed
      13 August 2026
      Applies to
      15.1-RELEASE, 15.0-RELEASE, 14.4-RELEASE

      Synopsis #

      Most application and home-server hosts need reliable outgoing notifications, not a complete public mail system. An authenticated relay reduces DNS, reputation, abuse, queue, filtering, and availability responsibilities. A public mail server is a continuing operational commitment involving more than installing an MTA.

      Select the smallest mail role that meets the requirement before configuring packages or opening port 25.

      Choose the role #

      RequirementSuitable roleMain responsibility
      Local cron and service messages onlyLocal deliveryForward root and operational aliases to a monitored mailbox.
      Application alerts to Internet recipientsAuthenticated outgoing relayProtect relay credentials and monitor the local queue.
      Receive mail for a public domainFull mail serviceDNS, TLS, spam and malware policy, authentication, storage, backups, abuse response, and reputation.
      Forward mail for other hostsRestricted relayExplicit client authorization; never an open relay.

      Do not expose SMTP merely to test that local programs can call mail(1).

      Establish identity and DNS first #

      For Internet delivery, record:

      • the host’s stable fully qualified domain name;
      • forward and reverse DNS ownership;
      • envelope and visible sender domains;
      • SPF, DKIM, and DMARC policy where applicable;
      • TLS certificate and renewal ownership;
      • provider restrictions on outbound port 25;
      • where bounces and abuse reports are read.

      An MTA cannot repair missing reverse DNS or a blocked provider network by configuration alone.

      Prefer a relay for host notifications #

      FreeBSD documents DMA for routing outgoing mail through a smarthost. Store authentication material with restrictive ownership and permissions, and use the provider’s current TLS and credential instructions rather than copying an example password format unchanged.

      After configuration, send a traceable test to a controlled recipient:

      $ printf '%s\n' 'mail relay test' | mail -v -s 'FreeBSD relay test' operator@example.net
      

      Then verify receipt, sender identity, TLS evidence available from the provider, and local queue state. A zero exit status does not prove final delivery.

      Treat public mail as a service stack #

      A receiving mail system generally needs:

      • an MTA with a closed relay policy;
      • authenticated message submission separate from server-to-server SMTP;
      • IMAP or another mailbox access boundary when users store mail;
      • spam and malware policy;
      • DKIM signing and DNS policy;
      • certificate renewal;
      • queue, disk, reputation, and abuse monitoring;
      • tested mailbox and configuration restoration.

      Separate these roles in the architecture even when one host provides several of them. Do not use a broad legacy mail chapter as a reason to publish an unmaintained copy-paste server recipe.

      Protect local operational mail #

      Review aliases so messages to root reach a mailbox that is actually monitored. Test after every mail transport change and release upgrade. Record queue inspection and failure commands for the selected MTA; command names are not portable between DMA, Postfix, OpenSMTPD, and other transports.

      Primary references #

      • FreeBSD Handbook: Electronic Mail
      • mail(1)
      • aliases(5)
      • dma(8)
      • dma(5)

      Independent documentation. Not affiliated with or endorsed by the FreeBSD Project or the FreeBSD Foundation.

      Report a bug
      • Synopsis
      • Choose the role
      • Establish identity and DNS first
      • Prefer a relay for host notifications
      • Treat public mail as a service stack
      • Protect local operational mail
      • Primary references