Improper identity selection of forwarded mail
|Reported by:||cgallek||Owned by:|
I noticed this problem when updating from Ubuntu maverick to natty (roundcube versions 3.1 -> 5.1). However, I believe the change that caused this problem (4032) is still present in the head revision.
I've got many external email accounts, all of which I forward to my personal domain. I have an roundcube identity setup for each of these external accounts. In the previous version of roundcube, when I would reply to one of these messages which came to an external account, the appropriate identity would automatically be selected in the 'sender' field when I reply to a message. This is no longer happening in the 5.1 version.
The issue seems to be the else if clause at line 295 of roundcubemail/program/steps/mail/compose.inc (in the head revision). This appears to be an improper use of the Return-Path header. For example, the Return-Path header for mail forwarded from gmail contains the following header:
The fact that my local account identity is the default identity (first in the array of identities) and the fact that it shows up in this header means that it is always selected as the 'sender' identity.
I'm not completely sure I understand why this else clause was added, so I'm not really sure how to suggest fixing it, but simply removing it fixes the problem I'm experiencing. The comment seems to suggest that it's used in order to select a mailing list identity rather than an email address, but I don't believe this is a valid use of the Return-Path header. Perhaps List-ID is more appropriate?