20.3 The mc Configuration Syntax

Under V8 sendmail 's mc configuration technique you include delivery agent definitions in your configuration file using the MAILER( ) mc command. The form for that command looks like this:

 MAILER(`  name')  

For example, SMTP and UUCP support can be included in your file by using the following two commands:

 MAILER(`smtp') MAILER(`uucp') 

If you include MAILER definitions for procmail , or uucp , those definitions must always follow the definition for smtp . Note, too, that any modification of a MAILER definition (as, for example, with UUCP_MAILER_MAX) must precede that MAILER definition:

 define(`UUCP_MAILER_MAX', `1000000')   here  MAILER(`uucp') define(`UUCP_MAILER_MAX', `1000000')   not here  

The delivery agent M definitions that correspond to MAILER( ) commands are kept in the cf/mailer directory.

In general, the files in the cf/mailer directory should never be modified. If one of the definitions needs to be tuned , use the special keywords described under the individual delivery agent equates (Section 20.5). For example, the following line modifies the maximum message size (the M= delivery agent equate, M=) for the UUCP agent:

 define(`UUCP_MAX_SIZE',`1000000') 

Here, the maximum size of a UUCP message has been increased from the default of 100,000 bytes to a larger limit of 1,000,000 bytes.

20.3.1 Choose Preferred Agents

Four mc configuration macros are available, beginning with V8.10 sendmail , to help you choose the delivery agent you prefer in various situations.

20.3.1.1 confSMTP_MAILER

The confSMTP_MAILER mc configuration macro is used to specify your preference for the delivery agent to handle outbound SMTP connections. If you don't define confSMTP_MAILER , the default is esmtp (See this section). Other legal choices are relay (See this section), smtp (smtp, etc.), smtp8 (See this section), and dsmtp (See this section):

 define(`confSMTP_MAILER', `dsmtp') 

Note that if you make a typo in the name, the error will not be detected until you actually try to send email. For example, if you misspelled dsmtp as xsmtp , you would see the following message printed and logged when trying to send a message to another machine:

 buildaddr: unknown mailer xsmtp 

In general, all defined mc configuration macros should precede the associated MAILER definition, but for confSMTP_MAILER , this is only a recommendation, not a requirement.

20.3.1.2 confUUCP_MAILER

The confUUCP_MAILER mc configuration macro is used to specify your preference for the delivery agent you prefer for handling UUCP. The default is uucp . Other possible values are uucp-old , uucp-new , uucp-dom , and uucp-uudom (see Section 4.6 for a discussion of these choices):

 define(`confUUCP_MAILER', `uucp-dom') 

If you relay all UUCP mail offsite to a special host with a UUCP modem connection, it is reasonable to use relay for the delivery agent:

 define(`confUUCP_MAILER', `relay') 
20.3.1.3 confLOCAL_MAILER

The confLOCAL_MAILER mc configuration macro is used to specify the delivery agent you prefer for local delivery. This is almost always local . The default for Cyrus users is cyrus . In the rare circumstance that you need to change this, you can declare something like this:

 define(`confLOCAL_MAILER', `newlocal') 

See this section for an illustration of one use for this mc configuration macro.

20.3.1.4 confRELAY_MAILER

The confRELAY_MAILER mc configuration macro is used to specify your preference for the delivery agent you prefer to perform relaying to another machine. You might relay, for example, to a SMART_HOST (Section 4.3.3.6) or to a BITNET_RELAY ($B).

The default for this mc configuration macro's value is relay (See this section), which is the delivery agent for relaying mail to another host or hosts . One possible alternative might be:

 define(`confRELAY_MAILER', `uucp-new') 

This would be reasonable if you are on a UUCP-only connected site.

20.3.2 Tuning Without an Appropriate Keyword

Unfortunately, not all delivery agent equates can be tuned with mc configuration macros. The U= delivery agent equate for the usenet agent is one example. To change such a value, you need to copy the original definition, modify it, and put the modified definition in your local mc configuration file. For example, to add a U= delivery agent equate to the Usenet delivery agent, you might do the following: [3]

[3] We are fudging here. The grep (1) won't work because the Musenet definition is split over three lines. Instead, you need to use your editor to cut and paste.

 %  grep -h Musenet cf/mailer/*  Musenet,    P=USENET_MAILER_PATH, F=USENET_MAILER_FLAGS, S=10, R=20,             _OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix,             A=USENET_MAILER_ARGS $u 

Here, the prototype definition for the usenet delivery agent is found. Copy that definition into your mc configuration file and add the missing delivery agent equate:

 MAILER(usenet) MAILER_DEFINITIONS Musenet,   P=USENET_MAILER_PATH, F=USENET_MAILER_FLAGS, S=10, R=20,  U=news:news,  _OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix,             A=USENET_MAILER_ARGS $u 

First, the MAILER( ) m4 command causes initial support for the usenet delivery agent to be included. The MAILER_DEFINITIONS section (Section 20.3.3.1) then introduces your new delivery agent definition. Your new definition follows , and thus replaces , the original definition.

Create a new configuration file, and run grep (1) run to check the result:

 %  make our.cf  %  grep ^Musenet our.cf  Musenet,        P=/usr/lib/news/inews, F=rlsDFMmn, S=10, R=20, Musenet,        P=/usr/lib/news/inews, F=rlsDFMmn, S=10, R=20, U=news:news, 

20.3.3 Create a New mc Delivery Agent

From time to time you might need to create a brand-new delivery agent. To create a new delivery agent with the mc system, first change to the cf/mailer directory. Copy an existing m4 file, one that is similar to your needs. Then edit that new file, and include it in your configuration file with:

 MAILER(newname) 

Note that the MAILER mc configuration command automatically prefixes the name with the following (where _CF_DIR_ is described in Section 4.2.1):

 _CF_DIR_/mailer/ 

and adds the suffix .m4 , here forming cf/mailer/newname.m4 .

Be aware, however, that creation of a new delivery agent is not for the fainthearted. In addition to the delivery agent definition you might also need to create brand-new S= and R= rules and rule sets.

20.3.3.1 MAILER_DEFINITIONS

Prior to V8.8 sendmail you had to use a divert(7) statement to force your new delivery agent definitions to be grouped with all the other delivery agent definitions. Beginning with V8.8, this bit of "black magic" has been removed.

To force new delivery agent definitions to be grouped with the other delivery agent definitions, use the MAILER_DEFINITIONS m4 command. For example:

 MAILER_DEFINITIONS  place your new delivery agent definitions here  

See Section 20.3.2 for an example of this m4 command.



Sendmail
sendmail, 4th Edition
ISBN: 0596510292
EAN: 2147483647
Year: 2002
Pages: 1174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net