Sorry typo amendment...

8. "reverse_name" worked "From: customerserv...@domain.com" is set and "my_hdr" 
worked! "Cc: ot...@domain.com"

On 2010-04-15 17:23+0100, 'Mash wrote:
>
> Okay now this is very strange...
>
> set from="Name <n...@domain.com>"
> alternates "customerserv...@domain.com"
> set reverse_name=yes
> send-hook '~f customerserv...@domain.com' 'my_hdr Cc: ot...@domain.com'
>
> 1. start mutt
> 2. hit "r" to reply to an email that has been sent to 
> "customerserv...@domain.com"
> 3. edit message, save, exit editor
> 4. "reverse_name" worked "From: customerserv...@domain.com" is set but "Cc:" 
> is empty
> 5. hit "q" and do not send message
> 6. hit "r" on the very same message as before
> 7. edit message, save, exit editor
> 8. "reverse_name" worked "From: customerserv...@domain.com" is set and 
> "my_hdr" worked! "Cc: customerserv...@domain.com"
> 9. hit "r" or "g" on any further messages and all messages get the "my_hdr" 
> change.
>
> No really I have tested this 20 times now, hit reply once and it wont work. 
> Hit reply on the same message again and for all further messages mutt starts 
> to use the "send-hook". It's like you have to kick mutt into action first. 
> Strange?! You only have to do this double reply once and all further replies 
> appear to use the "send-hook" correctly.
>
>
> BUT this setup will not work...
>
> set from="Name <n...@domain.com>"
> alternates "customerserv...@domain.com"
> set reverse_name=yes
> send-hook '~f customerserv...@domain.com' 'my_hdr Cc: 
> customerserv...@domain.com'
>
> If you set the "my_hdr" to set the "Cc:" to the same address as your "From:" 
> it will NOT accept the change no matter how many times you try, "Cc:" will 
> always be empty. I have tested this many times now and can replicate it. 
> Every string but what is exactly the same as your "From:" is allowed. Strange 
> but true.
>
>
> The reason for me wanting to do this is that I work with another colleague 
> and all emails sent to "customerserv...@domain.com" get sent to both of us. 
> What I wanted to happen is that though my primary address is 
> "n...@domain.com"; when emails get sent to "customerserv...@domain.com" and I 
> reply, I want "reverse_name" to correctly change my "From: 
> customerserv...@domain.com" but also set "Cc: customerserv...@domain.com" so 
> that my colleague can see my reply.
>
> This is working 90%, though like I showed you have to kick start mutt to use 
> the "send-hook".
> Is there something that I can set to allow an email to have the same address 
> in "From:" and "Cc:" is this actually something mutt disallows somehow to 
> avoid loops?
>
> Hopefully this email makes sense, I have tried to be as clear as possible 
> with the test replication.
>
> 'Mash
>
> On 2010-04-15 08:40-0700, Michael Elkins wrote:
> > Hi Mash,
> >
> > On Thu, Apr 15, 2010 at 04:12:04PM +0100, 'Mash wrote:
> >> I have "reverse_name" turned on and was wondering if it is possible to set 
> >> a reply-hook to set the "Cc:" depending on which address I am replying 
> >> from?
> >>
> >> reply-hook '~f exam...@domain\.com' 'my_hdr Cc: someth...@domain\.com'
> >
> > Unfortunately this is not possible.  Mutt processes the my_hdr commands
> > that contain email recipients in them prior to evaluating
> > send-hook/reply-hook, so the my_hdr command won't have any effect on the
> > message you are currently sending.  The reason for processing those
> > headers first is so the user can match on them in the hooks.  This is
> > something we need to spend some time figuring out a solution to, since it
> > comes up occasionally.  It's sort of a chicken-and-egg type problem.
> >
> > me
>
>

Reply via email to