Question about sendmail...

Les Mikesell lesmikesell at gmail.com
Fri Oct 28 04:26:13 UTC 2005


On Thu, 2005-10-27 at 21:26, Philip Prindeville wrote:
> I'm running FC3 (updated) on a handful of machines.
> 
> I have a single IP address, with a NATing router set to that
> address.  I have a domain, and an MX which points through
> the router at my mail server (or rather, the router is configured
> to port-forward 25, 143, etc to the mail server).
> 
> I also have several mail clients on my 192.168.1.x network.
> 
> The issues are the following:
> 
> * the clients have a smart host (DS) defined as the mail relay,
>    but they canonical its name and then look it up in the DNS,
>    trying to contact it on the external IP address (and not its
>    internal 192.168.1.x address in the /etc/hosts file).  My
>    /etc/nsswitch.conf file is unmodified.

Mailers always use MX records (since that's what they are
for) unless you specify otherwise by putting the name or IP
address in [] brackets.  You should probably configure
the MTA clients to send to your server via smtp instead
of a local sendmail, as well as configuring the non-server
sendmail's to use MAIL_HUB with the server's address so
all of your local mail ends up on one server.  Your
mail server should use SMART_HOST with your ISP's relay
host.

> * the clients then try to relay the email with a sender's envelope
>    address as user at host.my-domain, which the relay rejects
>    because "host.my-domain" doesn't resolve in the DNS.

Set MASQUERATE_AS to your public domain name, and
FEATURE((masquerade_envelope)
in sendmail.mc

> * I should probably have define(`LOCAL_RELAY', `:$S') to
>    handle forwarding everything to the mail server.

SMART_HOST should be fine.

> I used to know all of this stuff once upon a time...
> 
> Am I missing anything?

Add your public DNS name to the local-host-names file
if your server doesn't use that name itself so it will
accept inbound mail.

Don't mess with sendmail.cf, edit sendmail.mc, run
make and restart sendmail.

-- 
  Les Mikesell
    lesmikesell at gmail.com





More information about the fedora-list mailing list