<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] ME's SMTP relay patch ported to CVS



On Wednesday, 07 September 2005 at 11:49, David Champion wrote:
> * On 2005.09.07, in <20050907150236.GB8839@xxxxxxxxxxxxxxxxxxx>,
> *     "Brendan Cully" <brendan@xxxxxxxxxx> wrote:
> > 
> > It'd be tempting to make $envelope_from an address (possibly renaming
> > the current $envelope_from to $use_envelope_from). This is a simple
> > thing to do, but why is it specific to the SMTP relay? ie why
> > didn't/don't we do this for the regular old sendmail interface?
> 
> 
> I think this would be nice, perhaps even wise.  Two approaches come to
> mind:
> 
> - use the existing % notation -- e.g, %f in $sendmail expands to the
>   value of $envelope_from.  But this suggests that %f expansion should
>   have boolean functionality, so that you can say
>   set sendmail="/usr/lib/sendmail %?f?-f %f?"
> 
>   What is the scope of such an expansion?  I suspect that a %f expansion
>   would apply within all variables; this might be suboptimal.  An
>   artificial scope value could be created and bound to the option as an
>   enumerated parameter of option_t, and this would provide extensible
>   expandos to a variety of options that frankly could use it, without
>   conflict.  (Just choose the appropriate scope value, or create a new
>   one.)

Right now $envelope_from causes mutt to pass -f $from to sendmail, I
believe. It'd be trivial to change this to -f $envelope_from, no
expandos required.

> - allow expansion of config variables within config variables. :)  E.g.,
>   set sendmail="/usr/lib/sendmail -f $envelope_from".

This would be nice, but it isn't necessary just for
$envelope_from. Are you just trying to sneak in a pet feature? ;)

Although personally I'd be all for expanding mutt config variables,
and well-disposed towards an if statement too. I suppose at some point
along this path the spectre of scheme bindings will rear its ugly head
again though.