Low-Cost Email Connection between UNIX and Macs
Huiqi Liu
Despite the proliferation of the Internet and ever growing
popularity of
email, in many workplaces, email is largely restricted
to people in
technical departments (who are generally familiar with
networked UNIX
workstations and text editors such as vi), while people
in sales,
marketing, and administrative departments (who may be
Mac or PC users)
do not have easy access.
The Problem
In this case, the network consists of an Ethernet-based
TCP/IP
environment comprising just over a dozen UNIX workstations
of various
flavors, mostly Sun SPARCs. A small Macintosh LocalTalk
network of a
similar number of machines is also established serving
mainly word
processing, spreadsheets, and FileMaker Pro database
management. A
dial-up PPP connection to the Internet is already in
place on a Sun
SPARC server. All users can physically, or through dumb
terminals, log
onto the UNIX server and access email. The objective
was to get email to
the Mac users.
This process proved to be more complex and time consuming
than
anticipated. The first step was to get the two networks
(LocalTalk and
TCP/IP) to talk to each other. The size of the configuration
prohibited
the use of hardware gateways, although many systems
integrators
recommended this route. We chose to install a PowerMac
running
off-the-shelf software packages as a "gateway,"
which so far has proved
to be stable and effective. Once the network connection
is established,
either a graphical-based package or terminal emulation
can be used as
the front-end for email.
The Solution
Linking Macs and UNIX is not a new problem. Many common
solutions,
however, tend to use hardware gateways, such as Cayman
Systems'
GatorRouter and Shiva's FastPath (see for example, Stone
1995), which
are not cost-effective for our purpose. In many ways,
the various
functionalities offered by hardware gateways are more
than we need now
or will need in the foreseeable future. Another possible
way to achieve
our goal would be to put all the Macs on Ethernet. Since
most of our
Macs are 68000-based machines without built-in Ethernet
cards, this
method would require an Ethernet card for each Mac.
This is not very
practical, and more importantly, it does not protect
our investment
toward future upgrade as most new PowerPC-based machines
have built-in
Ethernet connections. Besides, many of our existing
peripherals are
LocalTalk based. Admittedly, the benefit of the second
method is the
much higher bandwidth that Ethernet provides (10 Mbits/sec
against 230.4
Kbits/sec for LocalTalk).
Neither of the above solutions was suitable for us.
We wanted to fully
utilize our existing LocalTalk network, thus preserving
our investment
in current equipment, and if possible use software rather
than hardware
for routing between LocalTalk and TCP/IP. As far as
the speed of the
network is concerned, it is preferable to gradually
evolve into
Ethernet, rather than to adopt a "big bang"
approach. A graphical-based
email package will be used instead of running telnet
and then using UNIX
text-based applications. Our solution of a gateway Mac
is very
economical, and it also gives us an easily manageable
network set-up.
Figure 1 shows a schematic of final configuration of
our network. The
gateway PowerMac physically sits on both the TCP/IP
network and the
LocalTalk network. It has both a built-in Ethernet card
(for TCP/IP) and
a LocalTalk port. For our solution, this is the only
Mac that needs an
Ethernet connection. Additionally, the gateway has a
number of software
packages installed that allow it both to retain its
link to the current
LocalTalk network and to act as a translator between
LocalTalk and
TCP/IP.
Individual Macs can only support one type of network
by default, that
is, either EtherTalk to run on an Ethernet connection
or LocalTalk to
run on a LocalTalk connection. To allow the gateway
computer to "talk"
both, we installed Apple LocalTalk Bridge software.
This software
facilitates the use of EtherTalk as the network driver
without losing
the link to LocalTalk. With MacTCP properly configured,
the gateway Mac
could now talk to TCP/IP as well as LocalTalk hosts.
However, other
nodes on the LocalTalk network still could not talk
to TCP/IP, so we
installed and configured the Apple IP Gateway software
on the gateway
PowerMac, and configured MacTCP on all nodes. This allowed
transparent
exchange of IP packets and LocalTalk packets between
UNIX workstations
and all Macs on the network. Figure 2 summarizes the
gateway computer
configuration.
We still needed an email package to run on the Macs
in order to complete
our task. Most common packages are POP3 (Post Office
Protocol, Version
3) based and simply require the UNIX mail server to
be configured as POP
server. After evaluating a number of them, we chose
Z-Mail from NCD. It
runs across all major platforms; thus it offers a uniform
user interface
no matter which platform (Mac or UNIX) a user logs on
to. Z-Mail is also
available on the PC for possible future expansion.
Set Up and Administration
The Apple LocalTalk Bridge is a Control Panel extension
that requires a
minimum amount of configuration. You simply run the
installation
program, restart the computer, and it is done. Once
installed, the
bridge can be dynamically switched on and off when necessary.
The Apple IP Gateway is also very easy to set up. To
configure the
gateway, first configure MacTCP to assign an IP address
for the machine
(see below). Next, gateway configuration is done through
Gateway
Manager, a front-end utility supplied with the package.
The gateway has
three options for IP addressing: automatic addressing,
manual
addressing, or both. Automatic addressing means clients
are assigned
addresses by the gateway each time they connect through
it. Manual
addressing means clients use preassigned addresses.
The "both" option
either automatic or manual addresses.
With the manual addressing scheme, you specify only
those nodes with
predefined IPaddresses that are allowed to connect to
the gateway. To
keep the network more secure, you can limit access to
specific LocalTalk
networks; this is very useful, especially when automatic
addressing is
used.
The Gateway Manager provides a graphical display to
show current
connections that can be used to monitor its usage. It
is also helpful to
know if there are any active connections before doing
a reboot!
MacTCP is also a Control Panel extension. MacTCP allows
you to assign an
IP address to the computer either manually or through
a server. In the
manual mode, an IP address needs to be pre-assigned.
In the server mode,
the machine gets its IP address from the server. In
our case, the
gateway Mac must have a manually assigned address; other
Macs can use
either mode. Only the gateway Mac needs to be included
in the host
table of the UNIX server; all others are hidden from
it a further
measure to ensure network security and simplicity.
Configuring POP3 Server--Z-POP
To enable the use of Z-Mail, our Sun SPARC server, (which
has the
dial-up PPP connection to the Internet) is configured
as a POP3 server.
POP3 was designed to permit client computers to dynamically
access
mailboxes stored on a central server. A POP3 service
daemon has to be
installed for this purpose. An enhanced version called
Z-POP comes with
Z-Mail. It has some features not common on standard
servers, such as
mailbox synchronization and centralized storage of configuration
files.
If you already have a POP3 server configured, it may
be used for Z-Mail
also (but you will not be able to use the extra functions
of Z-POP).
Configuring Z-POP is straightforward. Edit the /etc/services
to define
the port number: 15232 for Z-POP by default (standard
POP3 uses port
number 110):
zpop 15232/tcp
Then, edit the /etc/inetd.conf file to include the Z-POP
server:
zpop stream tcp nowait root /usr/local/etc/ zpoplib/zpop zpop
The inetd has to be restarted (i.e., kill -HUP process
id) or a system
reboot will ensure that the POP server gets initialized.
To check that
the configuration is correct, use telnet to open a session
with the
server:
telnet <name of server host> <port number of Z-POP>
A successful connection will respond with a greeting
such as:
+OK Welcome to ZPOP server version 1.0.
After Z-POP has been properly set up, loading Z-Mail
itself is easy. The
first time Z-Mail starts, some menu-driven configuration
will need to be
performed. You need to specify the IP address of the
mail server and the
port number to connect to (e.g., 15232 for Z-POP), the
directory to
store mail files on the local machine, and a couple
of other simple
parameters. Z-Mail is then ready to use.
Troubleshooting
We encountered some recurrent problems when users started
to run Z-Mail
on their Macs. These were narrowed down to a few causes,
and the
following is a summary of the problems and fixes.
MacTCP
Those of you who have used MacTCP may be familiar with
the number of
times it requires reconfiguration and subsequent rebooting
of the
machine. We found that quite often it would die for
no apparent reason.
The machine involved would refuse to connect to the
gateway, not to
mention the server, with a message of: "can't open
MacTCP driver." When
this happened, changing the IP address allocation from
server mode to
manual mode (and giving the machine an IP address) and
rebooting would
cure the fault. When switched back to server mode, it
would still
function without any problems.
MacTCP sometimes failed to release the driver when it
was not being used
and thus caused problems next time around. Fortunately,
a small system
extension called ZapTCP written by Steve Falkenburg
of MacDTS is
available in the public domain. This works by installing
a system-wide
patch that takes control of MacTCP when an application
quits or crashes.
Putting ZapTCP in the extensions folder (in addition
to MacTCP itself)
drastically reduced the number of reboots. From time
to time, however,
MacTCP still hangs.
Since we only have a dozen or so machines, it does not
take much time or
effort for us to use manual addressing. In the end,
we opted to give
each Mac its own IP address (and correspondingly set
the IP Gateway to
manual addressing mode), which together with ZapTCP
almost eliminated
the problem with MacTCP.
POP3 server
Z-Mail, like other POP3-compliant mail packages, must
successfully open
a TCP session with the POP server before doing anything
else. Therefore,
if the server failed to respond in a certain given time
limit, Z-Mail
would not be able to establish a TCP session and could
not start the
application.
The easiest way to check this is by opening a telnet
session onto the
POP server port and measuring the response time. (Do
this first on the
mail server locally and then through the network from
a Mac.) Normally,
the response should be instant (1 or 2 seconds). If
it takes longer than
10 seconds, then the mail application will be very slow
to start (if at
all). In Z-Mail binary, there is a hard-coded default
"NetWork Timeout"
value of 60 seconds, which may be increased with a resource
editing
program such as ResEdit.
If the response is not quick enough, the load on the
server may be too
high or the network has too much traffic. In our setup,
this "slow
response" seems to be linked to the PPP connection
(as our POP server is
also the PPP server). When PPP is up (which happens
every 30 minutes)
and actively transmitting data, the machine is always
slower to service
a POP request.
Gateway PowerMac
Occasionally, the gateway PowerMac hangs. This happened
initially with a
very high frequency that was traced to the After Dark
screensaver
utility. Disabling the screensaver reduced the system
crashes
considerably. (We have version 2.0 of After Dark, which
reportedly has
problems on the PowerMac. We have yet to source a later
version.)
Sometimes, when the machine stays on for several days
gradually a
"dirty" system will result. With system 7.5,
it is possible to schedule
automatic reboot during the night, which again cuts
down system
problems.
Conclusions
This article documents a low-cost solution to getting
email on AppleTalk
network through a UNIX mail server. We used affordable
Apple software
packages to integrate LocalTalk and TCP/IP and found
it stable,
effective and easy to manage. Note that this setup is
not restricted
just to email; once the network connection is up, other
services such as
ftp, sharing disks, and printers, can also be achieved.
Reference
Stone, D. 1995. UNIX, TCP/IP, and Macs. Sys Admin 4(3):63
- 72.
About the Author
Huiqi Liu holds a Ph.D. in Geology from Royal Holloway,
University of
London. Whilst still completing his thesis, he found
computers were much
more interesting than rocks and decided to take part
in a Master's
course in computer science. He now works as systems
support specialist
for CogniSeis Development Inc., a software house to
the oil industry, UK
Office. He can be reached at liu@eame.cogniseis.com.
|