Score:-1

How to setup a Linux LAN local mail?

bq flag

I'm looking for instructions on how to create a Linux local mail server for a LAN, in the following way:

  • The Server (Ubuntu) as the SMTP server;

  • The workstations getting their mail (and sending to other clients) through the server.

Initially, only local mail (say ending with @localhost.com).

So far, I've found stuff about using the very client machine as the host, not including the server.

Thank you.

Score:1
cn flag

You should install a mail service such as Postfix (that's the one I use).

Then simply have people use that service using the IP address of that one computer.

If you really want each computer to be able to send mail, then look at installing a sendmail utility and set it up to send mail to the computer with Postfix (or other mail service).

The setup for Postfix needs to accept relaying the emails sent from another service. Since you have a local network (LAN), you can just put that IP as one of the trusted IP addresses in Postfix. Without that, it will reject the mail sent by sendmail.

Maybe something like this:

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/24

The 127. and ::1 are there by default. I added 10.0.0.0/24 as an example. Whatever you use for your network (another often used is 192.168.1.0/24).

Services that support SMTP directly can be given the IP address of your Postfix system instead of using sendmail.

Marcelo Tenorio de Souza avatar
bq flag
Thank you for your answer, Alexis. Yes, Postfix is needed. I'll read the docs, especially when it comes to mail storage (where and how to store mail) and how to create local mail addresses, only for internal use, and public ones.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.