From mboxrd@z Thu Jan 1 00:00:00 1970 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Wed, 23 Jan 2008 17:47:12 -0500 Subject: [sup-talk] return-path In-Reply-To: <1201125726-sup-1297@south> References: <20080123211318.GB31529@manheim.library.drexel.edu> <1201125726-sup-1297@south> Message-ID: <20080123224712.GB32356@manheim.library.drexel.edu> On Wed, Jan 23, 2008 at 02:12:07PM -0800, William Morgan wrote: > Reformatted excerpts from Gabriel Sean Farrell's message of 2008-01-23: > > I'm writing this message in mutt instead of sup because I send my > > email via a postfix relay-host and mutt allows me to set my > > Return-Path equal to my "From:" address with "set envelope_from=yes". > > If I don't do this, my email is often rejected from mailing lists. > > > > I believe other email clients default to this behavior (see > > http://www.mail-archive.com/mutt-users at mutt.org/msg26743.html for the > > post I'm basing my assumption on). Could sup follow that, or at least > > allow the option? > > The Sup way to do this is to have the following line in your > ~/.sup/hooks/before-edit.rb: > header["Return-Path"] = header["From"] > > Unfortunately, you have to apply the following patch or Sup simply > discards that header. There's a better solution, which is to make Sup > not discard any headers set by the user when composing email, and I will > take it as a bugfix task to implement that for the next release. > > diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb > index 0ce52fe..55dd44f 100644 > --- a/lib/sup/mbox.rb > +++ b/lib/sup/mbox.rb > @@ -32,6 +32,7 @@ module MBox > /^(List-Post):\s+(.*?)\s*$/i, > /^(List-Subscribe):\s+(.*?)\s*$/i, > /^(List-Unsubscribe):\s+(.*?)\s*$/i, > + /^(Return-Path):\s+(.*?)\s*$/i, > /^(Status):\s+(.*?)\s*$/i: header[last = $1] = $2 > when /^(Message-Id):\s+(.*?)\s*$/i: header[mid_field = last = $1] = $2 I've added the line and applied the patch. Now I see "Return-Path" in the headers of my message before I send it, but when I receive it the return-path is still the one I was trying to override. Could the one I set still be getting stripped out?