Re: send-hook's based on what alternate was used
On Sun 07 Sep 2003 at 12:52pm +0200, Johan Svedberg wrote:
> * Sep 07 12:01 Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>:
> > On 2003-09-07 00:57:31 +0200, Johan Svedberg wrote:
> >
> > >> Well I tried it. It appears that send-hook does not understand
> > >> '~f' pattern. At least my version of mutt complains "unknown
> > >> variable".
> >
> > That sounds like you have a mistake in your hooks -- send-hook
> > certainly understands ~f. Could you post your precise send-hooks to
> > the list?
>
> Sure. I'll just explain the context first; I'm trying to improve my
> send-hook's so that they work based on which of my $alternates was
> chosen as From-address. This is what I've been trying:
>
> send-hook . "unmy_hdr From: Johan Svedberg <johan@xxxxxxxxxxxxxx>"
I think maybe you are using unmy_hdr wrong -- it seems to want
only the header field names as arguments. The above is
effectively the same as
send-hook . "unmy_hdr from"
assuming you don't have "Johan:" etc. header fields. So it is
probably un-doing any and all previous "my_hdr from" commands.
> send-hook . 'my_hdr Message-ID: <`date +"%Y%m%d%H%M% S"`.GA`(id; echo $$;
> date) | openssl md5 | cut -c 1-5`.johan@xxxxxxxxxxxxxx>'
Looks like a space might have crept into your date format, BTW.
> send-hook "~f dv03jsg@xxxxxxxxx" 'my_hdr Message-ID: <`date
> +"%Y%m%d%H%M%S"`.GA `(id; echo $$; date) | openssl md5 | cut -c
> 1-5`.dv03jsg@xxxxxxxxx>'
>
> The problem I'm getting is that the default (.) Message-ID is used even
> when i have dv03jsg@xxxxxxxxx in my From-header. Switching the order of
> the above doesn't help. What am I missing?
>
> --
> Johan Svedberg, johan@xxxxxxxxxxxxxx, http://johan.svedberg.pp.se/
>
--
John