[SOLVED] Sendmail - how to configure LAN-only messaging
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.