Sendmail Forwarder to


Valued Member

I'm trying to design a notification system for a home user. I have a linux host running sendmail that is configured to send messages up to an email account on gmail. That works fine.

The problem is that there is another host on the same internal 192-network that needs to send emails out, but it by design cannot have an email program on it.

What I want to do is reconfigure the sendmail on the linux host to accept (and auto-forward) all messages from other hosts within the 192-private-subnet and push them up to gmail for distribution as necessary to the intended recipients.

Is there a specific sendmail config option that I need to enable this? Is this considered a smart-host (excuse my ignorace, there is one other post here on smarthosts and I'm trying to learn!!) ...

The home network has Time Warner cablemodem, so hosting or whatnot on SMTP Port 25 is simply not an option. I'm using as the destination, and it works fine for that single linux host, just not any other hosts on that same network.

Any help is much appreciated in advance. What a great website!!

--Doug Tanski


EQ Forum Admin
Staff member
Hi Doug,

Smart hosting is the configuration on both the clients and the main mail server that allows the clients to relay through the main Linux server that you have forwarding to google. Yes, you can configure smart hosting on the 192 network boxes and have them relay all of their outgoing e-mail to the main Linux server.

You will also need to configure the main Linux server that does the forwarding to google to accept e-mail from all the other hosts on the 192 network. The network may be as big as, but you should know if you have a smaller /24 range or something different that needs to be configured.

The directions for the smarthost configuration of the 192 network clients can be found here.

To configure the main Linux server to accept e-mail from those 192 network hosts you need to add the following line to your /etc/mail/access file:

192.168 RELAY

This will allow relaying from all of 192.168.*.*

You can tweak it to be something like
192.168.1 RELAY

If you only need to relay from 192.168.1.* (

While in /etc/mail/ to rebuild the new access.db do a:

makemap hash access < access

Also, you'll need to check your /etc/sysconfig/sendmail or equivalent config file and verify that DAEMON=YES or that you are using the -bd flags.

Don't forget to restart sendmail after making the changes! :)