[horde] [ActiveSync] unable to send email

Joerg Pulz Joerg.Pulz at frm2.tum.de
Wed May 21 14:13:55 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Wed, 21 May 2014, Michael J Rubinsky wrote:

>
> Quoting "Pulz, Joerg" <Joerg.Pulz at frm2.tum.de>:
>
>> ----- Message from Michael J Rubinsky <mrubinsk at horde.org> ---------
>>    Date: Mon, 19 May 2014 14:56:36 -0400
>>    From: Michael J Rubinsky <mrubinsk at horde.org>
>> Reply-To: mrubinsk at horde.org
>> Subject: Re: [horde] [ActiveSync] unable to send email
>>      To: "Pulz, Joerg" <Joerg.Pulz at frm2.tum.de>, horde at lists.horde.org
>> 
>> 
>>>> Hi,
>>>> 
>>>> as already said, it is and was already configured (see attached 
>>>> screenshots).
>>>> It worked perfectly (with git from 2014-04-13) before i pulled from 
>>>> github and updated today.
>>>> 
>>>> As you can see in the detailed log i posted to the list, both sender and 
>>>> recipient addresses are in the mail i compose on Android.
>>> 
>>> The sender address sent from the client doesn't matter. We replace it with 
>>> the the sender from the identity that the user prefs indicate to use for 
>>> ActiveSync.
>>> 
>>>> Is there by any chance a change in the code where the account email from 
>>>> Android has to match the configured email for the identity? This is not 
>>>> the case here and was no problem in previous versions.
>>> 
>>> Nope, and in fact, this is the case for my personal install as well. The 
>>> only thing the identity email is used for related to email is setting the 
>>> From: header in SENDMAIL requests (it's also used for some stuff during 
>>> calendar syncs).
>>> 
>>> To track this down further, you should probably start looking in 
>>> Horde_Core_ActiveSync_Driver::sendMail()
>> 
>> ----- End message from Michael J Rubinsky <mrubinsk at horde.org> -----
>> 
>> Okay, i tracked this down and found the place where it breaks.
>> It's most probably commit 07bdf1e2734fbf8dc876c896315375d13c0311a6
>> 
>> For our setup every default identity is in the form
>>    lastname, firstname
>> -> e.g. Pulz, Joerg
>> 
>> The Horde WebUI displays this correct in the upper right as
>>    "lastname, firstname" <email address>
>> -> e.g. "Pulz, Joerg" <Joerg.Pulz at frm2.tum.de>
>> 
>> When i try to send an email using ActiveSync i get the following headers 
>> from the device
>>    ["from"]=>
>>    array(2) {
>>      ["h"]=>
>>      string(4) "From"
>>      ["v"]=>
>>      string(33) ""Pulz, Joerg" <jpulz at frm2.tum.de>"
>>    }
>>    ["to"]=>
>>    array(2) {
>>      ["h"]=>
>>      string(2) "To"
>>      ["v"]=>
>>      string(22) "Joerg.Pulz at frm2.tum.de"
>>    }
>> 
>> Right after this part of code in Horde_Core_ActiveSync_Driver::sendMail()
>>   1855         // Always add From: since we allow selecting the identity.
>>   1856         $headers->removeHeader('From');
>>   1857         $headers->addHeader('From', 
>> $this->_getIdentityFromAddress());
>> 
>> i get the following headers
>>    ["to"]=>
>>    array(2) {
>>      ["h"]=>
>>      string(2) "To"
>>      ["v"]=>
>>      string(22) "Joerg.Pulz at frm2.tum.de"
>>    }
>>    array(2) {
>>      ["h"]=>
>>      string(4) "From"
>>      ["v"]=>
>>      string(36) "Pulz, Joerg <Joerg.Pulz at frm2.tum.de>"
>>    }
>> 
>> As you can see, the double quotes around the fullname are missing, which at 
>> the end leads to my error "Address is missing domain".
>> 
>> For now i just modified 
>> Horde_Core_ActiveSync_Driver::_getIdentityFromAddress() to return explicit 
>> double quotes around the fullname
>>
>>    return '"' . $name . '" <' . $from_addr . '>';
>> 
>> instead of
>>
>>    return $name . ' <' . $from_addr . '>';
>> 
>> This solves my problem for now and i can send email using ActiveSync, but i 
>> think this is absolutely a hack and no clean solution.
>> 
>> A better and official fix for this problem is much appreciated.
>
> You don't by any chance ave the full: "Pulz, Joerg" <jpulz at frm2.tum.de> 
> entered in the email address field in the identity pref, do you?

No.
In the Full name field of the identity: Pulz, Joerg
In the default e-mail address fiel: Joerg.Pulz at frm2.tum.de

Regards
Joerg

- -- 
The beginning is the most important part of the work.
 				-Plato
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iD8DBQFTfLSlSPOsGF+KA+MRAidZAKCuoYSaw9FryMUOsxMLXThTrZ+HAwCaA7Mj
bbYBrVWX9eAZVeUJhw/2CNw=
=2IiB
-----END PGP SIGNATURE-----


More information about the horde mailing list