home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

F=

Delivery agent flags All versions

The F= delivery agent equate is probably more fraught with peril than the others. The delivery agent flags specified with F= tell sendmail how the delivery agent will behave and what its needs will be. These delivery agent flags are used in one or more of three ways.

First, if a header definition relies conditionally on a delivery agent flag:

H?P ?Return-Path: <$g >
   
   apply if P delivery agent flag is specified in F= delivery agent equate

and if that delivery agent flag is listed as a part of the F= delivery agent equate:

Mlocal, P=/bin/mail, F=rlsDFMmnP , S=10, R=20, A=mail -d $u
                                
                                apply in header

that header is included in all mail messages that are sent via this delivery agent.

Second, if a delivery agent needs a special command-line argument that sendmail can produce for it but requires that argument only under special circumstances, selected F= delivery agent flags can produce that result. For example, the F=f delivery agent flag specifies that the delivery agent needs a -f command-line switch when it is forwarding network mail.

Third, the F= delivery agent flags also tell sendmail how this particular delivery agent behaves. For example, the F= delivery agent flag might specify that it perform final delivery or require that it preserve uppercase for usernames.

Many delivery agent flags have special meaning to sendmail; others are strictly user-defined. All the delivery agent flags are detailed at the end of this chapter (Section 20.8).

Note that whitespace characters cannot be used as delivery agent flags. Also note that delivery agent flags OR together (they are really just bits), so they can be declared separately, for clarity, as in the following:

F=D,     # include Date: header if not present
F=F,     # include From: header if not present
F=7,     # strip the high-bit when delivering

Or they can be declared all together, with no change in meaning or effect, like this:

F=DF7,

Note that the argument following the F= is optional, and an empty declaration is silently ignored. Also note that the comma can be used as a delivery agent flag by prefixing it with a backslash.

The MODIFY_MAILER_FLAGS mc macro

Beginning with V8.10 sendmail it is possible to delete from, add to, and modify delivery agent flags with a single command. The MODIFY_MAILER_FLAGS command is used like this:

MODIFY_MAILER_FLAGS(`which', `change')  

Here, which is the first part (up to the underscore) of any of the _MAILER_FLAGS shown for the various delivery agents, beginning in Section 20.4. That is, name_MAILER_FLAGS, for example, could be SMTP_MAILER_FLAGS, thus causing which to become SMTP. This name is case-sensitive and must match the case of the _MAILER_FLAGS you use (SMTP and LOCAL will work, but smtp and local will not).

Thus, to add an F=% to the smtp8 delivery agent, you could use this command:

MODIFY_MAILER_FLAGS(`SMTP', `+%')

But be aware that this modifies all the delivery agents that are associated with the SMTP_MAILER_FLAGS mc configuration macro, not just the smtp8 delivery agent.

You can also use MODIFY_MAILER_FLAGS to remove delivery agent flags by prefixing the change with a minus character:

MODIFY_MAILER_FLAGS(`RELAY', `-a')

Here, the intention is to remove ESMTP support from the relay delivery agent.

The MODIFY_MAILER_FLAGS command can also be used to totally replace all a delivery agent's delivery agent flags with a whole new set. To replace, just omit the plus or minus from the front of change:

MODIFY_MAILER_FLAGS(`SMTP', `mDFMuXa8')

Here, all the delivery agents associated with the SMTP_MAILER_FLAGS mc configuration macro will have their delivery agent flags set to the common set mDFMuXa8.

As a final caution, note that the local_lmtp (FEATURE(local_lmtp)) and procmail (FEATURE(local_procmail)) features unconditionally set their LOCAL_MAILER_FLAGS, and that those delivery agent flags can only be overridden with this MODIFY_MAILER_FLAGS command, if it follows the feature:

FEATURE(`local_lmtp')                must be first
MODIFY_MAILER_FLAGS(`LOCAL', `-P')

Pre-V8.10 mc modification of F=

Prior to V8.10 sendmail, you could use your mc configuration to modify various delivery agent flags for inclusion with most delivery agents. Some modifications were made by appending the new delivery agent flags to the original delivery agent flags. Others are made by replacing a few delivery agent flags with new ones and appending the result to the originals. For example, the following declaration:

define(`LOCAL_MAILER_FLAGS', `Prmn9f')            first
MAILER(`local')                                   second

resulted in these delivery agent flags being defined for the local delivery agent:

lsDFMAwq5:/|@Prmn9f

Here, the lsDFMAwq5:/|@ flags were retained, and the f flag was added. The Prmn9 flags would have been replaced if we had not restated them.

See cf/README to learn which are retained and which are replaced. For example, the following extract from that file illustrates the earlier example:

LOCAL_MAILER_FLAGS      [Prmn9] The flags used by the local mailer.  The
                        flags lsDFMAw5:/|@q are always included.

See the section describing a particular delivery agent to find an appropriate mc macro with which to redefine the F= for that delivery agent. See Table 20-1, in Section 20.4, for a guide to all delivery agents.

Beginning with V8.10 sendmail you instead use the MODIFY_MAILER_FLAGS mc command described in the previous section.

    Previous Section Next Section