Name
-C
Synopsis
The -C command-line
switch tells sendmail where to find its
configuration file. The form of the -C switch is:
-C pathWith 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 if in other than
-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 could create a Makefile ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access