 |
» |
|
|
 |
Whether you are administering a single system, or a workgroup containing
many systems, you will probably want your users to be able to communicate
with each other using electronic mail (e-mail). This topic area
will help you understand what is involved in setting up e-mail services
for your workgroup. Components
of an Electronic Mail System |  |
To properly configure an electronic mail system you need to
know about the following components: Mail User Agents are the programs that users run to send,
and read e-mail. Mail User Agents that are shipped with HP-UX include mail, mailx, and elm. There are also commercially available Mail User Agents. Although Mail User Agents appear to do all the work of transmitting
and receiving e-mail, they are merely the visible part of the entire
electronic mail system. Mail User Agents do not actually deliver the
e-mail. Electronic mail delivery is handled
by Mail Delivery Agents. Mail User Agents: Format outgoing
messages with proper header information and if necessary encode
the outgoing messages for use by Mail Delivery Agents in routing
the messages. Allow users to read, save, and delete incoming electronic
mail messages. Schedule MIME Applications (if necessary) to allow
the user to experience non-textual information attached to incoming
electronic mail, for example viewing graphics files or video clips,
or listening to audio data.
Mail Delivery Agents form the core of the electronic mail
system. These programs, usually running in the background, are responsible
for routing, and delivering electronic mail. On HP-UX and other
UNIX systems, the primary Mail Delivery Agent is sendmail. Although sendmail can be run directly from a shell command line to send
a message, it is not usually used in this way. Mail User Agents
are usually used as front ends to sendmail for sending mail. Mail Delivery Agents: Deliver mail to local users (users
receiving e-mail on the computer that the Mail Delivery Agent is
running on) by scheduling the /bin/mail program or by forwarding the mail to users on local client machines. Forward e-mail via the appropriate transport mechanism
not intended for local users to other computers/networks for delivery.
For example, UUCP mail would be sent on its way by scheduling (and passing
the message to) the uux program. Modify the format of the address information in
message headers to accommodate the needs of the next computer/network
in a message’s delivery path, and to accommodate the delivery
method that is being used to route the message. For example: UUCP addresses are of the form: computername@domain.name!username |
whereas TCP/IP addresses can take one of several forms, for example: user@computer.domain.name |
Mail Alias Files are used for: Mapping “real world” names
to user login names Describing distribution lists (mailing lists), where
a single name (e.g., deptXYZ) is mapped
to several or many user login names
For faster access, the alias files can be processed into a
hashed database using the command: newalias (a form of sendmail). By default, the alias file (ASCII
version) is located in the file /etc/mail/aliases. Outgoing messages cannot always be sent right away because
of down computers, broken network connections, network traffic,
and other reasons. Your Mail Delivery Agent needs a place to hold
these messages until they can be sent on their way. That place is
the mail queue. If you are using sendmail (supplied with HP-UX) as your Mail Delivery Agent, your
mail queue is, by default, the directory /var/spool/mqueue. Although there are many ways to configure electronic mail
for a group of computers under your control, the following setups
are often used: A central mail hub (a mail server) receives e-mail for its
users and the users on the client computers that it serves. Users either
NFS-mount their incoming mail files to their local computers (the clients),
or log in to the hub to read their mail. Electronic mail can be sent directly
from the client computers. - Advantages:
Only one
computer needs to be connected to the outside world, which protects
(hides) the local clients from the network outside, giving the appearance
that all mail from the workgroup is coming from a central computer. Only one computer needs to run the sendmail daemon
(to “listen” for incoming e-mail). Data are centralized (easier to backup and control)
- Disadvantages:
Users of
client machines must NFS-mount their incoming mail files from the
hub (or log in to the hub) in order to read their mail. All electronic mail, even between client
machines in a local workgroup, must go through the hub computer.
This means that local mail traffic could be slowed if the hub machine
becomes overloaded; and mail traffic would stop completely if the
hub goes down or becomes disconnected from the network.
A gateway mail hub receives electronic mail for its users
and users of client computers that it serves. The hub forwards mail intended
for users of the client computers to those clients. Users do not NFS-mount
their incoming mail files to their local (client) computers; they
send and receive their mail directly from their own machines. - Advantages:
Only one
computer needs to be connected to the outside world, which protects
(hides) the local clients from the network outside, giving the appearance
that all mail from the workgroup is coming from a central computer. Traffic between local machines (within the workgroup)
does not have to travel through the hub computer because each client
can send and receive its own electronic mail. Therefore if the hub
goes down or becomes overloaded, local mail traffic is unaffected
(only mail to and from computers outside of the workgroup is affected). Greater privacy for electronic mail users on the client
machines. Data is not stored in a central repository.
- Disadvantages:
Each computer
needs to run its own copy of the sendmail daemon to “listen” for
incoming mail. Electronic mail from and to the outside world must travel
through the hub, which could become a bottleneck if the mail traffic
is heavy. If the hub is down, clients cannot send and receive mail to
and from computers outside of the work group.
Each computer in your workgroup independently sends and receives
its own electronic mail. - Advantages:
There is
no hub computer to contend with in this setup. Every computer, whether
local to the workgroup or not, can send and receive electronic mail directly with
every other computer in the network that also supports electronic
mail. Greater privacy for electronic mail users on the individual
machines. Data is not stored in a central repository.
- Disadvantages:
Because each
computer (from an electronic mail perspective) is connected directly
to the outside world, there is an increased data security risk. Each computer needs to run its own copy of the sendmail
daemon to “listen” for incoming mail.
The topography you use depends on your needs. Here are some
things to consider when choosing your electronic mail network topography: - Security
By using a topography with a hub computer you can better
protect work that is being done on machines within your workgroup
or organization. The single point of entry to your internal network
(a gateway computer) is a lot easier to defend against unauthorized
entry. - Data Centralization
By having your mail files on a single
machine or directory structure, it is easier to back up your data.
- Company Appearance and Future Planning
By using one of the topographies that
use a hub computer, a small company can look more like a large corporation.
As the company grows, the centralized mail processing can be easily
moved to the jurisdiction of a corporate communications group.
- Traffic Levels
If e-mail traffic levels are expected to be high,
you might not want to use a single hub for processing all electronic
mail.
Gone are the days when electronic mail messages contained
only ASCII text. Today people want to send other types of data:
audio clips, still graphics (in a variety of formats), video clips,
etc. Because Mail Delivery Agents were developed to handle the
7-bit ASCII data in text-only messages and not the 8-bit binary
data contained in audio, graphics, and video, a method is needed
for encoding the binary data to be transported by the text-only
transport agents. The system developed for encoding the binary data
is known as MIME (for Multipurpose Internet
Mail Extensions). Most modern Mail User Agents (including the CDE mail client, dtmail) can process MIME-encoded e-mail messages. For complete
details about how MIME works, see RFC 1521. See also: elm(1). Configuring
a System to Send Electronic Mail |  |
Configuring an HP-UX system to send e-mail is relatively simple.
You need to do two things: Be sure that the executable file for the sendmail program, /usr/sbin/sendmail, is on your system. If you are using a Gateway Mail Hub topography you
need to enable site hiding for each of the
client computers in your workgroup. The following procedure enables site hiding, which means that e-mail
from users on client computers in your workgroup will appear to
the outside world as if it was sent from the hub computer. Replies to
such mail will be sent to the hub computer (unless a “Reply-To:” header
in the e-mail directs otherwise).
On each client computer
in the workgroup (being served by a central mail hub) edit the file /etc/rc.config.d/mailservs: Set the environment variable SENDMAIL_SERVER to
0 indicating that this computer is not the hub, and is not a standalone
e-mail system. The sendmail daemon will not be run on this computer: Set the environment variable SENDMAIL_SERVER_NAME to
the canonical name (official host name) of
the computer that will be the hub computer sending and receiving
electronic mail on behalf of this client computer. For example,
if the hub computer for a client has as an official host name, corpmail.corp.com,
you would set the variable as follows: SENDMAIL_SERVER_NAME="corpmail.corp.com" |
The environment variable SENDMAIL_FREEZE does
not apply to clients (which always freeze the sendmail configuration
file), but it is probably good practice to set this variable to
1 to indicate to viewers of the /etc/rc.config.d/mailservs file that the sendmail configuration file is being frozen
for this client computer:
Reboot the client computer to enable site hiding and
freeze the sendmail configuration file.
Configuring
a System to Receive Electronic Mail |  |
Configuring a system in your workgroup to receive e-mail
is a bit more complicated than configuring it to send e-mail. First
you must determine two things: Which type of networking topography you are going to use (see Networking
Topographies) Where the system fits in to the topography: the
electronic mail hub, a client in a workgroup served by a hub, or
a standalone system.
Using that information, begin by selecting the appropriate
networking topography below: Central Mail Hub Topography
(Receiving E-mail) Gateway Mail Hub Topography (Receiving E-mail) Fully Distributed (Standalone System) Topography
Central
Mail Hub Topography (Receiving E-mail)With this type of electronic mail system, a single computer
serves as the place where all users in a workgroup send and receive
e-mail. To do this, users either log in to the hub computer, or
NFS mount their electronic mailboxes to local (client) workstations.
All outgoing e-mail from the entire workgroup, even mail sent from
a workstation that has NFS mounted an electronic mailbox, appears
to have originated on the hub computer. With Central Mail Hub topography, the electronic mail hub
is the computer that receives e-mail from any computer outside of
the workgroup on behalf of its own users and those of the client
computers that it serves. On the hub computer only, edit the file /etc/rc.config.d/mailservs: Set the environment variable SENDMAIL_SERVER to
1 to indicate that this computer is the hub computer: Do not set the environment variable SENDMAIL_SERVER_NAME which would
indicate that another computer serves this one: (Optional) Set the environment variable SENDMAIL_FREEZE to
1 to indicate that the sendmail configuration file is to be frozen.
With older computers, and in certain other circumstances, a frozen configuration
file can speed up sendmail’s performance by reducing the
time it needs to parse its configuration file.
Reboot the hub computer to start up and properly configure
the sendmail daemon.
With “Central Mail Hub” topography, the client
computers do not receive electronic mail directly. Users either
log into the hub computer to process electronic mail, or they NFS-mount their
incoming mailbox files, typically located in the directory /var/mount, and run a Mail User Agent on their client workstation
to process their mail. For outgoing mail (see “Configuring
a System to Send Electronic Mail”), the Mail User Agent will automatically schedule
the sendmail program. Gateway
Mail Hub Topography (Receiving E-mail)This type of electronic mail system is similar to the “Central
Mail Hub” topography in that a single computer sends and
receives e-mail on behalf of the all of the users in the workgroup to
and from computers outside of the workgroup. The difference
is that e-mail within the workgroup e-mail does not have to go through
the hub computer because each client machine is running its own
copy of the sendmail daemon allowing it to receive e-mail directly
from other computers in the workgroup. The procedure for configuring the hub computer in a “Gateway
Mail Hub” topography is: On the hub computer, edit the file /etc/rc.config.d/mailservs: Set the environment variable SENDMAIL_SERVER to
1 to indicate that this computer is the hub computer: Do not set the environment variable SENDMAIL_SERVER_NAME,
which would indicate that another computer serves this one: (Optionally) Set the environment variable SENDMAIL_FREEZE to
1 to indicate that the sendmail configuration file is to be frozen.
With older computers, and in certain other circumstances, a frozen configuration
file can speed up sendmail’s performance by reducing the
time it needs to parse its configuration file.
Reboot the computer to start up and properly configure
the sendmail daemon.
Using “Gateway Mail Hub” topography each of the
clients in a local workgroup can send e-mail to the others without having
to go through the hub. For this to be successful each of the clients must
be running its own sendmail daemon. On each client computer: Fully
Distributed (Standalone System) TopographyWhen using a Fully Distributed electronic mail topography
each computer is a standalone machine (with regard to electronic
mail). Each machine is effectively its own workgroup and is configured
just like the hub computer in a “Central Mail Hub” topography
e-mail network. The procedure for configuring each system in a “Fully
Distributed” topography is: Edit the file /etc/rc.config.d/mailservs: Set the environment variable SENDMAIL_SERVER to
1 to indicate that this computer will run the sendmail daemon to
receive mail: Do not set the environment variable SENDMAIL_SERVER_NAME which would
indicate that another computer serves this one: (Optionally) Set the environment variable SENDMAIL_FREEZE to
1 to indicate that the sendmail configuration file is to be frozen.
With older computers, and in certain other circumstances, a frozen configuration
file can speed up sendmail’s performance by reducing the
time it needs to parse its configuration file.
Reboot the computer to start up and properly configure
the sendmail daemon.
|