The sendmail program’s ability to perform different tasks necessitates that the command line be processed in steps.
The command line is prescanned to set its
debugging switch. That switch allows you to watch all the steps taken
by sendmail prior to processing the rest of the
Internal sendmail macros are given their starting values, then the command line’s argv (the name used to run sendmail) is processed. That name can determine the sendmail program’s mode of operation.
The command-line switches are processed. Although the configuration
file is read after the command line is processed, options in the
command line (with
still supersede those in the configuration file.
The configuration file is read.
If sendmail is running in a mode that allows it to verify or deliver to recipients, the remainder of the command line is processed to extract the recipient list.
When sendmail begins to run, it performs a
preliminary scan of its command-line arguments. It does this because
some actions need to be performed before the configuration file is
-d command-line switch is processed
during the prescanning phase.
After the command-line switches are prescanned, but before they are processed in full, sendmail performs two important internal tasks.
The environment variables that are given to sendmail ...