Koozali.org: home of the SME Server

Local Domains and smtp

Offline oegeeks

  • 18
  • +0/-0
Local Domains and smtp
« on: August 22, 2017, 03:39:41 PM »
SME-Server 9.2
Domain mydomain.local
At "hostname and DNS" in the gut a mail-archive-server is listet as piler.mydomain.local, eg. 192.168.100.222
If i send mail trough the SME-Server, to an email on this server, no email is send.
DNS-Server is local.

What did i miss?
Best regards
Andreas

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Local Domains and smtp
« Reply #1 on: August 23, 2017, 12:37:22 AM »
SME-Server 9.2
Domain mydomain.local
At "hostname and DNS" in the gut a mail-archive-server is listet as piler.mydomain.local, eg. 192.168.100.222
If i send mail trough the SME-Server, to an email on this server, no email is send.
DNS-Server is local.

What did i miss?
Best regards
Andreas

It is bad policy to name server/domain in the form mydomain.local &/or piler.mydomain.local

You should use mydomain.com or piler.mydomain.com ie the real externally resolvable domain URL for your domain.
That way when mail is sent from your server, external mail servers can validate against the sending server for your "real" domain name, whereas they cannot validate mydomain.local or piler.mydomain.local (as it is a non resolvable URL on the Internet).

The setting for
DNS-Server is local
just allows that mydomain.local to resolve locally, but it will still NOT resolve externally (publicly).

You can safely change the server domain name in the admin console (log in at command line as admin, then select Configure this server).

As well you will need to have external DNS records published that point mydomain.com and pilar.mydomain.com to your sme server static IP.

Obviously replace mydomain.com with your real URL.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline oegeeks

  • 18
  • +0/-0
Re: Local Domains and smtp
« Reply #2 on: August 23, 2017, 07:48:24 AM »
Hi Janet,
thanks for your reply. Maybe i did not clarify the problem correctly.

I do not want the mail-archive be visible from the outside. All local mail should be routed only locally. All domains end in .local and this is wanted. I fetch mails from the internet via get mail. After that, all emails are only handled inside the local network. So i do not want the servers be reachable from the outside.

I just want SME-Server send the mail locally to a local Server.
Any further hints?

Best regards
Andreas

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Local Domains and smtp
« Reply #3 on: August 23, 2017, 09:17:51 AM »
oegeeks/Andreas

Is that IP ie
piler.mydomain.local, eg. 192.168.100.222
on the same LAN IP range as your main sme server ?
What is the LAN IP for mydomain.local ?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Local Domains and smtp
« Reply #4 on: August 23, 2017, 09:43:16 AM »
SME-Server 9.2
Domain mydomain.local
At "hostname and DNS" in the gut a mail-archive-server is listet as piler.mydomain.local, eg. 192.168.100.222
If i send mail trough the SME-Server, to an email on this server, no email is send.
DNS-Server is local.

What did i miss?
Best regards
Andreas

IIUC, you've 2 servers on the same lan and with the same domain.. and you're trying to send an email from (let's say) sme.mydomain.local to piler.mydomain.local, right?

if so, and IMO, you've to create a domain in sme like piler.mydomain.local and follow this FAQ:
https://wiki.contribs.org/SME_Server:Documentation:FAQ:Section04#Deliver_email_for_one_domain_to_an_internal_or_external_mail_server

if not, please give us as may details as you can about your setup, thank you

Offline oegeeks

  • 18
  • +0/-0
Re: Local Domains and smtp
« Reply #5 on: August 23, 2017, 11:08:33 AM »
Hi Stefano,
you are right. I have this kind of local setup.
I followed the instructions you provided, but some strange thing is going on.
The local piler.mydomain.local has an ip x.x.x.228. This ip is in the Hostname and Adresses section.
Also the db domains setprop test.com MailServer a.b.c.d with a.b.c.d as x.x.x.228.

But if i ping piler.mydomain.local i get the ip address of the SME-Server, which has also the domain mydomain.local.

Do i miss something else?
Best regards
Andreas

Offline oegeeks

  • 18
  • +0/-0
Re: Local Domains and smtp
« Reply #6 on: August 23, 2017, 11:10:00 AM »
I forgot to mention:

all entries made by hand regarding piler.mydomain.local have the form x.x.x.228 and not of the server, which is x.x.x.221.

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Local Domains and smtp
« Reply #7 on: August 23, 2017, 11:16:42 AM »
remove piler.mydomain.local from hostname and addresses list

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Local Domains and smtp
« Reply #8 on: August 23, 2017, 11:17:50 AM »
all the emails must be sent to account@piler.mydomain.local (which likely is not what you want I guess)

Offline oegeeks

  • 18
  • +0/-0
Re: Local Domains and smtp
« Reply #9 on: August 23, 2017, 12:02:55 PM »
all the emails must be sent to account@piler.mydomain.local (which likely is not what you want I guess)

In fact, piler is a mail-Archive system. I configured all mail-users so every mail that gets processed will be copied to archive@piler.mydomain.local.

But only copies not the original. But at the moment, no email reaches archives@piler.mydomain.local.

But thanks for all the very useful hints.
Andreas


Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Local Domains and smtp
« Reply #10 on: August 23, 2017, 12:22:53 PM »
Andreas

Did you delete the entry for pilar.mydomain.local from Hostnames & addresses panel ?
If not, then do so.
Then the commands you should issue are:

db domains setprop pilar.mydomain.local MailServer 192.168.100.228
signal-event email-update

Please check that the archive server is configured to receive mail & test it by manually sending an email from your main server using Webmail.

Was this functionality working previously ?
How is the archive server configured, server only mode ?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline oegeeks

  • 18
  • +0/-0
Re: Local Domains and smtp
« Reply #11 on: August 23, 2017, 12:47:29 PM »
Was this functionality working previously ?
How is the archive server configured, server only mode ?

Hi Stefano,
it was not working previously. The server is not a typical mailserver, but an email-archiv system, see http://www.mailpiler.org. So it just should receive emails on one email-adress: archive@piler.mydomain.local.

I deleted the Hostname-Entry, but there is still a reminiscent:
Aktuelle Liste der Hostnamen für piler.mydomain.local.
Hostname   IP-Adresse    Ethernet-Adresse   
sbs.piler.mydomain.local   Self   x.x.x.221   

If i ping piler.mydomain.com, it still gives x.x.x.221   

I could not test the automatic settings yet, because no new email arrived now. But the manual setting seems to work. Hopefully the problem is solved now.

Thanks for all the helpful response.
regards
Andreas       

Offline Drifting

  • ****
  • 431
  • +0/-0
Re: Local Domains and smtp
« Reply #12 on: October 11, 2017, 02:15:26 PM »
Wondered if you managed to get this going? I am in the same position as you, virtually to the letter, with a domain ending in .local

Regards Paul.
Infamy, Infamy, they all have it in for me!

Offline oegeeks

  • 18
  • +0/-0
Re: Local Domains and smtp
« Reply #13 on: October 11, 2017, 07:49:46 PM »
Wondered if you managed to get this going? I am in the same position as you, virtually to the letter, with a domain ending in .local

Regards Paul.

Hi Paul,
unfortunately i did not have the time to look into the problem deeper. As so far, no mail is sent automatically. Piler archives manually sent emails via a mail client, but not from smeserver. So i think it is a smeserver problem.

Maybe some guru could shed a light, when we provide appropriate information. To the gurus: Please tell us which info you need.
Best regards
Andreas

Offline Drifting

  • ****
  • 431
  • +0/-0
Re: Local Domains and smtp
« Reply #14 on: October 13, 2017, 12:08:31 PM »
I am hardly the most proficient with SME, but this problem we are having is well and truly beyond me.

I have followed the instructions, and removed the host as suggested, but I seem to be getting a bounce from the ISP's mail server? Which figures I suppose as I have the outgoing mail server set to them. So how now would I tell SME that I wish email delivered to the archive@archive.dc.local ?

Really appreciate some help from much brainier than I on this :-) GDPR is looming and could do with this in place.

Paul.
Infamy, Infamy, they all have it in for me!