noob needs help with mail on local lan

Hi, thanks for looking at this post :slight_smile:

I have some noob type questions about sending mail around on a local lan that does not have a registered domain name.

Goal:
I just want to be able to send and receive mail from any one of my 5 linux boxes – locally only. I would like to open the terminal on linux-80dc.cascade.net and type “mail lee2@linux-u5l1@cascade.net” and have the mail actually get delivered to the other computer. I do not want this mail to go out to my ISP, I already have mail clients that go out to the internet to send/receive mail so I do not need that at the moment.

What I have done:
I have set up a local DNS that seems to be functioning properly meaning I can ping all other computers via there host names linux-u5l1.
I have set up postfix and it seems to send mail to the other computers but there are various errors.

Questions:

  1. Can postfix do this all by itself or do I need or should I install and set up the LDAP and Cyrus or an SMTP server?

  2. Is postfix a server and client setup, meaning will I have to have one of the computers on 24/7 to get/receive mail or does the mail get held until the server computer comes online? (This question is for mail only not the DNS which I understand needs to be on 24/7)

  3. Would the answer to question #2 be the same if I need to use LDAP and Cyrus?

Hi
Sounds like you’re setting up mail for the first time, congrats.

First, you need to understand that the protocols are different for sending (smtp) and receiving(typically pop or imap although there are others).

Mail clients do not have functionality to accept a message sent directly to them(ie receive smtp), you need to set up a mailserver. If all you need is something simple in your LAN, YAST can set up a pop mailserver for you.

When you have designated one machine on your LAN to be your mailserver, point all your mail clients to it for both sending(assuming they have postfix or sendmail installed locally) and receiving, configured for pop if that is what you set up your mail server to be.

BTW - when you configure your LAN mail domain it should be different than your network domain and actually should be unique so your LAN mail doesn’t accidentally get routed to the Internet. You’ll also need to confire your LAN DNS with this domain and create an MX record.

HTH,
TSU

On 2013-03-20 16:06, anika200 wrote:
>
> Hi, thanks for looking at this post :slight_smile:
>
> I have some noob type questions about sending mail around on a local
> lan that does not have a registered domain name.

Ok.

>
> Goal:
> I just want to be able to send and receive mail from any one of my 5
> linux boxes – locally only. I would like to open the terminal on
> linux-80dc.cascade.net and type “mail lee2@linux-u5l1@cascade.net” and
> have the mail actually get delivered to the other computer. I do not
> want this mail to go out to my ISP, I already have mail clients that go
> out to the internet to send/receive mail so I do not need that at the
> moment.

Change goal: do not even try to sent to @cascade.net, because it happens
that host does exist on internet. Any other name that you may invent
ending in .com, .net, .org, etc: forget them. They may eventually come
to exist.

You have to invent a local domain that has no chance of existing in
internet, like for example: machine.lnet⁽š⁞. And you have to setup a
DNS server locally that solves those names internally (it can also solve
internet names, no problem).

(1). Do not ever use .local as domain name if you ever intend to use a
Windows Server (AD).

>
>
> What I have done:
> I have set up a local DNS that seems to be functioning properly meaning
> I can ping all other computers via there host names linux-u5l1.
> I have set up postfix and it seems to send mail to the other computers
> but there are various errors.
>
> Questions:
>
> 1) Can postfix do this all by itself or do I need or should I install
> and set up the LDAP and Cyrus or an SMTP server?

postifx is an SMTP server. LDAP is not needed unless your needs grow.

You can add cyrus or dovecot later if you wish: postfix has to deliver
the emails somewhere, which by default is a file in Linux. Your clients
will need an account in Linux to read that. If you want them to be able
to read those from, say, outlook on their computers, then yes, you need
a pop/imap server.

> 2) Is postfix a server and client setup, meaning will I have to have
> one of the computers on 24/7 to get/receive mail or does the mail get
> held until the server computer comes online? (This question is for mail
> only not the DNS which I understand needs to be on 24/7)

Postfix is just an SMTP server, and it has to be up full time if you
want to be able to send mail all time, of course. If an employee tries
to send a local email to you and the SMTP server is not up, thunderbird
will say that it failed.

If it is another SMTP server which is trying to send to you and you are
not up, it will keep trying for 5 days or so; thus you can power off the
server in that case. It is up to the sending service.

> 3) Would the answer to question #2 be the same if I need to use LDAP
> and Cyrus?

Of course.

–
Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Ok, I understand and I can change the domain name.

However, as far as my knowledge takes me it is possible to setup a local DNS server that only reaches out to the internet (forward dns) after it can not find a local host. Supposedly this is what I have already done but I lack the knowledge to test the situation.

Do you have a suggestion for a method to see if my DNS is locally contained when it receives a xxxxx.cascade.net request?

Thanks for your time

This is such a great reply, thank you.
There are all kinds of HowTo on the internet but they often leave out the basics. I find your post the most informative after many days of searching the topic.

I am still confused about the receiving server, so postfix is a smtp server and mail is going out. Lets assume it all goes well though the firewall etc…

What program or protocol am I using when I type “mail” at the command prompt in Kterminal? Is it a pop client called mail?

On 2013-03-20 18:46, anika200 wrote:

> Ok, I understand and I can change the domain name.
>
> However, as far as my knowledge takes me it is possible to setup a
> local DNS server that only reaches out to the internet (forward dns)
> after it can not find a local host. Supposedly this is what I have
> already done but I lack the knowledge to test the situation.
>
> Do you have a suggestion for a method to see if my DNS is locally
> contained when it receives a xxxxx.cascade.net request?

No…

And it is not advisable. It may work for some time, then the cascade.net
network changes and you are busted. Or it may work with quircks,
difficult to diagnose.

Don’t risk it.

Another method. Assume you work on the something.com company (huh, as a
matter of fact, that domain does exist, too). A trick is to name the
local machines inside as “machine.something” without the “.com” at the
end. The names can only be solved internally, so internal only machines
can be solved on the internal DNS with little problems.

–
Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 2013-03-20 18:56, anika200 wrote:
> This is such a great reply, thank you.
> There are all kinds of HowTo on the internet but they often leave out
> the basics. I find your post the most informative after many days of
> searching the topic.

There are some mail howtos at the LDP you should read. Some of them from
the administrator point of view.

> I am still confused about the receiving server, so postfix is a smtp
> server and mail is going out. Lets assume it all goes well though the
> firewall etc…
>
> What program or protocol am I using when I type “mail” at the command
> prompt in Kterminal? Is it a pop client called mail?

Two.

It communicates with an smtp server to send and a pop/imap server to
receive.

:slight_smile:

Ah, a note: smtp servers send and receive mail. From hop to hop. At the
ending hop, that email is stored somewhere, like a pop server.

–
Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Thank you, this is good information.

So I could use “cascade” as the domain internally as opposed to cascade.net, that would be fine or even better for me.
This is a little confusing though as most tutorials always have example.com on all the settings. I can just use “cascade” where the howto tells you to put “cascade.xxx”?

Come on Anika :smiley: : Noobs don’t know what their hostname is, let alone DNS.

On 2013-03-20 19:46, anika200 wrote:

> Thank you, this is good information.
>
> So I could use “cascade” as the domain internally as opposed to
> cascade.net, that would be fine or even better for me.
> This is a little confusing though as most tutorials always have
> example.com on all the settings. I can just use “cascade” where the
> howto tells you to put “cascade.xxx”?

Yes, that’s the idea. When you put “cascade” you are referring to the
internal network (no Internet DNS will resolve it) and “cascade.com”
will be the Internet address. Or “example” and “example.com”, same thing.

I think that the name “example” is actually a reserved domain name for
writing examples in books. Right, search “example.com” in the wikipedia :slight_smile:

–
Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

hahaha, yeah they do. They just do not know when they are being used for a public relay…:stuck_out_tongue:

Comments on earlier topics in this thread…

I doubt “.local” is a problem with any AD. In fact for many, many years MS recommended it as the default naming convention. IIRC “.local” can be a problem for some zero administration tools, including some popular for Linux.

Although a mail domain without a suffix might work, I wouldn’t recommend it. Various mail clients and other apps will often use error correction for mail address fields requiring a standard Internet Fully Qualified Domain(FQDN). So avoid that problem by using only FQDN but use a non-routable suffix(something not used on the Public Internet), eg foo.bar and just foo

If your LAN DNS is setup as a Forwarding DNS which will first check local records and then only if the Hostname is not found then forward to a Public DNS, that should work just fine. I highly doubt any ISP will care that the machine is providing <private> name resolution, that’s not the same as setting up a server facing the Internet. In any case, if your DNS is multi-homed, it should be bound to your internal NIC so should not respond to external queries. Or, if single-homed can be placed in a firewall DMZ to block external queries.

HTH,
TSU

On 2013-03-21 09:06, tsu2 wrote:
>
> Comments on earlier topics in this thread…
>
> I doubt “.local” is a problem with any AD. In fact for many, many years
> MS recommended it as the default naming convention. IIRC “.local” can be
> a problem for some zero administration tools, including some popular for
> Linux.

It is a verified problem, I can point you to bugzillas on it. Not MS
fault, it is Linux side fault. Zeroconf to be exact, and by default it
is activated.

> Although a mail domain without a suffix might work, I wouldn’t
> recommend it. Various mail clients and other apps will often use error
> correction for mail address fields requiring a standard Internet Fully
> Qualified Domain(FQDN). So avoid that problem by using only FQDN but use
> a non-routable suffix(something not used on the Public Internet), eg
> foo.bar and just foo

That’s why I like to use .lnet. But none at all can also work: my
current one is “valinor”, no suffix. No problems in a decade :slight_smile:

–
Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)