Previous Section Next Section

confMBIN...

Where and how to install sendmail Build macro

The sendmail binary is intended to run as root only when root runs it. The directory that it is installed in, and the permissions that it has, are defined by four macros:

confMBINDIR

The confMBINDIR macro determines where the sendmail program will be installed. For most sites, the correct directory will be defined in your devtools/OS file. But if you decide to put sendmail in a different directory, you can do so by defining this macro:

define(`confMBINDIR', `/export/local/sos5.6/clients/sbin')

In general, whenever you relocate the sendmail program, you should also examine your /etc/rc or /etc/init.d scripts. They often contain built-in path assumptions that will need to be changed to match the new path. If you fail to change those scripts, the new sendmail will not be automatically started at boot time.

Note that many MUAs also hardcode assumptions about where sendmail is located. Check every MUA on your machine to be certain none of them will break because of the new location. Some, such as /usr/ucb/Mail, have configuration files of their own that define sendmail's location. You will need to find and fix those separate configuration files too.

Lastly, note that -E DESTDIR (See this section) can be used to relocate all installation directories.

confMBINGRP

This macro sets the group that sendmail should belong to. The group defaults to bin. If you wish to use a different group you can do so like this:

define(`confMBINGRP', `mbin')           use a group name
define(`confMBINGRP', `343')            use a group number

If you use a positive number that is not too large, it will be accepted no matter what. If you use a name that is not defined in the /etc/group file, you might see the following error and the build will fail:

chgrp: nullmail: unknown group
confMBINMODE

This macro defines the execution mode that sendmail will have. The default is mode 550, which is readable and executable by the owner and group only. One reason to change this default might be to allow ordinary users to execute the program. You would make such a change like this:

define(`confMBINMODE', `551')           add user execute permission

If you use an illegal permission value, such as 991, you will see the following error and the build will fail:

chmod: invalid mode
confMBINOWN

This macro defines who will own the sendmail binary. The default is root. You can set its ownership to a different owner if you prefer, with an m4 Build macro like this:

define(`confMBINOWN', `bin')           use a username
define(`confMBINOWN', `9')             use a user number

If you use a positive number that is not too large, it will be accepted no matter what. If you use a name that is not defined in the /etc/passwd file (or related file such as /etc/shadow), you might see the following error and the build will fail:

chown: unknown user id: nomail

Beware, however, that you should not change the owner from root without first carefully considering the possible security risks.

    Previous Section Next Section