O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

List of Recipient Addresses

All command-line arguments that follow the switches (if any) are taken to be the addresses of recipients. The addresses in the list can be separated by spaces, by commas, or by both:

addr1 addr2 addr3
addr1,addr2,addr3
addr1, addr2, addr3

Certain modes specified by the -b command-line switch, such as -bp (for print the queue’s contents), cause sendmail to ignore any list of recipients.

Be sure to escape any characters in addresses that have special meaning to your shell. For example, because the ! character has special meaning to the C shell,[4] it should be escaped by preceding it with a backslash character:

host\!user

If sendmail expects a list of recipients and finds none, it prints the following message and exits:

Recipient names must be specified

Note that under some circumstances, sendmail might try to collect the message before issuing this error.

[4] And its derivatives such as tcsh(1).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required