LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-15-2017, 11:55 AM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
Sendmail - how to configure LAN-only messaging


Today, my ISP (Time-Warner/Spectrum) went down for some kind of maintenance and will be for several hours. However, I still need the various hosts on my LAN to be able to exchange email. The main 'server' on the LAN has local IP 192.168.0.15 and the router directs public domain resolutions of mydom.com to this internal address.

Another host on the LAN, 'hpmini', has sendmail.cf configured to use mydom.com as the SMART_HOST, and the 192.168.0.15 host has "92.168.0 RELAY" set in /etc/mail/access.

All that works just fine. 'hpmimi' can send mail to recipients on 'server' ... until the ISP goes down and mydom.com is no longer resolvable.

Even with the ISP down, LAN hosts can still see each other either by explicit IP or by hostname (the router acts as a local DNS server). I want to fix things so mail can be delivered between LAN hosts, even if there is not ISP working to resolve public domain names.

I've tried changing the .mc file on 'hpmini' (192.168.0.10) to:
Code:
define(`SMART_HOST',`[192.168.0.15]')dnl
dnl# MASQUERADE_AS(`mydom.com')
dnl# FEATURE(`masquerade_envelope')
dnl# FEATURE(`masquerade_entire_domain')
I.e. changing the SMART_HOST to the explicit IP address and commenting out the masquerade settings, but sending a message from 'hpmini' (192.168.0.10) to 'server' (192.168.0.15) fails with the following message on server's maillog:
Code:
Aug 15 11:17:10 server sm-mta[13609]: v7FFEn17013609: ruleset=check_rcpt, arg1=<mfoley@192.168.0.15>, relay=[192.168.0.10], reject=451 4.1.8 Domain of sender address root@hpmini.ALLUNEEDIZLUV does not resolve
Aug 15 11:17:10 server sm-mta[13609]: v7FFEn17013609: from=<root@hpmini.ALLUNEEDIZLUV>, size=669, class=0, nrcpts=0, proto=ESMTPS, daemon=MTA, relay=[192.168.0.10]
ALLUNEEDIZLUV is the "domain name" of my LAN. The messages are received on server, but rejected because the domain does not resolve.

How could I fix this? Could I put ALLUNEEDIZLUV in /etc/domaintable or /etc/local-host-table?

Last edited by mfoley; 08-15-2017 at 11:57 AM.
 
Old 08-15-2017, 08:11 PM   #2
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Greetings,

Well, from what it sounds like, all you need is an entry (READ: alias) in /etc/hosts on the mail server for the systems on your LAN that you want to appear as being in the domain.

You can take a look at this LQ-Wiki page for info on /etc/hosts and what you can do with it.

HTH. Let us know.
 
1 members found this post helpful.
Old 08-15-2017, 11:48 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Thanks for that tip. That almost worked. I set 'server' (192.168.0.15) /etc/hosts to:
Code:
192.168.0.10            hpmini.ALLUNEEDIZLUV lincoln watcher
adding the underlined entry. When I sent a message from 'root@hpmini' to mfoley@server' it worked better, but I got:
Code:
Aug 16 00:27:39 server sm-mta[21549]: STARTTLS=server, relay=hpmini.ALLUNEEDIZLUV [192.168.0.10], version=TLSv1.2, verify=NO, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256
Aug 16 00:27:39 server sm-mta[21549]: v7G4RcEv021549: from=<root@hpmini.ALLUNEEDIZLUV>, size=673, class=0, nrcpts=1, msgid=<201708160427.v7G4RbFe009599@hpmini.ALLUNEEDIZLUV>, proto=ESMTPS, daemon=MTA, relay=hpmini.ALLUNEEDIZLUV [192.168.0.10]
Aug 16 00:27:39 server sm-mta[21552]: v7G4RcEv021549: to=<mfoley@server.ALLUNEEDIZLUV>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120673, relay=mail.twc.com [107.14.73.68], dsn=5.0.0, stat=Service unavailable
Aug 16 00:27:39 server sm-mta[21552]: v7G4RcEv021549: v7G4RdEu021552: DSN: Service unavailable
Aug 16 00:27:39 server sm-mta[21552]: v7G4RdEu021552: to=<root@hpmini.ALLUNEEDIZLUV>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31988, relay=mail.twc.com, dsn=5.1.8, stat=Service unavailable
So, I added the following to /etc/mail/local-host-names
Code:
server.ALLUNEEDIZLUV
That worked! Note that leaving off "server." in this line did not work.

I'll play with this some more to verify, but I think that might be the solution.
 
  


Reply

Tags
domain, resolve, sendmail



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail server configure for your lan sandeeprhce5 Linux - Server 1 03-27-2009 12:55 PM
LAN IP messaging mopu Slackware 9 09-26-2008 04:16 AM
Is there messaging software for intra-LAN? belliott4488 Linux - Software 1 09-16-2006 07:26 PM
Linux LAN Messaging Tools ? Pravat Linux - Networking 2 07-23-2005 01:16 AM
LAN Istant Messaging lomax13 Linux - Newbie 2 08-05-2003 05:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration