Open Bug 264770 Opened 20 years ago Updated 2 years ago

Should be able to set identity to be used as reply with a message filter

Categories

(MailNews Core :: Filters, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: erik, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: helpwanted)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10.1
Build Identifier: Thunderbird version 0.8 (20040913)

Email identities are a great feature, but without the ability to automatically
use them, they're not very useful.  Eudora handles this simply with a message
filter feature - "set personality".  The personality (same as identity) is set
with an extended header, and when I reply to an email, Eudora knows which of my
dozen-plus email addresses to use, and which one of my associated signature
files to use.

I use different email addresses for different email lists and for different
companies I correspond with - this is a prime advantage of owning a domain name.
 Email list messages aren't usually addressed to the user (but to
listname@host.com), so the ability to automatically reply from an identity that
matches the To: field isn't very useful.

The ability to associate an identity with each email folder would be a usable
workaround, but it would still be incomplete.  I have related-but-different
email lists dump into the same folder currently.  Eudora Pro knows which address
to use each time I reply to one, because the solution of handling this with a
filter is such an elegant one.

Reproducible: Always
Steps to Reproduce:
1. Set up an identity
2. Receive an email that should use that identity to reply
3. Reply to the email - note that you have to manually select your identity. 
Not a viable option when you have to do it with nearly every email you write. :(

Actual Results:  
N/A (see details)

Expected Results:  
N/A (see details)

I would really like to switch to Thunderbird, because I'm using a very old email
client (Eudora Pro 4.3.2 - I didn't like versions 5 and 6 enough to buy them). 
But unfortunately, there are a number of pretty simple things that Eudora does
that Thunderbird simply can't reproduce, which make Thunderbird unfortunately
unusable for my setup.
Component: Preferences → General
Summary: RFE: Should be able to set identity to be used as reply with a message filter → Should be able to set identity to be used as reply with a message filter
Not being able set an account and/or identity with a filter is last show stopper
(inline spell is already in the trunk :) for me to switch from Eudora to TB. I
just hate to loose that functionality.

It is most noticable when I receive an email through a mailing list and TB can
not select the proper identity automaticly when replying.
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.1? → blocking-aviary1.1-
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
So if I understand correctly adding a comment (like this one) should prevent
bugzilla from auto-resolve this.

Well... here it is, since the issue is not solved yet.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This would be a dandy enhancement for reasons other than mailing lists, but I do feel that for mailing lists this is a kludge whereas 230247 is a proper fix. My message headers contain everything needed and 230247 would allow mailing lists to work with no user intervention. This feature request allows a user to create a filter for every address which is a workaround for the bug described in 230247.
(In reply to comment #4)
> This would be a dandy enhancement for reasons other than mailing lists, but I
> do feel that for mailing lists this is a kludge whereas 230247 is a proper fix.
> My message headers contain everything needed and 230247 would allow mailing
> lists to work with no user intervention. This feature request allows a user to
> create a filter for every address which is a workaround for the bug described
> in 230247.

As people have pointed out in bug 230247, that "proper fix" won't work reliably because the "Received:" header can contain multiple addresses.  In my case, it contains the address the message was meant for, and my ISP email address, which everything to my domain is forwarded to.  In the case of my alumnus email address for the university I attended, it's double-forwarded, complicating matters more.  Searching based on the last "Received" header _should_ do the trick, but there may well be instances where that won't work either.  Another poster suggests the "Original-Recipient" header - that'd be great if such a header actually existed as a standard.  I've never noticed an email with such a header, and all of the messages I look back at lack such a header.

Far from being a kludge, correcting this by giving Thunderbird filtering capabilities beyond the very basic ones it's currently got would solve this problem and numerous others.  Far less important, it would also make the Mozilla Foundation's claims about its email client true.  The Thunderbird website claims that the software has "advanced message filtering" - its filtering barely qualifies as basic compared to many other email clients.  Calling Thunderbird's filters "advanced" is a joke.  Actually _making_ them advanced (look to Eudora or a number of other clients for examples of what filtering should be capable of) would make Thunderbird so much more flexible than it currently is.
If I understand the issue in this bug, it USED TO WORK as is being requested, but stopped somewhere around the issue of 1.5 (unsure of exactly when).  Prior to this, if I replied to a message sent to one of the addresses for which I had an established identity, the reply automatically used that identity.  Now I must choose from the dropdown, when I remember to do so.

Currently using 1.5.0.2.  Note, this persists with a new profile, to which I have added no extensions.
(In reply to comment #6)
> If I understand the issue in this bug, it USED TO WORK as is being requested,
> but stopped somewhere around the issue of 1.5 (unsure of exactly when).  Prior
> to this, if I replied to a message sent to one of the addresses for which I had
> an established identity, the reply automatically used that identity.  Now I
> must choose from the dropdown, when I remember to do so.

No, this one is anbout setting the idenity with a filter.

For instance when I receive a message from a mailing list, my alias address (thus my identity) is not in the headers. TB selects the default address of the account instead of the identity that is attached to it. When I reply and forget to choose the right identity my mail is rejected by the mailing list.
Flags: blocking-thunderbird2?
Flags: blocking-thunderbird2? → blocking-thunderbird2-
Keywords: helpwanted
Blocks: eudora
This is basically the same as bug 36482.
See also bug 200872.
(In reply to comment #8)
> This is basically the same as bug 36482.
> See also bug 200872.

Agreed, though with one minor difference.  Bug 36482 suggests using something "similar to filters."  I see filters as being the solution.  Bug 200872 is quite similar too, but seems subtly different in that it appears to be suggesting an on-the-fly determination of which identity to use instead of determining it based on filters, which allow a more universal and uniform solution (one place to set all filters, instead of one email filter, one identity filter, etc).

I'm hoping that with Mozilla Foundation teaming up with Qualcomm to merge Eudora and Thunderbird, this will be OBE, because whereas Thunderbird's filters are insultingly basic, Eudora's are incredibly capable, and my proposed solution is already in Eudora, and has been for years.  Who knows how long this merger will take, though, especially given that much of Eudora's code is proprietary, and the goal is to include all of Eudora's features while redoing from scratch anything that uses proprietary code.

QA Contact: general
Assignee: mscott → nobody
This feature ought to exist for both mail and news.  I don't know whether that justifies filing another bug.
Component: General → Filters
Product: Thunderbird → MailNews Core
QA Contact: general → filters
I totally agree with the original suggestion. The addition of a "set identity" action to the filters would be a huge boon, it's one of the old Eudora features I miss most in Penelope/Thunderbird.
I'm going to be voicy on this one.
Blocks: 359260
The save template contains the account and identity identifier stored in it. Is it not used when sending the automatic reply? The report is quite old, can anybody retest it in recent TB versions?
@aceman, you apparently don't understand the need. This isn't (directly) about templates or auto replies.

It's about providing a means of associating incoming emails with specific "Personalities" (Eudora term, "Identities" in TB). Even when the incoming To: address is identical, one might want to reply using a different Identity (different signature, HTML/plain text, digital signing or encryption, etc.), based on some characteristic of the incoming email. Eudora allowed a filter to set a "Personality:" header, which would then be looked at to choose the default Personality when making a response. Thunderbird lacks that capability.
If the template had the identity (personality) stored inside it (it has, but it may be ignored), then just choosing the correct template in the filter action would basically determine the correct identity (personality). You could have the same template saved with each identity you need.
Whoosh. _What_ template? The only filter action I see associated with template is "reply with template." Do you send an automatic reply immediately to _every_ email you receive?
Looking briefly at this again, there is nothing inherently difficult about it, and would probably be within range of doing with an extension.
Doesn't/can't FiltaQuilla handle this at this point?

http://mesquilla.com/extensions/filtaquilla/
Hehe... I just noticed that you posted above me, Kent. ;-)
"Doesn't/can't FiltaQuilla handle this at this point?"

No, but it is a long standing request. I almost wrote here a long post on why that has not been done in FiltaQuilla (of which I am the author), but decided it was OT. Perhaps in a blog post or tb-planning.
(In reply to mikes from comment #16)
> Whoosh. _What_ template? The only filter action I see associated with
> template is "reply with template." Do you send an automatic reply
> immediately to _every_ email you receive?
Of course, the reply is only sent to emails that match the filter :)

It seems I really didn't understand what this bug requires. It is not automatic replies with a template. It is just marking (with a flag) incoming message with some personality. Then when you reply MANUALLY, the correct identity is chosen. Did I get it now? :)
(In reply to :aceman from comment #21)
> It is just marking (with a flag) incoming
> message with some personality. Then when you reply MANUALLY, the correct
> identity is chosen. Did I get it now? :)

Yes that is my understanding. The  marking though would be a property on the nsIMsgDBHdr and not a flag, and there is not really backend support for using that property at the moment. But I think that most of the relevant routines are js and could be overridden by an extension. But you would have to get into it to see if there are any insurmountable obstacles for an extension.
OK, thanks.
I don't want to get into it, I just tried if this isn't already solved by some existing functionality. Looks like it is valid.
Version: unspecified → Trunk
If the only object is to determine which identity to use when replying to a message *manually*, based upon sender address, then Flexible Identity (https://addons.mozilla.org/en-US/seamonkey/addon/flexible-identity/?src=api) works like a charm. In that case, and as I have just re-read this bug, I think this issue *has* been addressed with that extension (I use it daily). (I was thinking of auto-responders triggered from filters, but these, too, might be handled via Flexible Identity, depending upon whether that extension is triggered without having to manually select Reply or Compose).
None of the suggestions solve this in the general case. The Identity should be able to be set based on any filter supported criteria, and when manually replying, it should look for a header (Eudora used "Personality:") to determine the default identity. Using a header allows external processors (e.g. procmail) to create them, too.

Here's some usage examples. 

Some email reflectors (maillists) send with a To: address of the list itself, but an envelope address of the recipient. The email address it was sent to can't be extracted from the headers. So, one might want a filter which looks for an appropriate "Sender:" or "List-ID:" header and assigns an Identity based on that, so any responses originate with the proper "From:" header. 

One may use fetchmail to collect mail from multiple accounts, then want to filter on various headers to associate identities with the incoming emails. There may be different identities for the same To: address, if someone sends digitally signed email, the user may want to assign an identity which adds a digital signature on the reply, otherwise not, etc. One may want to always respond to multiple To: addresses (spam@, postmaster@, root@, etc.) with a single From: address.
Adding a header to the message itself is not a trivial task. It is possible for locally stored email, but for general IMAP requires rewriting the message in the external message store. AFAIK we do not rewrite IMAP messages like that normally.

The nsIMsgDBHdr that accompanies the message is the normal way within Thunderbird that these issues are dealt with. Yes that prevents an external handler from seeing the Personality, but by far the most common use case is to make sure that Thunderbird itself uses the correct identity when replying from within Thunderbird.

Why make this difficult, when even the simple approach is struggling to attract development time?
How about: (I'm not a developer, so this is just conceptual)

(I assume that currently the Identity property? of nsIMsgDBHdr is set based on the To: header?)
add, in order:
If Personality: xxx exists in message, copy that to Identity property of nsIMsgDBHdr. This lets external processors add a Personality: before TB sees the message.

Let Filters set or override Identity property of nsIMsgDBHdr. This handles the common case of allowing local changes.

Set Personality: header to Identity property of nsIMsgDBHdr on locally stored/archived messages. This allows mboxen to be moved to other clients/archived/restored, etc. without losing identity info, without requiring writing headers on external stores.
nsIMsgDBHdr allows you to set generic properties of the message, so we would define a new string property named, say, default-identity, then give it some string or numeric value TBD. If that property is set, it would then override the current method used to determine the default identity.

For the case of the Personality header, I don't believe that would be considered standard enough to include in the core code. But if you had the capability to set a default personality in a filter, then at least in principle you could write a filter that would read the Personality header value (which also can get set in the nsIMsgHdr object if setup correctly) and use that as the basis for setting the default identity in the filter. And the filter can apply to all messages if desired.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.