Where Zimbra tags are stored?

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
a1ex
Posts: 41
Joined: Sat Sep 13, 2014 3:11 am

Where Zimbra tags are stored?

Postby a1ex » Mon Jun 10, 2013 3:42 pm

Hello,
I need to create the same tag (name, color) for all users of some group.

For current session this can be done via CreateTagRequest SOAP request.
Most probably I have to develop server side extension (for SOAP service).
But I can't find where those tags are located? (mysql/ldap)


13546dalmate
Outstanding Member
Outstanding Member
Posts: 360
Joined: Fri Sep 12, 2014 11:59 pm

Where Zimbra tags are stored?

Postby 13546dalmate » Tue Jun 11, 2013 9:12 pm

[quote user="a1ex"]Hello,
I need to create the same tag (name, color) for all users of some group.

For current session this can be done via CreateTagRequest SOAP request.
Most probably I have to develop server side extension (for SOAP service).
But I can't find where those tags are located? (mysql/ldap)[/QUOTE]
In MySql database.
a1ex
Posts: 41
Joined: Sat Sep 13, 2014 3:11 am

Where Zimbra tags are stored?

Postby a1ex » Wed Jun 12, 2013 2:10 am

Really? Where exactly?
12140kapplebaum
Posts: 27
Joined: Sat Sep 13, 2014 3:13 am

Where Zimbra tags are stored?

Postby 12140kapplebaum » Wed Jun 12, 2013 10:06 am

Not sure what your experience is with mysql, so I apologize if this is too detailed. (But it will help others in the future, so it's all good. :o ) I'll assume you at least know how to get into mysql in the Zimbra CLI.
Each mailbox group has its own set of tags. Here's what I did to see the tags for my group, 40.


> show databases;

> use mboxgroup40;

> show tables;

> show columns from tag;

> select * from tag;


(If you know SQL, you know some of these steps are not necessary, but they are instructive for people who aren't familiar with databases.)
HTH,

Kathy A.


I just realized you may have already created the tags themselves, and are wanting to know where they are kept for individual mail items. If so, that's in the tagged_item table in the mboxgroupxx database.

a1ex
Posts: 41
Joined: Sat Sep 13, 2014 3:11 am

Where Zimbra tags are stored?

Postby a1ex » Wed Jun 12, 2013 2:58 pm

Fortunately I have some experience with mysql.
Yes, I have created my custom tags and want to know where they are located.
I'm logged in as zimbra user.
I can see mboxgroupXXX databases, but non of them contains "tag*" table
mysql> show tables;

+-----------------------+

| Tables_in_mboxgroup11 |

+-----------------------+

| appointment |

| appointment_dumpster |

| data_source_item |

| imap_folder |

| imap_message |

| mail_item |

| mail_item_dumpster |

| open_conversation |

| pop3_message |

| revision |

| revision_dumpster |

| tombstone |

+-----------------------+

12 rows in set (0.00 sec)
Do I need different account with proper privileges to see that and probably other tables?
P.S. I'm using ZCS Network Edition 7.2.2.
12140kapplebaum
Posts: 27
Joined: Sat Sep 13, 2014 3:13 am

Where Zimbra tags are stored?

Postby 12140kapplebaum » Wed Jun 12, 2013 3:05 pm

Here's mine:

mysql> show tables;

+-----------------------+

| Tables_in_mboxgroup40 |

+-----------------------+

| appointment |

| appointment_dumpster |

| data_source_item |

| imap_folder |

| imap_message |

| mail_item |

| mail_item_dumpster |

| open_conversation |

| pop3_message |

| revision |

| revision_dumpster |

| tag |

| tagged_item |

| tombstone |

+-----------------------+

14 rows in set (0.00 sec)
I'm using 8.0.0...
a1ex
Posts: 41
Joined: Sat Sep 13, 2014 3:11 am

Where Zimbra tags are stored?

Postby a1ex » Wed Jun 12, 2013 3:15 pm

Well, obviously I need to wait for somebody having 7.2.2.
Anyway, kapplebaum, thank you very much!
12140kapplebaum
Posts: 27
Joined: Sat Sep 13, 2014 3:13 am

Where Zimbra tags are stored?

Postby 12140kapplebaum » Wed Jun 12, 2013 3:34 pm

While you're waiting, you might take a look at the data in mail_item for grins. Looking at the tables you have, that's the place I'd think to store it if I was writing the code.
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 612
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P9

Where Zimbra tags are stored?

Postby ccelis5215 » Wed Jun 12, 2013 8:00 pm

[quote user="12140kapplebaum"]While you're waiting, you might take a look at the data in mail_item for grins. Looking at the tables you have, that's the place I'd think to store it if I was writing the code.[/QUOTE]
Of course, you're right.
As OP said, he's using SOAP. Maybe he has to revisit the API.
ccelis
a1ex
Posts: 41
Joined: Sat Sep 13, 2014 3:11 am

Where Zimbra tags are stored?

Postby a1ex » Thu Jun 13, 2013 1:14 am

Just checked tags in mail_item (and mail_item_dumpster) tables of all mboxgroup* dbs and found just numbers like 1,16 ... Probably they show number of tags, not tags themselves as I expected strings like "TAG_1", "NEW" ... which I can see in "tags" panel in UI.
I tried to find related source code here


to">https://github.com/Zimbra-Community/zimbra-sources
to
clarify where SOAP service puts them but was able to find request/response message classes only

https://github.com/Zimbra-Community/zimbra-sources/blob/master/main/ZimbraSoap/src/java/com/zimbra/soap/mail/message/CreateTagRequest.java


Could">https://github.com/Zimbra-Community/zimbra-sources/blob/master/main/ZimbraSoap/src/java/com/zimbra/soap/mail/message/CreateTagResponse.java
Could
somebody point me to right source code part/docs please?

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 4 guests