King0770-Notes-Calendar-Notes: Difference between revisions
No edit summary |
|||
Line 89: | Line 89: | ||
[[Category:Calendar]] | [[Category:Calendar]] | ||
[[Category:MySQL]] | [[Category:MySQL]] | ||
[[Category: | [[Category:Command Line Interface]] | ||
[[Category:Sandbox]] |
Revision as of 03:49, 14 April 2011
This is going to be my calendar page to post various calendar topics, anything that I find useful regarding the Calendar app, I will post it here.
Tracking down a simple appointment
When people ask, "How do I track down a calendar appointment?", I usually suggest to start looking in the /opt/zimbra/log/mailbox.log file.
Here is an example of a simple event created by an organizer then sent to an attendee.
Note:
Organizor = jsmith@abcdomain.com
Attendee = bgreen@abcdomain.com
2011-04-13 12:34:15,402 INFO [btpool0-46://webmail.abcdomain.com/service/soap/CreateAppointmentRequest] [name=jsmith@abcdomain.com;mid=25;ip=192.168.1.17;
ua=ZimbraWebClient - FF3.0 (Mac)/6.0.12_GA_2883;] calendar - <CreateCalendarItem> folderId=10, subject="Meeting with Sales", UID=2a8539f8-34e3-4223-a198-9885b2f7ccfb
2011-04-13 12:34:15,406 INFO [btpool0-46://webmail.abcdomain.com/service/soap/CreateAppointmentRequest] [name=jsmith@abcdomain.com;mid=25;ip=192.168.1.17;
ua=ZimbraWebClient - FF3.0 (Mac)/6.0.12_GA_2883;] calendar - Adding CalendarItem: id=1315187, Message-ID="<1966313036.215.1302719655402.JavaMail.root@webmail.abcdomain.com>",
folderId=10, subject="Meeting with Sales", UID=2a8539f8-34e3-4223-a198-9885b2f7ccfb
2011-04-13 12:34:16,002 INFO [LmtpServer-84] [name=bgreen@abcdomain.com;mid=6;ip=192.168.1.19;] calendar - Adding CalendarItem: id=1243945,
Message-ID="<1966313036.215.1302719655402.JavaMail.root@webmail.abcdomain.com>",
folderId=10, subject="Meeting with Sales", UID=2a8539f8-34e3-4223-a198-9885b2f7ccfb
Line: 2011-04-13 12:34:15,402
When an appointment is created it starts from the organizor's account with "CreateAppointmentRequest". Observe the organizor's account address, in this example it is jsmith@abcdomain.com. You will note the organizor's mailbox ID is 25, and the IP where the request originated from, in this example it is 192.168.1.17. Also observe the folderId where the appointment will be stored, in this example folderId of 10. Also note the subject of the meeting and the UID.
Line: 2011-04-13 12:34:15,406
During the CreateAppointmentRequest, the calendar item ID is generated for the organizor, in this example it is id=1315187
Line: 2011-04-13 12:34:16,002
In this line the appointment is sent to the attendee, with the calendar item ID of 1243945.
Looking up the events
If you want to query an event by ID, there are a few methods.
Couple of mysql queries of this appointment
mysql -e "select * from mboxgroup25.appointment where uid='2a8539f8-34e3-4223-a198-9885b2f7ccfb'"
+------------+--------------------------------------+---------+---------------------+---------------------+
| mailbox_id | uid | item_id | start_time | end_time |
+------------+--------------------------------------+---------+---------------------+---------------------+
| 25 | 2a8539f8-34e3-4223-a198-9885b2f7ccfb | 1315187 | 2011-04-19 16:00:00 | 2011-04-19 17:30:00 |
+------------+--------------------------------------+---------+---------------------+---------------------+
mysql -e "select * from mboxgroup6.appointment where uid='2a8539f8-34e3-4223-a198-9885b2f7ccfb'"
+------------+--------------------------------------+---------+---------------------+---------------------+
| mailbox_id | uid | item_id | start_time | end_time |
+------------+--------------------------------------+---------+---------------------+---------------------+
| 6 | 2a8539f8-34e3-4223-a198-9885b2f7ccfb | 1243945 | 2011-04-19 16:00:00 | 2011-04-19 17:30:00 |
+------------+--------------------------------------+---------+---------------------+---------------------+
Commands with zmmetadump
zmmetadump -m 25 -i 1315187
zmmetadump -m 6 -i 1243945
Extracting the appointment with zmmailbox
zmmailbox -z -m jsmith@abcdomain.com gru "//?fmt=ics&id=1315187"
zmmailbox -z -m bgreen@abcdomain.com gru "//?fmt=ics&id=1243945"
Get as much information as you can
There's no such thing as too much information, especially when a user is asking, "Hey! Where did my appointment go?" If a user claims an appointment was missing, start with the basic questions:
- Who was the organizer?
- When was the appointment sent?
- What was the subject of the meeting?
Usually I will start looking for anything related to "CancelAppointmentRequest" in the mailbox.log, and the user account in question.
If a user provides a time period between dates, you can extract the user's calendar by specifying "start" and "end" dates with zmmailbox.
zmmailbox -z -m user01@domain.com gru "/Calendar.ics?start=03/01/2011&end=03/05/2011"