''FEATURE(local_procmail)'' '''


Use procmail(1), etc. as local delivery agent V8.7 and above

The procmail(1) program can handle a user's mail autonomously (for example, sorting incoming mail into folders based on subject) and can function as a sendmail delivery agent. Some administrators prefer procmail(1) in this latter role over normal Unix delivery agents. If this is your preference, you can easily use procmail(1) in that role with the local_procmail feature:


The local_procmail feature changes the P=, F=, and A= equates for the local delivery agent into:

P=/usr/local/bin/procmail               see P= 
F=SPfhn9                                see F= 
A=procmail -Y -a $h -d $u               see A= 

If you have installed procmail in a different location, you can specify that alternative location with a second argument:

FEATURE(`local_procmail', `/admin/mail/bin/procmail')

Beginning with V8.10, sendmail allows this local_procmail feature to accept additional arguments to define the A= values (set with LOCAL_MAILER_ARGS; See this section), and the F= values (set with LOCAL_MAILER_FLAGS; See this section). Those additional arguments were added to support other programs in addition to procmail(1), such as maildrop(1) and scanmails(1).[6] They are used like this:

[6] See cf/README for examples of how to use this feature with maildrop(1) and scanmails(1).

FEATURE(`local_procmail', `/admin/mail/bin/procmail', `A= stuff here', `F= stuff here' ) 

If you need to specify command-line arguments different from the defaults shown earlier, you can do so either with the second argument (the A= stuff here), or by using the LOCAL_MAILER_ARGS (See this section) mc macro:

define(`LOCAL_MAILER_ARGS', `procmail -Y -a hidden.domain -d $u')

If you need to use F= flags different from those shown, you can do so either with the third argument (the F= stuff here), or by using the LOCAL_MAILER_FLAGS (See this section) mc macro:

define(`LOCAL_MAILER_FLAGS', `SPfhn')

Both must follow the local_procmail feature.

Use another program instead of procmail

You can also use the local_procmail feature (FEATURE(local_procmail)) to include support for the other programs. For example, the following line in your mc can be used to change the local delivery agent to use the maildrop(8) program:

FEATURE(`local_procmail', `/usr/local/bin/maildrop', `maildrop -d $u')

But before you do this, first create a configuration file without this feature that looks at the F= delivery agent equate for the local delivery agent. Then add the earlier line and create another configuration file. Note any differences between the F= delivery agent equates from the two configuration files and decide which are important to retain. If you decide that there are more F= delivery agent flags to retain than were created by the local_procmail feature, you can create a superset and add that superset declaration to the local_procmail feature like this:

FEATURE(`local_procmail', `/usr/local/bin/maildrop', `maildrop -d $u', `SPfhn9A')

The maildrop(8) program is intended for use only with Intel-based architectures, and is available with Debian GNU/Linux from http://packages.debian.org/stable/mail/maildrop.html.

Note that, despite our description of maildrop(1) in this section, you can use this local_procmail feature to install other programs in the role of the local delivery program. But test carefully before releasing any new program in this role.

    Part I: Build and Install
    Chapter 2. Build and Install sendmail
    Chapter 4. Configure sendmail.cf with m4
    Part II: Administration
    Part III: The Configuration File