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?

Post by 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)
13546dalmate
Outstanding Member
Outstanding Member
Posts: 360
Joined: Fri Sep 12, 2014 11:59 pm

Where Zimbra tags are stored?

Post by 13546dalmate »

[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?

Post by a1ex »

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

Where Zimbra tags are stored?

Post by 12140kapplebaum »

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?

Post by a1ex »

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?

Post by 12140kapplebaum »

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?

Post by a1ex »

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?

Post by 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.
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 632
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

Where Zimbra tags are stored?

Post by ccelis5215 »

[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?

Post by a1ex »

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/zim ... quest.java


Could">https://github.com/Zimbra-Community/zim ... ponse.java
Could somebody point me to right source code part/docs please?
Post Reply