15.2 The Real Queue DirectoryIn the current client.cf file, the queue directory is defined as /tmp . Because of its nature, the /tmp directory is always world-readable, -writable, and -searchable. Any file that is placed in /tmp can possibly be accessed, copied, or removed by any user. The use of /tmp clearly violates the need for confidentiality. Another drawback to using /tmp is that /etc/rc files, which are executed when the system boots, often remove everything from /tmp . You certainly would not want queued mail messages removed just because the machine rebooted.
Instead of
/tmp
, you should use the existing mail queue
directory to store queued messages. If you haven't already
done so, find that location by looking for the
%
Here, we look for lines in the
/etc/sendmail.cf
file
that begin with the letters
Edit the
client.cf
file and replace
O QueueDirectory=/tmp # BEWARE: use /var/spool/mqueue upon release change this O QueueDirectory=/var/spool/mqueue to this
This change causes
sendmail
to use the correct queue directory, but it has an unfortunate
side effect. Recall that
sendmail
runs as the
root
unless
an unsafe command-line switch causes it to give up that
privilege. The
%
the
queuename: Cannot create "qfIAA12390" in "/var/spool/mqueue" (euid=4010): Permission denied
You need to install the
client.cf
file in place of the system
sendmail.cf
file so that you can successfully run
sendmail
.
With the
client.cf
file installed, you
no longer need to use the |
|