Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setting different 'from' addresses depending on recipients

13 views
Skip to first unread message

Troy Piggins

unread,
Aug 13, 2009, 7:07:02 PM8/13/09
to
I'm a member of several mailing lists. To make it easier for me
to keep track of where mail is coming from, I've started using
different email addresses for each one. eg troy_...@domain.tld
for list1, troy_...@domain.tld for list2 etc.

Trying to automate the "From: troy_...@domain.tld" by using
send-hooks, but must be getting the syntax wrong. I also tried
folder-hooks with no luck.

I've tried these so far:

send-hook '~C li...@listdomain.tld' 'set from=troy_...@domain.tld'

send-hook '~C li...@listdomain.tld' 'my_hdr "From: Troy Piggins <troy_...@domain.tld>"'

send2-hook '~C li...@listdomain.tld' 'set from=troy_...@domain.tld'

send2-hook '~C li...@listdomain.tld' 'my_hdr "From: Troy Piggins <troy_...@domain.tld>"'

folder-hook =list1 'set from=troy_...@domain.tld'

folder-hook =list1 'my_hdr "From: Troy Piggins <troy_...@domain.tld>"'

Any ideas what I'm doing wrong?

--
Troy Piggins

Christian Ebert

unread,
Aug 14, 2009, 2:13:24 AM8/14/09
to
Hi Troy,

* Troy Piggins on Thursday, August 13, 2009:


> I'm a member of several mailing lists. To make it easier for me
> to keep track of where mail is coming from, I've started using
> different email addresses for each one. eg troy_...@domain.tld
> for list1, troy_...@domain.tld for list2 etc.
>
> Trying to automate the "From: troy_...@domain.tld" by using
> send-hooks, but must be getting the syntax wrong. I also tried
> folder-hooks with no luck.
>
> I've tried these so far:
>
> send-hook '~C li...@listdomain.tld' 'set from=troy_...@domain.tld'

This one works for me.

Additionally I have set my default $from _before_:

set from="m...@example.com"

send-hook ~A ' set from="m...@example.com"'

(the space before "set" avoids clobbering the command history)

I don't think quoting the address makes a difference, but you
could try.

Which version of mutt are you using? Latest here.

c
--
\black\trash movie _C O W B O Y_ _C A N O E_ _C O M A_
Ein deutscher Western/A German Western

--->> http://www.blacktrash.org/underdogma/ccc.php

Troy Piggins

unread,
Aug 14, 2009, 2:33:26 AM8/14/09
to
* Christian Ebert wrote :

> Hi Troy,
>
> * Troy Piggins on Thursday, August 13, 2009:
> [---=| Quote block shrinked by t-prot: 7 lines snipped |=---]

>> folder-hooks with no luck.
>>
>> I've tried these so far:
>>
>> send-hook '~C li...@listdomain.tld' 'set from=troy_...@domain.tld'
>
> This one works for me.

Doesn't work here. Thinking it must be the quotes, because I
have since found this works:

send-hook li...@listdomain.tld 'my_hdr From: Troy Piggins <troy_...@domain.tld>'

> Additionally I have set my default $from _before_:

Yes. And also have to use a send-hook for all other recipients:

send-hook . 'my_hdr From: Troy Piggins <def...@domain.tld>'

> set from="m...@example.com"
>
> send-hook ~A ' set from="m...@example.com"'
>
> (the space before "set" avoids clobbering the command history)

Didn't help on the examples above.

> I don't think quoting the address makes a difference, but you
> could try.
>
> Which version of mutt are you using? Latest here.

1.5.20 patched with the rr.compressed and vvv.nntp patches.

--
Troy Piggins

James Michael Fultz

unread,
Sep 24, 2009, 12:49:11 AM9/24/09
to
* Troy Piggins <usene...@piggo.com>:
[ how to set $from in a send-hook ]
> * Christian Ebert wrote :
[ ... ]

>> Additionally I have set my default $from _before_:
>
> Yes. And also have to use a send-hook for all other recipients:
>
> send-hook . 'my_hdr From: Troy Piggins <def...@domain.tld>'

This is it. my_hdr overrides $from. Also check the setting of
$use_from -- it must be enabled else $from is ignored.

--
James Michael Fultz <xy...@sent.as.invalid>
Remove this part when replying ^^^^^^^^

Troy Piggins

unread,
Sep 24, 2009, 1:09:38 AM9/24/09
to
* James Michael Fultz wrote :

> * Troy Piggins <usene...@piggo.com>:
> [ how to set $from in a send-hook ]
>> * Christian Ebert wrote :
> [ ... ]
>>> Additionally I have set my default $from _before_:
>>
>> Yes. And also have to use a send-hook for all other recipients:
>>
>> send-hook . 'my_hdr From: Troy Piggins <def...@domain.tld>'
>
> This is it. my_hdr overrides $from. Also check the setting of
> $use_from -- it must be enabled else $from is ignored.

Thanks mate.

--
Troy Piggins

0 new messages