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

9.1k views Asked by At

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.

2

There are 2 answers

0
AnFi On BEST ANSWER

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

0
Sanuich On

If you are using apache2 and virtual hosts - in every *.vhost file in /etc/apache2/sites-available you can set ServerAdmin address. This record apache using to set Return-Path header address.