Am 02.12.2012 23:29, schrieb Michael Heydekamp:
> Am 01.12.2012 23:57, schrieb Michael Heydekamp:
>> Am 30.11.2012 08:12, schrieb A.L.E.C:
>>> On 11/29/2012 09:03 PM, Michael Heydekamp wrote:
>>
>>>> Ironically, the change quoted below doesn't help in all Roundcube mailing
>>>> lists, as the Delivered-To header of Roundcube list does look like this:
>>>>
>>>>> Delivered-To: [email protected]
>>>
>>> Actually your message contains two Delivered-To headers, where one is my
>>> address and it works for me.
>>
>> The mailing list message of my post (i.e. the one that I received back
>> through the list) does contain only one Delivered-To: header - the one I
>> quoted above.
>>
>>> So, does your server not add this header maybe?
>>
>> Apparently not. And why should it...? At least this isn't anything you can
>> rely on.
>
> I just realized that Exim is adding a header "Envelope-to:" instead (which
> is also not an RFC standard header, AFAIK).
>
> May I ask to support this header besides "Delivered-To:" as a last resort
> as well...? Of course I can patch the source and see if it works, shall I do
> that?
Although I did not receive an answer to that yet, I did this test just
yesterday.
But without success. Although all mailing list messages do contain a header
"Envelope-to:" and although I believe to have patched the sources correctly,
I still need to change the identity manually.
I must admit that I have no clue of PHP, so I can't tell for sure if I've
made any mistake. Diffs are attached, so you can easily check them.
In a second attempt, I tried to support both "Delivered-To:" and
"Envelope-to:", but again to no avail. These diffs are also attached. The
file names should be self-explanatory.
I also corrected a typo in those diffs ("matches" instead of "amtches" in
compose.inc). At least this "fix" should be committed. ;)
So how to proceed in this respect...?
Harald Reindl suggested to grab the recipient from the Received: headers
instead (rather than from "Delivered-To": or "Envelope-to:"), and I second
that.
But besides that, new messages are also and still an issue - quoting
myself:
> But again, even this can only be a workaround, as it doesn't work for new
> messages. But it would help, no doubt.
>
>> So I would like to throw in this question again:
>>
>> -------------------------------------------------------------------------------
>>>> Wouldn't it be worth thinking of adding an option to the addressbook? I
>>>> mean, this issue does not apply to mailing lists only (and there even to
>>>> replies only!), but also to private and business related messages. So
>>>> assigning an identity to a specific addressbook entry could really be
>>>> helpful, as it would then also apply to new messages.
>>
>>>> Of course, there would still be an issue when adding more recipients to the
>>>> To:/Cc:/Bcc: fields which may have different identities assigned, but then
>>>> the identity assigned to the first address in the To: field shall be the
>>>> one
>>>> and only to win, IMO.
>> -------------------------------------------------------------------------------
>
> I still think that this would be the best solution in the long run.
Greets,
--
Michael Heydekamp
Co-Admin freexp.de
Düsseldorf/Germany--- rcube_storage.php 2012-11-29 00:20:04.000000000 +0100
+++ rcube_storage.php.envelope_only 2012-12-05 20:38:16.000000000 +0100
@@ -64,7 +64,7 @@
'MAIL-FOLLOWUP-TO',
'MAIL-REPLY-TO',
'RETURN-PATH',
- 'DELIVERED-TO',
+ 'ENVELOPE-TO',
);
const UNKNOWN = 0;
--- compose.inc 2012-12-02 00:20:04.000000000 +0100
+++ compose.inc.envelope_only 2012-12-05 20:44:52.000000000 +0100
@@ -436,7 +436,7 @@
}
}
- // If matching by name+address doesn't found any amtches, get first found address (identity)
+ // If matching by name+address doesn't found any matches, get first found address (identity)
if ($from_idx === null) {
$from_idx = $found_idx;
}
@@ -451,10 +451,10 @@
}
}
- // Fallback using Delivered-To
- if ($from_idx === null && ($delivered_to = $MESSAGE->headers->others['delivered-to'])) {
+ // Fallback using Envelope-to (Exim)
+ if ($from_idx === null && ($envelope_to = $MESSAGE->headers->others['envelope-to'])) {
foreach ($identities as $idx => $ident) {
- if (in_array($ident['email_ascii'], $delivered_to)) {
+ if (in_array($ident['email_ascii'], $envelope_to)) {
$from_idx = $idx;
break;
}
--- rcube_storage.php 2012-11-29 00:20:04.000000000 +0100
+++ rcube_storage.php.delivered_envelope 2012-12-05 22:28:43.000000000
+0100
@@ -65,6 +65,7 @@
'MAIL-REPLY-TO',
'RETURN-PATH',
'DELIVERED-TO',
+ 'ENVELOPE-TO',
);
const UNKNOWN = 0;
--- compose.inc 2012-12-02 00:20:04.000000000 +0100
+++ compose.inc.delivered_envelope 2012-12-05 20:45:41.000000000 +0100
@@ -436,7 +436,7 @@
}
}
- // If matching by name+address doesn't found any amtches, get first found address (identity)
+ // If matching by name+address doesn't found any matches, get first found address (identity)
if ($from_idx === null) {
$from_idx = $found_idx;
}
@@ -458,6 +458,16 @@
$from_idx = $idx;
break;
}
+ }
+ }
+
+ // Fallback using Envelope-to (Exim)
+ if ($from_idx === null && ($envelope_to = $MESSAGE->headers->others['envelope-to'])) {
+ foreach ($identities as $idx => $ident) {
+ if (in_array($ident['email_ascii'], $envelope_to)) {
+ $from_idx = $idx;
+ break;
+ }
}
}
_______________________________________________
Roundcube Development discussion mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/dev