[horde] Can't send to BCC or CC without To: using activesync

Michael J Rubinsky mrubinsk at horde.org
Sat Feb 6 18:45:48 UTC 2021


Quoting Brent <impuser at bitrealm.com>:

> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting Brent <impuser at bitrealm.com>:
>>
>>> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>>>
>>>> Quoting Brent <impuser at bitrealm.com>:
>>>>
>>>>> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>>>>>
>>>>>> Quoting Brent <impuser at bitrealm.com>:
>>>>>>
>>>>>>> Trying to send an email with ONLY the BCC field filled out  
>>>>>>> using ActiveSync.  Device says "the message was rejected by  
>>>>>>> the server".  Same happens with CC-only filled out and  
>>>>>>> omitting the To: field.
>>>>>>>
>>>>>>> Checking the horde logs, I find:
>>>>>>>
>>>>>>> NOTICE: HORDE PHP ERROR: Undefined index: To [pid 1278 on line  
>>>>>>> 305 of "/usr/share/pear/Horde/Core/ActiveSync/Mail.php"
>>>>>>>
>>>>>>> Line 305 is this:
>>>>>>>  $recipients = $h_array['To'];
>>>>>>>
>>>>>>> Function area:
>>>>>>>
>>>>>>>  protected function _sendRaw()
>>>>>>>     {
>>>>>>>         $h_array = $this->_headers->toArray(array('charset' =>  
>>>>>>> 'UTF-8'));
>>>>>>>         $recipients = $h_array['To'];
>>>>>>>         if (!empty($h_array['Cc'])) {
>>>>>>>             $recipients .= ',' . $h_array['Cc'];
>>>>>>>         }
>>>>>>>         if (!empty($h_array['Bcc'])) {
>>>>>>>             $recipients .= ',' . $h_array['Bcc'];
>>>>>>>             unset($h_array['Bcc']);
>>>>>>>         }
>>>>>>>
>>>>>>> Seems that $h_array['To'] is undefined and it bombs out?
>>>>>>>
>>>>>>> Not sure of the proper fix for this.  I can send email using  
>>>>>>> Horde/Imp with only the CC or BCC field filled out, this only  
>>>>>>> seems to be happening using an ActiveSync device.
>>>>>>
>>>>>> Try what I just committed:
>>>>>>
>>>>>> https://github.com/horde/Core/commit/97c1705fc59d23e086c70032b8f8c733955f69ff
>>>>>>
>>>>>> I'll release it to Pear as soon as I have the time.
>>>>>>
>>>>>>> brent
>>>>>>> --
>>>>>>> Horde mailing list
>>>>>>> Frequently Asked Questions: http://horde.org/faq/
>>>>>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>>>>>
>>>>>> --
>>>>>> mike
>>>>>> The Horde Project
>>>>>> http://www.horde.org
>>>>>> https://www.facebook.com/hordeprojecthttps://www.twitter.com/hordeproject
>>>>>
>>>>> Well, I applied the patch and I'm still getting the error on the  
>>>>> device that "The message was rejected by the server".   I am not  
>>>>> seeing the error in the horde logs any longer.  I don't see any  
>>>>> maillog or apache errors either.  I cleared my php session cache  
>>>>> and restarted.  I'm not sure how else I can help.  I'll keep  
>>>>> looking.
>>>>
>>>> Try checking your SMTP server's mail.log file for any errors. I  
>>>> just tested this locally with only a cc and then again with only  
>>>> a BCC and it successfully sent the email.
>>>>
>>>>> Thanks for the fast response!
>>>>>
>>>>> brent
>>>>>  
>>>>
>>>> --
>>>> mike
>>>> The Horde Project
>>>> http://www.horde.org
>>>> https://www.facebook.com/hordeprojecthttps://www.twitter.com/hordeproject
>>>
>>> I've dug through any/all mail logs (using postfix).  The mail is  
>>> NOT being sent to the SMTP server.  This is on IOS, I don't have  
>>> another device handy to try.  I CAN send fine using IMP/Dimp and  
>>> using mutt by only having the BCC or CC line set with the To line  
>>> empty.  It doesn't appear to be a local error, but something funky  
>>> with Apple, probably? 
>>
>> It could be the way iOS is encoding the wbxml for the email with  
>> the missing To. The Second error you listed below also points to  
>> something funky going on with the wbxml. Essentially it's saying  
>> that something we expect to be there is not present. The only way  
>> to debug this further is to look at a detailed activesync log  
>> captured during the attempted email.
>>
>>> I note that there's a configuration entry for Active Sync logging  
>>> ( $conf[activesync][logging][path]).  I have this set to a file,  
>>> but the file is never generated?  Trying to get more detail out of  
>>> this error.
>>
>> If you are selecting to output a file for each device (which you  
>> should be), then this configuration value should be a directory  
>> path, not a file path. I.e., the directory to place the individual  
>> log files. The files are named after the deviceIds that they are  
>> capturing for.
>>
>>> I have two other "ERORRS" showing in my horde.log, but these occur  
>>> when devices are just checking in and not doing any sending.  It  
>>> would be interesting to know what they are, but they don't appear  
>>> to be impacting this.
>>>
>>> Other errors are:
>>>
>>> 021-01-25T13:20:02-08:00 NOTICE: HORDE [horde] PHP ERROR: Trying  
>>> to access array offset on value of type null [pid 5013 on line 146  
>>> of "/usr/share/pear/Horde/Themes/Element.php"]
>>> 2021-01-25T13:20:59-08:00 NOTICE: HORDE PHP ERROR: Trying to  
>>> access array offset on value of type null [pid 2721 on line 224 of  
>>> "/usr/share/pear/Horde/ActiveSync/Wbxml/Decoder.php"]
>>>
>>> brent
>>
>> --
>> mike
>> The Horde Project
>> http://www.horde.org
>> https://www.facebook.com/hordeprojecthttps://www.twitter.com/hordeproject
>
> Ok, I got my logging working(permissions issue on the logging  
> directory).  The error is in ActiveSync:
>
> [1278][2021-02-01T08:15:27-08:00] INFO:  
> ----------Horde_Core_ActiveSync_Driver::authenticate() attempt for  
> testuser----------
> [1278][2021-02-01T08:15:27-08:00] INFO: ----------SENDMAIL request  
> received for user testuser
> [1278][2021-02-01T08:15:27-08:00] INFO: ----------Request being  
> handled for device: HAEIF84UUH4TF3R224PPJ6NJOG, of type: iPhone,  
> supporting protocol version: 14.1, using Horde_ActiveSync v2.41.5
> [1278][2021-02-01T08:15:27-08:00] I: <ComposeMail:SendMail>
> [1278][2021-02-01T08:15:27-08:00] I:  <ComposeMail:ClientId>
> [1278][2021-02-01T08:15:27-08:00] I:    9B2D9134-2839-4CE4-9F8E-CBADA7B12AE0
> [1278][2021-02-01T08:15:27-08:00] I:  </ComposeMail:ClientId>
> [1278][2021-02-01T08:15:27-08:00] I:  <ComposeMail:SaveInSentItems />
> [1278][2021-02-01T08:15:27-08:00] I:  <ComposeMail:MIME>
> [1278][2021-02-01T08:15:27-08:00] I:    [302 bytes of content]
> [1278][2021-02-01T08:15:27-08:00] I:  </ComposeMail:MIME>
> [1278][2021-02-01T08:15:27-08:00] I: </ComposeMail:SendMail>
> [1278][2021-02-01T08:15:27-08:00] ERR: Error when parsing dot-atom.



This error isn't about having an empty To:, but rather about the email  
address being unable to be parsed. It's failing a check for a valid  
email address.  Can you provide the actual email address that you are  
trying to send to? You can send it to me privately at  
mrubinsk at horde.org if you wish.



> [1278][2021-02-01T08:15:27-08:00] ERR: Message headers:  
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> MIME-Version: 1.0 (1.0)
> Date: Mon, 1 Feb 2021 08:15:26 -0800
> Subject: Test
> Message-ID: <9B2D9134-2839-4CE4-9F8E-CBADA7B12AE0 at test-domain.com>
> Bcc: Test User <testuser at test-domain.com>
> User-Agent: Horde Application Framework 5
> From: Test User <testuser at test-domain.com>
> Reply-To: testuser at test-domain.com
>
> [1278][2021-02-01T08:15:27-08:00] ERR: Error when parsing dot-atom.
> [1278][2021-02-01T08:15:27-08:00] O: <ComposeMail:SendMail>
> [1278][2021-02-01T08:15:27-08:00] O:  <ComposeMail:Status>
> [1278][2021-02-01T08:15:27-08:00] O:   120
> [1278][2021-02-01T08:15:27-08:00] O:  </ComposeMail:Status>
> [1278][2021-02-01T08:15:27-08:00] O: </ComposeMail:SendMail>



-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 9272 bytes
Desc: PGP Public Key
URL: <https://lists.horde.org/archives/horde/attachments/20210206/ec32707f/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: PGP Digital Signature
URL: <https://lists.horde.org/archives/horde/attachments/20210206/ec32707f/attachment.sig>


More information about the horde mailing list