Alternative argv[0] Names

The sendmail program can exist in any of several places, depending on the version of the operating system you are running. Usually, it is located in the /usr/sbin directory and is called sendmail,[103] but it can alternatively be located in the /etc, /usr/lib, /usr/libexec, or /usr/etc directory. The location of the sendmail program can be found by examining the /etc/rc files for BSD Unix or the /etc/init.d files for Sys V Unix (Role As a Daemon on page 17). On some BSD-derived systems, the mailwrapper program and its /etc/mail/mailer.conf file define where sendmail is located.

In addition to the name sendmail, other names (in other directories) can exist that alter the behavior of sendmail. Those alternative names are usually symbolic links to /usr/sbin/sendmail. On some systems they can be hard links, and in rare cases you might actually find them to be copies. The complete list of other names is shown in Table 6-1.

Table 6-1. Alternative names for sendmail

Name

§

Mode of operation

hoststat

hoststat (V8.8 and Later) on page 221

Print persistent host status (V8.8 and later)

mailq

mailq on page 222

Print the queue contents

newaliases

newaliases on page 223

Rebuild the aliases file

purgestat

purgestat (V8.8 or Later) on page 223

Purge persistent host status (V8.8 and later)

smtpd

smtpd on page 223

Run in daemon mode

When sendmail looks for the name under which it is running, it strips any leading directory components from argv[0] and compares ...

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.