intercept incoming and outgoing mail

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Vovan
Posts: 3
Joined: Thu Jan 16, 2020 11:56 am

intercept incoming and outgoing mail

Postby Vovan » Thu Jan 16, 2020 12:00 pm

Hi!
How i can intercept incoming and outgoing mail header with a script to add mail events to my SQL table?
I would also like to have in the script an absolute link on the disk to the new letter.


Vovan
Posts: 3
Joined: Thu Jan 16, 2020 11:56 am

Re: intercept incoming and outgoing mail

Postby Vovan » Fri Jan 31, 2020 9:51 am

Hello everybody!
I used AdminWaitSetRequest (XML)

i try create WaitSet ... send to server

Code: Select all

<?xml version="1.0"?>
   <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:zimbra" xmlns:urn1="urn:zimbraAdmin">
    <env:Header><urn:context><urn:authToken>0_f4f8e9b791dddb79957c13fd0af7d4802d329599_69643d33363a66313637616333382d396630352d346131362d393764362d3635613830323534336666653b6578703d31333a313538303530363639323331383b61646d696e3d313a313b76763d313a303b747970653d363a7a696d6272613b753d313a613b7469643d31303a313938383439373531323b76657273696f6e3d31343a382e382e31355f47415f333836393b</urn:authToken></urn:context></env:Header>
     <env:Body>
        <urn1:AdminCreateWaitSetRequest allAccounts="true" defTypes="f"/>
    </env:Body>
   </env:Envelope>



Response from server

Code: Select all

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><change token="4101"/></context></soap:Header><soap:Body><AdminCreateWaitSetResponse waitSet="AllWaitSet-6bfb704f-5f01-479d-b76c-c88d8429225c" defTypes="f" seq="0" xmlns="urn:zimbraAdmin"/></soap:Body></soap:Envelope>


Next send

Code: Select all

<?xml version="1.0"?>
   <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:zimbra" xmlns:urn1="urn:zimbraAdmin">
    <env:Header><urn:context><urn:authToken>0_f4f8e9b791dddb79957c13fd0af7d4802d329599_69643d33363a66313637616333382d396630352d346131362d393764362d3635613830323534336666653b6578703d31333a313538303530363639323331383b61646d696e3d313a313b76763d313a303b747970653d363a7a696d6272613b753d313a613b7469643d31303a313938383439373531323b76657273696f6e3d31343a382e382e31355f47415f333836393b</urn:authToken></urn:context></env:Header>
     <env:Body>
        <urn1:AdminWaitSetRequest waitSet="AllWaitSet-b61d12ba-e34d-4269-ba7d-f2998cd76c93" seq="0" defTypes="f" block="1" expand="true"/>
    </env:Body>
   </env:Envelope>



Response from server after incoming any new mail.

Code: Select all

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><change token="4101"/></context></soap:Header><soap:Body><AdminWaitSetResponse waitSet="AllWaitSet-b61d12ba-e34d-4269-ba7d-f2998cd76c93" seq="2-1580463504781-1579249499-20429" xmlns="urn:zimbraAdmin"><a id="6914a890-53ce-497b-a3f8-85e93ffd59d5" changeid="4532"/></AdminWaitSetResponse></soap:Body></soap:Envelope>


Now. How do I display a folder that has changed? And what has changed there? There is no useful information in the answer.
What else needs to be done to get all the data about the event?

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 2 guests