How to set a default COS for a specific domain

General discussion about Zimbra Desktop.
Post Reply
Ahmad Faizal Abdul Latif
Posts: 17
Joined: Sun Feb 02, 2014 9:10 pm

How to set a default COS for a specific domain

Post by Ahmad Faizal Abdul Latif »

i am looking for a way to set a default cos for specific domain. currently, i have 3 cos configured inside the server and multiple domain hosted inside. for example:
cos:
cos1
cos2
cos3

domain:
domain1.com
domain2.com
domain3.com

i would like to set a default cos to domain1.com using cos1, domain2.com using cos2. so everytime, the domain administrator create a new email account, it will create using default cos assign to their domain. is this possible? please advise.
User avatar
cayaraa
Outstanding Member
Outstanding Member
Posts: 341
Joined: Sat Sep 13, 2014 12:33 am
ZCS/ZD Version: ZCS 8 NE & ZCS 8 FOSS

How to set a default COS for a specific domain

Post by cayaraa »

On the admin web console when editing a domain one of the options on the first page is "Default Class of Service:".



This can also be done via the CLI in two steps. First you have to get the ID name for the COS and then set that for the domain:

$ zmprov gc cos1 zimbraId

zimbraId: e00428a1-0c00-11d9-836a-000d93afea2a

[tag:display] the current default COS for domain1.com

$ zmprov gd domain1.com zimbraDomainDefaultCOSId

[tag:set] the new default COS

$ zmprov md domain1.com zimbraDomainDefaultCOSId e00428a1-0c00-11d9-836a-000d93afea2a
Ahmad Faizal Abdul Latif
Posts: 17
Joined: Sun Feb 02, 2014 9:10 pm

How to set a default COS for a specific domain

Post by Ahmad Faizal Abdul Latif »

Now i see. previously i was trying to specify the cos name instead of cos id. now when i try to add using the cos id i'm able to set the domain default cos. and verified using comand line also both working. thanks for your help
ThyTe
Posts: 7
Joined: Tue Jul 16, 2019 6:29 pm

Re: How to set a default COS for a specific domain

Post by ThyTe »

Veja se isso te ajuda!

Code: Select all

for NCOS in $(zmprov gc NOMEDOCOS zimbraId | cut -d' ' -f2 | grep -v name); do zmprov md DOMINIO.com.br zimbraDomainDefaultCOSId $NCOS; done
Post Reply