sendmailreturn-path

Is there a way to change the default return path with sendmail?


I know that I can use the -f switch to set the return path with sendmail, I am wondering if it is possible to change the default return path somewhere, or if the only way is to set it per send.


Solution

  • You may use FEATURE(genericstable) to rewrite sender addresses.

    By default genericstable changes only "header sender" addresses.

    FEATURE(masquerade_envelope) turns on also rewriting "envelope sender" address (which may be set by -f)

    FEATURE(allmasquerade) turns on also rewriting "header recipients" (addresses in To: and Cc: headers)

    https://www.sendmail.com/sm/open_source/docs/m4/masquerading_relaying.html