O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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,[1] 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 (Section 1.6.11). 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 15-1.

Table 15-1. Alternative names for sendmail

Name

§

Mode of operation

hoststat

Section 15.1.1

Print persistent host status (V8.8 and above)

mailq

Section 15.1.2

Print the queue contents

newaliases

Section 15.1.3

Rebuild the aliases file

purgestat

Section 15.1.4

Purge persistent host status (V8.8 and above)

smtpd

Section 15.1.5

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 the result (in a case-sensitive fashion) to its internal list of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required