DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SMM:08-42
Sendmail Installation and Operation Guide
5.1.4.3. check_rcpt
The check_rcpt ruleset is passed the user name parameter of the
SMTP RCPT
com-
mand. It can accept or reject the address.
5.1.4.4. check_data
The check_data ruleset is called after the
SMTP DAT A
command, its parameter is the
number of recipients. It can accept or reject the command.
5.1.4.5. check_compat
The check_compat ruleset is passed
sender-address $| recipient-address
where $| is a metacharacter separating the addresses. It can accept or reject mail transfer
between these two addresses much like the checkcompat() function.
5.1.4.6. check_eoh
The check_eoh ruleset is passed
number-of-headers $| size-of-headers
where $| is a metacharacter separating the numbers. These numbers can be used for size
comparisons with the arith map. The ruleset is triggered after all of the headers have been
read. It can be used to correlate information gathered from those headers using the macro
storage map. One possible use is to check for a missing header. For example:
Kstorage macro
HMessage-Id: $>CheckMessageId
SCheckMessageId
# Record the presence of the header
R$*
$: $(storage {MessageIdCheck} $@ OK $) $1
R< $+ @ $+ >
$@ OK
R$*
$#error $: 553 Header Error
Scheck_eoh
# Check the macro
R$* $: < $&{MessageIdCheck}
>
# Clear the macro for the next message
R$*
$: $(storage {MessageIdCheck} $) $1
# Has a Message-Id: header
R< $+ >
$@ OK
# Allow missing Message-Id: from local mail
R$* $: < $&{client_name}
>
R< >
$@ OK
R< $=w >
$@ OK
# Otherwise, reject the mail
R$*
$#error $: 553 Header Error
Keep in mind the Message-Id: header is not a required header and is not a guaranteed spam
indicator. This ruleset is an example and should probably not be used in production.
5.1.4.7. check_etrn
The check_etrn ruleset is passed the parameter of the
SMTP ETRN
command. It can
accept or reject the command.