Page 1 of 1

Unable to complete GetMsgRequest 8.8.15

Posted: Thu Sep 17, 2020 3:33 pm
by DocRockulus
I'm using python-zimbra, and I'm reviewing the documentation listed here:
https://files.zimbra.com/docs/soap_api/ ... quest-m-id
In order to attempt to pull the contents of an individual message, given it's ID.

I'm able to authenticate correctly:

Code: Select all

usr_token = auth.authenticate(
    url,
    'fakeemail@fake.email',
    '**********************************************************'
)
and make other requests:

Code: Select all

search_request = comm.gen_request(token=usr_token)
    search_request.add_request(
        'SearchRequest',
        {
            'query': 'in:inbox',
            'limit': 1000,
            'resultMode' : 'IDS'
        },
        'urn:zimbraMail'
    )
    search_response = comm.send_request(search_request)
However when I make a "GetMsgRequest":

Code: Select all

msg_request.add_request(
    'GetMsgRequest',
    	{
   		 'm': {
   			 'id': "-3981"
    		}
    	},
'urn:zimbraMail'
even given a msg ID that I'm certain exists (based on the output of the above search request) I still get a "no such message" fault.

Code: Select all

{'Fault': {'Code': {'Value': 'soap:Sender'}, 'Reason': {'Text': 'no such message: -3981'}, 'Detail': {'Error': {'Code': 'mail.NO_SUCH_MSG', 'Trace': 'qtp366590980-679210:1600355135420:05591e196a69dc85', 'a': {'n': 'itemId', 't': 'IID', '_content': '-3981'}}}}}
Am I formatting my request incorrectly? I think that's likely the case but I'm not sure how to ammend it to be correct.

Re: Unable to complete GetMsgRequest 8.8.15

Posted: Thu Sep 17, 2020 5:01 pm
by jeastman
I am in no way familiar with the python-zimbra you are using, but it looks like the ID you are specifying may be a Conversation ID and not a Message ID (note the negative value).

Maybe that helps?

Regards,

Re: Unable to complete GetMsgRequest 8.8.15

Posted: Thu Sep 17, 2020 5:44 pm
by DocRockulus
Yeah, that seems like it was the cause of the issue.

Oddly, when I do a search and include types:message it still produces results that seem to be both messages and conversations:

Code: Select all

{'id': '-4195', 'sf': '1578312230000'}
{'id': '4199', 'sf': '1578305474000'}
{'id': '-4203', 'sf': '1578297298000'}
and to further confuse things, when I do a GetMsgRequest on an item with a negative value, it fails, but if I take the same value and strip the "-" I am able to resolve the appropriate message.

Re: Unable to complete GetMsgRequest 8.8.15

Posted: Thu Sep 17, 2020 8:12 pm
by jeastman
I believe a negative value is indicating that the message is not part of a conversation. So, it is simply a negative version of the message ID.

Regards,