To allow bi-directional e-mail access for your internal machines (that is, to allow an internal machine to exchange e-mail with external hosts), further steps are necessary. The first step is to use a network-wide /etc/aliases file on the G Box (or your main mail host) to forward mail to users on internal machines. All e-mail to users on internal machines should be addressed to the G Box or mailhost. There follows an extract from a hypothetical /etc/aliases file which illustrates this approach. It assumes a small network consisting of the Eagle, a central mail-handling host named mailhub, two other hosts named hawk and falcon, and five users, bob, mike, ellen, mary, and chris. Of these users, the first two receive their e-mail on the mailhub and the others on individual hosts in the network.
bob: bob@mailhub
mike: mike@mailhub
ellen: ellen@hawk
mary: mary@falcon
chris: chris@falcon
Using this /etc/aliases file, mail to all of the aliased users from the outside world would be addressed to them on the Eagle Gateway, and not to the internal machines. Thus, mail to mary would be addressed to mary@gbox, not mary@falcon. When mail to mary arrives, it will automatically be forwarded to her mailox on falcon.
To further simplify this approach, enable outside users to mail directly to your domain name using the username@domain.name syntax; do this by publishing a DNS mail-exchanger (MX) record for the domain itself using the same IP address as your G Box, as well as a normal DNS Address (A) record, again using the same IP address.
You can also modify the /etc/sendmail.cf file on your internal machines to rewrite the From line of outgoing messages to show the Eagle's hostname in place of the internal hostname. Making this change will cause all outgoing e-mail from machine in your network to appear to have come directly from the Eagle and all replies to such messages will be sent directly to the Eagle, then forwarded as specified in the /etc/aliases file you have set up. This is illustrated in the tutorial section of the book Sendmail, by Bryan Costales, with Eric Allman and Neil Rickert, published by O'Reilly &Associates, ISBN 1-56592-056-2. A sample client.cf file which implements this procedure is available via anonymous ftp from the host ftp.uu.net in the directory /published/oreilly/nutshell/sendmail. If you obtain this file, be sure to edit it to change the name of the mailhub to your local mail hub system and to include your domain name.
Other steps you may want to take include creating MX records for each of your internal machines with your G Box as the mail exchanger.
For more information on configuring e-mail, including the topics outlined above, see the sendmail and DNS and BIND books.