> On Feb 20, 2019, at 1:16 PM, Stavros Tsolakos <stsola...@gmail.com> wrote: > > I am sending an email from the command line using the postfix'es > sendmail command like this: > > cat my_message | sendmail -t -r [local_virtual_sender_account] -oi > > What I want to do is completely disable receiving bounce messages in > case of error. I suspect setting the Return-Path to <> would not be > enough, as it will be overwritten by the -r (or -f) option.
Perhaps surprisingly the answers are in the sendmail(1) manpage. :-) Just one fact to keep in mind, that may not be covered. The "Return-Path" header is NOT a sender-side interface. It gets deleted when messages are queued for delivery, and is only put back on final delivery by the destination system delivering the message to the recipient's mailbox. The sendmail options you're looking for are: -i - Leading "." is just text -t - Read the recipient list from the message headers -f - Specify the envelope sender. -N - "never" or one or more of delay, failure, success The "-r" option is a legacy form of the equivalent "-f" option. -- Viktor.