S line

Sender’s address All versions of sendmail

Each mail message must have a sender. The sendmail program can determine the sender in four ways:

  • If the sender is specified in the envelope of an SMTP connection, that sender’s address is used.

  • If the -f command-line argument is used to run sendmail, the sender’s address is the address following the -f.

  • If the sender is not specified in the envelope, the address that is used is that of the user who ran the sendmail program. If that user is unknown, the sender is made to be postmaster.

  • When processing the queue, the sender’s address is specified in the S line of the qf file.

The form of the S line in the qf file looks like this:

Saddr

The S must begin the line. Exactly one address must follow on that same line. Whitespace can surround that address. There can be only one S line in the qf file.

If the addr is missing, sendmail sets the sender to be the user who ran sendmail. If that user is not known in the passwd file (or database), sendmail syslog(3)s the following message and sets the sender to be postmaster:

Who are you?

The resulting address is then processed to extract the user’s full name into $x ($x on page 851). Finally, the sender’s address is rewritten by the canonify rule set 3, the parse rule set 0, and the final rule set 4.

Under all versions of sendmail, the address in the S line will include any RFC822 comment text that appeared with the original message. Under V8.7, if the F=c flag (F=c on page 768) is set for the sender’s delivery ...

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.