[OpenIndiana-discuss] sendmail simple setup home lan
Discussion list for OpenIndiana
openindiana-discuss at openindiana.org
Wed May 21 15:41:44 UTC 2014
Le 2014/05/21 17:26 +0200, Discussion List For Openindiana a écrit:
> The goal is to send any outgoing mail to another host on my home lan
> that relays it on. The lan host requires no auth and accepts mail
> from my lan.
Easy. In a sendmail way of things.
There are a couple of things , explained below.
> A further goal is to be able to get mail by means of fetchmail... when
> required which will be seldom.
I don't know fetchmail at all, so I'll leave this one to others :-)
> dnl define(`SMART_HOST', '[smtp.local.lan]')dnl
> dnl define(`SMART_HOST', '[192.168.1.42]')dnl
> define(`SMART_HOST', '192.168.1.42')dnl
That should be
define(`SMART_HOST', `smtp.local.lan]')dnl
or
define(`SMART_HOST', `192.168.1.42')dnl
Note the back quote. Yes, it matters. The message below does not say
that host 192.168.42 is not found. It says that host '192.168.42' is not
found. The quotes are included in the name of the host.
> dnl define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
> FEATURE(`relay_entire_domain')dnl
> DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
> MAILER(`local')dnl
> MAILER(`smtp')dnl
>
> The logs indicate there is a problem recognizing the smart host.
> You see the several ways I've tried commented out above.
>
> That host does not have dns records... It lives on a tiny home lan and
> does appear in loclhosts /etc/hosts file in all the ways you see tried
> above.
>
> I was under the impression that having that host in [] told sendmail
> NOT to do a dns lookup.... tried both ways and by IP.
>
> So isn't there some way to make sendmail use the host files?
>
> I'm pretty sure nsswitch files all say 'files' first.
On Solaris and its descendants, by default, Sendmail follows nsswitch
(which is the opposite of eg, the default Sendmail configuration on
RHEL). So no worries there.
There is one more thing: SMART_HOST is probably not what you want. It is
used only for destinations which *do not* resolve. Ie, if you send to
login at example.com, and your system can request DNS for that domain, then
it will try to send the email directly, without using the SMART_HOST.
What I use is both those lines:
define(`MAIL_HUB', `mail.gateway.')dnl
define(`SMART_HOST', `mail.gateway.')dnl
HTH,
Laurent
More information about the openindiana-discuss
mailing list