Why do "bounces" go to the wrong address when I use Sendmail?

This page is showing a generic answer.
To see a more detailed answer customized for you, type your domain name here:

When your script sends messages using Sendmail, the script can specify the "bounce" address (also called the "envelope sender" or "Return-Path" address). If you don't specify a bounce address, the bounce address will default to a special address that forwards to the administrative contact address we have on file for your account.

To specify a bounce address, use the "-f" option when running Sendmail, like this:

/usr/sbin/sendmail -f 'address@example.com'

The address must end with your domain name to be accepted by our mail servers.

You can test your script by sending yourself a message and looking at the full headers of the message: the bounce address will be shown in a line marked "Return-Path:". If you're not sure how to change your script to use the correct bounce address, you should contact the author of the script for assistance.