The recipients of an email message can be specified or added to the message in several ways:
As each recipient is added to the internal list of recipients, sendmail updates the ${nrcpts} macro to reflect the current count. The ${nrcpts} macro can be useful in the check_compat rule set (Section 7.1.4), which is called just before delivery. The value in ${nrcpts} can be used to check the number of recipients, and to possibly refuse delivery if there are too many recipients. (See also the MaxRecipientsPerMessage option, MaxRecipientsPerMessage.) ${nrcpts} is transient. If it is defined in the configuration file or in the command line, that definition can be ignored by sendmail . Note that a $& prefix is necessary when you reference this macro in rules (that is, use $&{nrcpts} , not ${nrcpts} ). |