Setting From: address for lists dependent on receiver address
I have a problem that for instance on this mutt list, I normally don't
get an indication of how I received this mail in standard mail headers.
And my address for this email list is different from my normal address.
However this address is recorded on my system in a header X-Original-To:
and such a header can be made available on other systems too.
I am then wondering how to get this info into my From: header.
I don't see ways to get it there via some hook command.
I only see that I could do it via some external program executed in some
backpling shell program. Like in .muttrc:
set from=`get-original-to $this-mail default@xxxxxxxxxx`
and then get-original-to :
#!/bin/sh
orig=`grep X-Original-To: $1 | head -n 1 | cut -d ' ' -f 2`
# also take care of localhost address without "." :
localaddress=`echo $orig | grep '\\.'`
if [ "$orig" = "" -o "$localaddress" = "" ] ; then
orig=$2;
fi
echo $orig
... But I dont see how I can get the current email passed to the shell
in the backpling string. How can that be done?
or is there a better way?
Best regards
keld