Mail Administration Guide

Command-Line Arguments to sendmail

You can use command-line arguments when running /usr/lib/sendmail on a command line or type them into the mail startup script, /etc/init.d/sendmail. Table B-1 lists all of these arguments. The following paragraphs document several of the most commonly used arguments.

The sendmail daemon is normally started with the following command:

/usr/lib/sendmail -bd -q1h

Use the b option to select the operation mode that sendmail is running in. In this case, the daemon mode is selected. Other operational modes that you can selecte are initialize the alias database (bi), print the mail queue (bp), or verify the recipients (bv). You can duplicate the action of these arguments with newaliases, mailq, and mconnect.

The second set of arguments indicates that any queued mail should be reprocessed at 1 hour intervals. This can be decreased to 30 minutes by using q30m.

Using this argument, Cfile, will allow testing of a different sendmail configuration file. Other options that are useful when testing or debugging sendmail include d, which will select a debugging level, and v, which selects the verbose mode.

You can use the q argument to limit the jobs that are processed. The following argument selects only those messages to a user named mary, qRmary. This argument also allows limitation by sender, qSname, or by message-id, qInumber.

You can use the o argument to reset a configuration option. For instance, qQ/var/oldmail will run sendmail using /var/oldmail as the queue directory. The configuration options that you can change with this argument are discussed in more depth in the next section.