This is kept as historical reference rather than a recommended approach. It documents a home-network setup from the CentOS/Fedora era: a low-traffic server forwarding all its mail to a desktop, instead of maintaining mailboxes on both. The underlying pattern (relay one LAN host's mail to another and read it there) is still occasionally useful. The commands are dated, so cross-check them against Troubleshooting and TLS Encryption rather than following them verbatim.
The scenario¶
There are two Linux machines on the same LAN:
- A server that receives mail addressed to it (system mail, cron output, a forwarded domain).
- A desktop where mail is actually read day to day.
Rather than logging in to the server to check mail, the server forwards everything to the desktop with a virtual alias map:
# server: /etc/postfix/main.cf
virtual_alias_maps = hash:/etc/postfix/virtual
# server: /etc/postfix/virtual
[email protected] [email protected]
@server.lan.example [email protected]
postmap /etc/postfix/virtual && postfix reload
On the desktop, Postfix must listen on the LAN (inet_interfaces = all), accept mail for its own name (mydestination includes desktop.lan.example), and the firewall must allow TCP/25 from the server.
Name resolution between the two came from /etc/hosts entries (or an internal DNS zone). Public DNS knows nothing about .lan.example names. See DNS and Mail Routing on split-horizon DNS.
Problems encountered¶
Both of the classic LAN errors in Troubleshooting came from exactly this setup:
No route to host: the desktop's firewall didn't allow inbound port 25 from the server.Connection refused: the desktop'sinet_interfaceswaslocalhost, so nothing on the LAN, including the server, could connect.
Reading local mail without IMAP¶
Mail delivered to a local mailbox file can be read directly by a mail client, with no IMAP server in between. This is "local delivery" in the terms of Mailbox Formats and Delivery.
- Terminal clients handle this natively:
mutt -f /var/spool/mail/$USER,mutt -f ~/Maildir, or plainmail. See the Mail Clients section. - Evolution offers a Local Delivery (mbox) or Maildir-format mail directories account type. Point it at the mailbox, set a check interval, and configure the outgoing side as SMTP to the local Postfix with no encryption needed for same-host submission.
Most GUI clients have since dropped local-mailbox account types and assume IMAP even for local mail. When you need GUI access, a minimal Dovecot listening only on 127.0.0.1 is now the easier path.
Why this isn't the recommended default today¶
For purely internal mail this is fine. But if either host also needs to send mail to the internet, sending directly from a residential IP runs into the reverse-DNS and reputation problems in DNS and Mail Routing. The robust setup is to use the smart-host pattern from Relaying Outbound Mail for anything leaving the LAN, alongside (not instead of) this kind of internal forwarding. Today a single relay host (or relay container) for the whole LAN, with every other machine as a null client or msmtp pointing at it, is simpler still.