-bv

Verify: don’t collect or deliver All versions

The -bv command-line switch causes sendmail to verify the list of recipients. Each recipient in the list of recipients is fully processed up to the point of delivery without actually being delivered. If mail can be successfully delivered to a recipient, sendmail prints a line such as one of the following:

name ...deliverable
name ...deliverable: mailer $# value, host $@ value, user $: value

The first form is that of pre-V8 sendmail. The second form began with V8.1 sendmail.

The name is the original recipient address after it has undergone aliasing and rule set rewriting. A local user’s name expands to the contents of that user’s ~/.forward file. A mailing list expands to many names (and produces many lines of output). The mailer, host, and user correspond to the triple returned by rule set 0 (The parse Rule Set 0 on page 696). If no $@ is returned, the host part is omitted from this output.

If the recipient cannot be delivered to, sendmail instead prints the following:

name ...reason

The reason the recipient is undeliverable can be explained by any of many possible error messages (such as “No such user”) that would prevent successful delivery.

The -bv switch also prevents sendmail from collecting any mail message from its standard input unless the -t command-line switch (-t on page 248) is also given.

Beginning with V8.12, the restrictexpand keyword for the PrivacyOptions option causes sendmail to drop special privileges when the -bv switch ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.