Previous | Table of Contents | Next |
After you have established a policy, it is worth examining the available configuration files to decide if any of them are close enough so that you can use major parts of them. Almost always, a fair amount of boilerplate code can be reused.
NOTE: Always keep a backup copy of your configuration files to protect against accidental deletion.
The next step is to build ruleset 3, which specifies a ruleset for your individual mailers. Building ruleset 3 is the hardest part of the job. Here are some guidelines:
After you have ruleset 3 finished, the other rulesets are relatively simple. If you need hints, examine the supplied configuration files.
To turn on fully qualified domain names, use the sendmail.mx file and replace Mether with Mddn. Another way to turn on fully qualified domain names is to duplicate the Mddn mailer and change its name to Mether.
When you build a configuration file, you can perform a certain amount of testing using the test mode of sendmail. For example, you can invoke sendmail as
% sendmail -bt -Ctest.cf
which then reads the configuration file test.cf and enters test mode. For example,
ADDRESS TEST MODE Enter <ruleset> <name> >
In this mode, you enter lines of the form
ADDRESS TEST MODE Enter <ruleset> <name> > rwset name
in which rwset is the rewriting set you want to use and name is a name to which the set is applied. Test mode shows you the steps it takes as it proceeds, finally showing you the name it ends up with. You may use a comma-separated list of rwsets for sequential application of rules to an input; ruleset 3 is always applied first. For example,
ADDRESS TEST MODE Enter <ruleset><name> > 1,21,4 monet:bollard
first applies ruleset 3 to the input monet:bollard. Ruleset 1 is then applied to the output of ruleset 3, followed similarly by rulesets 21 and 4.
If you need more detail, you can also use the -d21.99 flag to turn on more debugging. For example,
% sendmail-bt-d21.99
turns on an incredible amount of information; a single word name may result in several pages of information.
The following sections describe the arguments for sendmail that you can use on the command line. The arguments are briefly described in Table 4-10.
Argument | Description | |
---|---|---|
-rname | The sender's name is name. This flag is ignored unless the real user is listed as a "trusted user" or if name contains an exclamation point (because of certain restrictions in UUCP). | |
-fname | An obsolete form of -r. | |
-h cnt | Sets the hop count to cnt. It shows the number of times this message has been processed by sendmail (to the extent that it is supported by the underlying networks). During processing, cnt is incremented; if it reaches the value of configuration option h, sendmail returns the message with an error. | |
-Fname | Sets the full name of this user to name. | |
-n | Does not do aliasing or forwarding. | |
-t | Reads the header for To:, CC:, and BCC: lines, and sends to everyone listed in those lists. The BCC: line is deleted before sending. Any names in the argument vector are deleted from the send list. | |
-bx | Sets operation mode to x. Operation modes are | |
m | Deliver mail (default). | |
a | Run in ArpaNet mode. | |
s | Speak SMTP on input side. | |
d | Run as a daemon. | |
t | Run in test mode. | |
v | Just verify recipients. | |
i | Initialize the Aliases database. | |
p | Print the mail queue. | |
z | Freeze the configuration file. | |
-qtime | Tries to process the queued-up mail. If the time is given, sendmail repeatedly runs through the queue at the specified interval to deliver queued mail; otherwise, it runs only once. | |
-Cfile | Uses a different configuration file. | |
-dlevel | Sets debugging level. | |
-oxvalue | Sets configuration option x to the specified value. | |
-M msgid | Runs given message ID from the queue. | |
-R recipient | Runs messages for given recipient only from the queue. | |
These arguments are described in the next section.
You can specify several configuration options as primitive flags. These are the c, e, i, m, T, and v arguments. Also, you can specify the f configuration option as the -s argument.
Previous | Table of Contents | Next |