sendmail 8.10: Some new features

Last Update 2000-05-22


sendmail 8.10 introduces more new features than any previous release. For a full set, see the RELEASE NOTES in the sendmail distribution This article highlights some of those features which I consider interesting.

New directory layout and new file names

By default, sendmail 8.10 uses /etc/mail for all of its configuration files. Moreover, the names of the many configurations files have been changed; e.g., is now local-host-names, see cf/README for details.


New Maps

macro Map

A new macro storage map can be used to set or clear a macro value from within the rulesets. To set a macro, pass the value as the first argument in the map lookup. To clear a macro, do not pass an argument in the map lookup. The map always returns the empty string. Example:
Kstorage macro

# set macro {MyMacro} to the ruleset match
R$+		$: $(storage {MyMacro} $@ $1 $) $1
# set macro {MyMacro} to an empty string
R$*		$: $(storage {MyMacro} $@ $) $1
# clear macro {MyMacro}
R$-		$: $(storage {MyMacro} $) $1

arith Map

The arith map can be used to perform simple arithmetic operations. The operation is given as key, currently +, -, *, /, l (for less than), and = are supported. The two operands are given as arguments. The lookup returns the result of the computation, i.e., TRUE or FALSE for comparisons, integer values otherwise. All options which are possible for maps are ignored. Example:
Kcomp arith

R$*				$: $(comp l $@ $&{load_avg} $@ 7 $) $1
RFALSE $*		$# error ...

New Macros

{rcpt_mailer}, {rcpt_host}, {rcpt_addr}, {mail_mailer}, {mail_host}, {mail_addr} hold the results of parsing the RCPT and MAIL arguments, i.e., the resolved triplet from $#mailer $@host $:addr.

{if_name} stores the name of interface of incoming connection, {if_addr} holds the address of interface of incoming connection.

{dsn_notify}, {dsn_envid}, and {dsn_ret} hold the corresponding DSN parameter values.

{msg_size} holds the value of the SIZE= parameter, i.e., usually the size of the message (in an ESMTP dialogue), before the message has been collected, thereafter it holds the message size as computed by sendmail (and can be used in check_compat).

{deliveryMode} now specifies the current delivery mode sendmail is using instead of the value of the DeliveryMode option.

{ntries} holds the number of delivery attempts.

{load_avg} can be used to check the current load average.

Some new macros are esp. useful for anti-UBE rules.

Other New Features

Some more features (in no particular order):

PS: Take a look at libmilter/README which is supposed to solve some interesting problems... But don't expect support for it: it's an FFR: For Future Release, which means it's unsupported.

If you have non-Unix machines in your domain, you may want a filter that can block/rename attachments that get executed by clueless people (called users). I don't know how good that milter is because I don't need it and haven't taken a look at it.

[(links)] [Hints] [Avoiding UBE] [cf/README] [New]
Copyright © Claus Aßmann Please send comments to: <ca at>
Disclaimer: the information provided may be inaccurate or outdated or incomplete. Please contact me if you find an error.