-C
Location of the configuration file All versions
The -C
command-line
switch tells sendmail where to
find its configuration file. The form of the
-C
switch
is:
-C path
With V8 sendmail, space between
the -C
and the
path
is optional. The
path
specifies the
location of the configuration file. That location
can be either a relative or a full pathname. If
path
is missing, the
location becomes the file
sendmail.cf in the current
directory.
The -C
command-line
switch causes sendmail to
internally mark the configuration file as unsafe. An
unsafe configuration file prevents all but
root from setting certain
options and causes sendmail to
change its uid and
gid to that of the user that
ran it. If it is used by someone other than the
superuser (and not in the -bt
rule-testing mode), the -OQueueDirectory
=
path
switch should also be used to set the location of
the queue directory. If that location is not
changed, sendmail fails because
it cannot chdir(2) into its
queue directory.
Prior to V8, the -C
command-line switch also prevented
sendmail from “thawing” its
frozen configuration file.
One practical use for this command-line switch might be as part of a make(1) file that is used to generate a cf file from your mc file. Consider, for example, that you maintain the mc source for your configuration file in a directory that is separate from the sendmail source directory. If such a directory were /usr/local/src/sendmail/cf, and if the sendmail source were located in /usr/local/src/sendmail/8.12.7, you ...
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.