Previous Section Next Section

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). 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) is set for the sender's delivery agent, all comment text is stripped from the address.

If sendmail is compiled with USERDB defined (USERDB), the sender address can optionally be rewritten by the User Database before it is placed into the S line. Such rewriting is allowed only if the delivery agent for the sender includes the F=i flag (F=i).

    Previous Section Next Section