Zimbra – Comando para Fazer backup e restaurar usuário

Todos os comandos só funcionam no usuario zimbra Backup zmmailbox -z -m gisele.clemente@pinhais.pr.gov.br -t 0 getRestURL “//?fmt=tgz” > /bkp/mails/gisele.clemente@pinhais.pr.gov.br.tgz Restaurar zmmailbox -z -m gisele.clemente@p.pinhais.pr.gov.br -t 0 postRestURL “//?fmt=tgz&resolve=skip” /bkp/mails/gisele.clemente@pinhais.pr.gov.br.tgz   Comando para deletar uma conta do ldap source ~/bin/zmshutil zmsetvars ldapdelete -x -H ldap://$zimbra_server_hostname -D $zimbra_ldap_userdn -w $zimbra_ldap_password uid=luana.bonfim,ou=people,dc=p,dc=pinhais,dc=pr,dc=gov,dc=br

Zimbra Comandos para Subir certificado .

Os comando dever ser rodados com o usuário zimbra /opt/zimbra/bin/zmcertmgr createcsr comm -new -keysize 2048 -subject “/C=BR/ST=PR/L=PINHAIS/O=MUNICIPIO DE PINHAIS/OU=TI/CN=srvwebmailp.p.pinhais.pr.gov.br” /opt/zimbra/bin/zmcertmgr verifycrt comm ./private.key ./certificate.crt ./ca_bundle.crt /opt/zimbra/bin/zmcertmgr deploycrt comm ./webmail.pinhais.pr.gov.br.crt ./commercial_ca.crt

Script – Windows – Para verificar uso do CPU derrubar um processo e enviar um e-mail

Script desenvolvido em powershell Function fmail { $username = ‘ti.seguranca@pinhais.pr.gov.br’ $password = ‘Senha’ $secpasswd = ConvertTo-SecureString $password -AsPlainText -Force $mycreds = New-Object System.Management.Automation.PSCredential ($username, $secpasswd) $properties=@( @{Name=”Process Name”; Expression = {$_.name}}, @{Name=”CPU (%)”; Expression = {$_.PercentProcessorTime}}, @{Name=”Memory (MB)”; Expression = {[Math]::Round(($_.workingSetPrivate / 1mb),2)}} ) $__MSG=(Get-WmiObject -class Win32_PerfFormattedData_PerfProc_Process | Sort-Object -Property PercentProcessorTime -Descending | Select-Object $properties
Continue reading Script – Windows – Para verificar uso do CPU derrubar um processo e enviar um e-mail

Zimbra – Atualização – comandos diversos

https://forums.zimbra.org/viewtopic.php?t=60021 #verificar zmprov gs `zmhostname` zimbraServiceEnabled zmprov gs `zmhostname` zimbraServiceInstalled zmprov ms `zmhostname` +zimbraServiceEnabled memcached zmprov ms `zmhostname` +zimbraServiceEnabled proxy #Habilida servicos zmprov ms $(zmhostname) +zimbraServiceInstalled memcached zmprov ms $(zmhostname) +zimbraServiceInstalled proxy #desabilida serviçoes zmprov ms `zmhostname` -zimbraServiceEnabled memcached zmprov ms `zmhostname` -zimbraServiceEnabled proxy zmprov ms `zmhostname` -zimbraServiceEnabled opendkim https://wiki.zimbra.com/wiki/Unable_to_create_a_successful_TLS_connection_to_the_ldap_masters zmlocalconfig -e ssl_allow_untrusted_certs=true zmlocalconfig -e
Continue reading Zimbra – Atualização – comandos diversos

zimbra comandos para gerar certificado

Comandos usados para gerar o certificado no zimbra. /opt/zimbra/bin/zmcertmgr createcsr comm -new -keysize 2048 -subject “/C=BR/ST=PR/L=PINHAIS/O=MUNICIPIO DE PINHAIS/OU=TI/CN=webmail.pinhais.pr.gov.br” /opt/zimbra/bin/zmcertmgr verifycrt comm ./commercial.key ./webmail.pinhais.pr.gov.br.crt ./commercial_ca.crt /opt/zimbra/bin/zmcertmgr deploycrt comm ./webmail.pinhais.pr.gov.br.crt ./commercial_ca.crt Zimbra 8, instalação de certificados SSL root@srvmail:/opt/zimbra/ssl/zimbra/commercial# /opt/zimbra/bin/zmcertmgr verifycrt comm ./commercial.key ./webmail.pinhais.pr.gov.br.crt ./commercial_ca.crt ** Verifying ./webmail.pinhais.pr.gov.br.crt against ./commercial.key Certificate (./webmail.pinhais.pr.gov.br.crt) and private key (./commercial.key) match. Valid
Continue reading zimbra comandos para gerar certificado