 |
Index for Section 7 |
|
 |
Alphabetical listing for M |
|
 |
Bottom of page |
|
mail_manual_setup(7)
NAME
mail_manual_setup - Describes how to manually set up and start mail
DESCRIPTION
Manually setting up and starting your Tru64 UNIX mail system involves
stopping and starting the sendmail utility, making changes to the
/var/adm/sendmail/sendmail.cf and /var/adm/sendmail/hostname.m4 files, and
running the newaliases command. The following sections discuss these tasks
and also provide information about POP and IMAP mail.
Before you configure mail, your machine should be established on a local
area network (LAN). If you want to use domain-based addressing, you must
also configure the Berkeley Internet Name Domain (BIND) service in your
environment. Furthermore, if you want to distribute your
/var/adm/sendmail/aliases database (see aliases(4)) amongst the machines in
your environment, you must configure the Network Information Service (NIS).
See the Network Administration guide, bindintro(7), nis_intro(7) for more
information about the BIND and NIS services.
Setting Up Your Mail System
Setting up your mail delivery system requires that you understand how the
sendmail utility works and how to modify the /var/adm/sendmail/sendmail.cf
file and the m4 files.
The sendmail Utility
The sendmail utility is a general-purpose mail router that enables a user
to send mail to users on the same and other systems. In most cases, the
mail utilities rely on sendmail to parse mail addresses and to resolve
system aliases. Specifically, when a message is sent, the message goes
through the following delivery process:
1. The mail utility passes the message to the sendmail utility.
2. The sendmail utility checks its aliases database for full expansion of
system names.
3. The sendmail utility parses the address of the receiver of the mail
according to a set of rules. If the message is going to a user on the
same system as the sender, sendmail passes the message to the mail
utility for delivery. If the message is going to a user on a remote
system, sendmail forwards the message to the sendmail utility (or the
equivalent utility for systems other than Tru64 UNIX) on the remote
system by using one of the following protocols, as specified in the
address:
·
DECnet
Used to send mail with DECnet (for example, host::user).
·
uux
Used to send mail with the UNIX-to-UNIX Copy Program (UUCP) (for
example, decosf!user).
·
SMTP
Used to send mail with the Transmission Control Protocol/Internet
Protocol (TCP/IP) facility (for example, user@decosf.dec.com).
4. Once the message arrives on the correct system, the sendmail (or
equivalent) utility passes the message to the mail utility for
delivery to the receiver's mailbox.
The sendmail Configuration File
The sendmail configuration file, sendmail.cf, contains the instructions for
how your mail is sent and delivered, and how it is parsed. This file
includes several tunable macros that you can modify to suit your
environment, and one macro that you should be aware of but cannot modify.
For more information, see the sendmail(8) reference page.
Using m4 Files
Alternatively, you can use the mailconfig GUI or mailsetup script to fine
tune your mail configuration. For more information, see the mailconfig(8)
and the mailsetup(8) reference pages and the Network Administration manual.
You can edit the /var/admin/sendmail/hostname.m4 file, modifying the define
lines. The file contains comment lines (lines that begin with dnl), that
provide additional information. For example, the following define line
specifies that RFC976-style addressing is disabled:
define (_RFC976, {})dnl
To enable RFC976-style addressing, modify the line as follows:
define (_RFC976, {T})dnl
The T enables RFC976-style addressing. After you edit the file, change to
the /var/adm/sendmail directory and issue the following command:
# make -f Makefile.cf.hostname:
This command generates a hostname.cf file. To use the new configuration,
copy the hostname.cf file to sendmail.cf and restart sendmail by using the
/sbin/init.d/sendmail restart command.
For more information, see the m4(1) and sendmail.m4(8) reference pages.
User Configurable Mail Locking
Different mailers use different methods to lock mailbox files. Tru64 UNIX
enables you to configure the locking style. To do this, use the
/usr/sbin/rcmgr set command to set MAILLOCKING in the /etc/rc.config.common
file.
Valid values for MAILLOCKING are as follows:
0 Specifies lockf.
1 Specifies lockfile.
2 Specifies Multi-channel Memo Distribution Facility (MMDF). This
applies to MH only.
4 Specifies lockf.
5 Specifies that both lockf and lockfile are used.
Restrictions
Spool files are locked while being modified by using the lockf call and by
using a lock file (/var/spool/mail/$USER.lock). When spool files are NFS-
mounted the NFS lockd daemon should be running on both the client and
server machine. Any user-added program that modifies the spool area must
use lockf, the lock file method of locking, or both.
ULTRIX Version 4.3 and earlier versions use lock file locking. Queue files
(which reside in the /var/spool/mqueue directory) are locked using lockf.
Sharing mqueue over NFS is supported with NFS locking (lockd) enabled.
Starting the Mail System
To start the mail system, use the following procedure:
1. Edit the /var/adm/sendmail/sendmail.cf file to change the macro
definitions described in the Network Administration.
2. Issue the newaliases command to initialize the sendmail aliases
database as follows:
# newaliases
3. Stop the current sendmail process by using the following command:
# /sbin/init.d/sendmail stop
4. Start the sendmail utility as follows:
# /sbin/init.d/sendmail start
Alternatively, steps 2 through 4 can be accomplished by using the
restart option to the sendmail startup script as follows:
# /sbin/init.d/sendmail restart
This command does the following:
· Initializes the sendmail aliases database
· Stops the current sendmail process
· Starts the sendmail utility
Post Office Protocol
The Post Office Protocol (POP or POP3) is a client/server protocol that
allows users to download their E-mail from a mail server to a remote
client. It is intended for users who prefer to access their E-mail in an
offline mode, a mode that is used widely today by Internet Service
Providers (ISP) to provide E-mail services for their customers.
The operating system includes a POP3 server from Qualcomm Incorporated,
which is fully installed and configured for you when you install the
OSFINET subset. Any users listed in the /etc/password file are
subsequently enabled to receive POP mail, if they desire; however, you can
improve security on your mail server by implementating alternate passwords
for their login authentication. See the Network Administration guide for
more information on authentication and administering Qualcomm POP.
MH POP
Alternatively, you can use the MH implementation of POP, which was the
default POP for previous versions of the operating system; however,
this implementation will be retired in a future release. See the
Network Administration guide for information on migrating from MH POP
to Qualcomm POP.
To enable users on your system to use MH POP for mail, you must enable
the mh POP server (popd). To set up a POP server, log in as super
user and perform the following steps:
1. Create a group called pop in /etc/group. For more information on
adding groups, see addgroup(8).
2. Add pop and all POP users to /etc/group. For example:
pop:*:99:pop,pop-user1,pop-user2,pop-user3
In this example, 99 is the groupd ID and pop-user1 pop-user2 pop-user3
are the POP users that are being added.
3. Create an account called pop in /etc/passwd, with /var/spool/pop as
the home directory. For example:
pop:*:199:99:POP Account:/var/spool/pop:/:
In this example, 199 is the user ID. For more information, see
adduser(8).
4. Create a directory called /var/spool/pop and make pop the owner by
entering the following commands:
# mkdir /var/spool/pop
# chown pop /var/spool/pop
5. Change the group ID of /usr/spool/pop to pop by entering the following
command:
# chgrp pop /var/spool/pop
6. Change the owner of /usr/lib/mh/spop to pop by entering the following
command:
# chown pop /usr/lib/mh/spop
Check the permissions on the file to be certain they are set to rwsr-
xr-x.
7. Create a file named /usr/spool/pop/POP and add an entry to the file in
the following format for every user who will be served by the POP
server:
user::user:::user@<client_address>::::0
See pop(4) for more information.
8. Change the owner of /usr/spool/pop/POP to pop by entering the
following command:
# chown pop /usr/spool/pop/POP
Check the permissions on the file to be certain they are set to -rw-
r--r--.
9. Run the popaka program to obtain an alias for every user entered in
the /usr/spool/pop/POP database. See the popaka reference page for
more information.
10. Edit the system wide aliases file (/var/adm/sendmail/aliases) to
include the strings produced from running the popaka program.
11. Run the newaliases program to update the system wide aliases database.
12. Run the popwrd program to enter a password for each POP server user.
See popwrd(8) for more information.
13. Run the popd server in the background and redirect the output to a
null file. For example:
# /usr/lib/mh/popd >/dev/null 2>&1 &
Note
The Tru64 UNIX popd sever is based on the pop3 protocol. By
default, it uses port 109. If the popd application is using
port 110, you can do start the popd sever with the -p option
to indicate the port number. Alternatively, you can change
the port number by editing the /etc/services file.
If you are running in a Network Information Service (NIS) environment,
perform the following steps to enable users on client machines to reply to
or send mail so that the return address is correctly sent to the POP server
machine:
1. Ensure that NIS aliases for the POP user point to the POP server
machine.
2. Run mailsetup and select the quick option or modify the send mail
configuration file to specify the POP server machine.
3. Check the svc.conf to ensure the local, yp aliases exist. If not, add
them.
If you need to start the popd daemon from a script run from the /sbin/rc3.d
directory as part of the system reboot process, you should start it using
the following command:
/usr/lib/mh/popd >/dev/null 2>&1 &
You can start the script after the network is started, but before the
script for the window manager is started.
Internet Message Access Protocol
The Internet Message Access Protocol (IMAP or IMAP4) is a client/server
protocol that allows users access their mail messages on a server. With
it, a user can access his or her mail folders and manipulate the contents
remotely without having to log into the server. In addition, the user can
download a cache copy of selected messages from the server to a local
system for offline browsing.
The most beneficial feature of IMAP is that it allows users to resychronize
their cached mail folders on the local system with the mail folders on the
server. The latter can be especially useful for people who use different
computers (at work, at home, or on the road) at different times to access
their messages. For example, if a user deletes mail from his computer at
work, the change is automatically carried over to his computer at home and
his laptop during subsequent resychronizations.
The operating system includes the Cyrus IMAP4 Revision 1 server from
Carnegie-Mellon University, which is fully installed and configured for you
when you install the OSFINET subset. See the Network Administration guide
for information on configuring users, migrating users from POP to IMAP
mail, enabling alternate passwords, and administering IMAP.
RELATED INFORMATION
Commands: imapd(8), mail(1), mailconfig(8), mailx(1), pop3d(8),
sendmail(8).
MH POP Commands (retiring): popaka(8), popd(8), popwrd(8).
Files: aliases(4), imapd.conf(4), sendmail.cf(4).
MH POP File (retiring): pop(4).
Network: mail_intro(7).
System calls: syslog(3).
Network Administration
 |
Index for Section 7 |
|
 |
Alphabetical listing for M |
|
 |
Top of page |
|