Showing posts from May, 2017

How to setting password policies in Zimbra

How to setting password policies in zimbra? To help your system increase security, password strongest. To get all COS use zmprov command su - zimbra zmprov gac -v | grep Password | sort | uniq To display all attributes as below zimbraFeatureChangePasswordEnabled: TRUE zimbraMobilePolicyAllowSimpleDevicePassword: FALSE zimbraMobilePolicyAlphanumericDevicePasswordRequired: FALSE zimbraMobilePolicyDevicePasswordEnabled: TRUE zimbraMobilePolicyDevicePasswordExpiration: 0 zimbraMobilePolicyDevicePasswordHistory: 8 zimbraMobilePolicyMaxDevicePasswordFailedAttempts: 4 zimbraMobilePolicyMinDevicePasswordComplexCharacters: 0 zimbraMobilePolicyMinDevicePasswordLength: 4 zimbraMobilePolicyPasswordRecoveryEnabled: TRUE zimbraPasswordEnforceHistory: 0 zimbraPasswordLocked: FALSE zimbraPasswordLockoutDuration: 1h zimbraPasswordLockoutEnabled: FALSE zimbraPasswordLockoutFailureLifetime: 1h zimbraPasswordLockoutMaxFailures: 10 zimbraPasswordMaxAge: 0 zimbraPasswordMaxLength:

How to backup and restore for zimbra mailbox

In this tutorial, How to " Backup and restore for zimbra mailbox ". How to backup mailbox for accounts? How to restore mailbox for accounts? The format list_account file as below: [email protected] [email protected] The script backup mailbox for all accounts #!/bin/bash FILE= /tmp/list_account DATE=$(date +"%a") ZMBOX=/opt/zimbra/bin/zmmailbox while read account do      echo "---Generating files from backup $account ---"      $ZMBOX -z -m $account -t 0 getRestURL "//?fmt=zip" > /tmp/$acount.$ done < $FILE The script restore mailbox for all accounts #!/bin/bash FILE=/tmp/list_account DATE=$(date +"%a") ZMBOX= /opt/zimbra/bin/zmmailbox while read account do     echo "---Restoring files from backup $account---"     $ZMBOX -z -m $account -t 0 postRestURL "//?fmt=zip&resolve=reset" /tmp/$account.$ done < $FILE Note: if you setup multi-server Zimbr

use inotify-tools on centos

inotifywait - wait for changes to files using inotify. To install inotify-tools on centos sudo yum install inotify-tools To install inotify-tools on ubuntu sudo apt-get install inotify-tools For example, how to monitor folder /home/huupv with action create,delete,modiy,move. The scripts as below: #!/bin/bash #Author huupv #My blog inotifywait -m -r /home/huupv -e create -e delete -e modify -e move | while read FOLDER ACTION1 ACTION2 ACTION3 ACTION4 do         echo "Path $FOLDER Create $ACTION1" >>/tmp/output         echo "Path $FOLDER Delete $ACTION2" >>/tmp/output         echo "Path $FOLDER Modify $ACTION3" >>/tmp/output         echo "Path $FOLDER Move $ACTION4" >>/tmp/output done The man page inotifywait man inotifywait NAME        inotifywait - wait for changes to files using inotify SYNOPSIS        inotifywait  [-hcmrq]  [-e  <event> ] [-t <seconds> ] [--format <fmt> ]

How to enable swap-drive on linux

in my post, How to enable swap-drive on linux. The solve problem "Swap Not working" on linux such as centos, Fedora 25.  The open terminal, to check status of swap space ( as run root account) . swapon -s lsblk As the content below NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sr0     11:0    1  1024M  0 rom sda      8:0    0 465.8G  0 disk ├─sda4   8:4    0 202.1G  0 part ├─sda2   8:2    0 105.9G  0 part / ├─sda5   8:5    0  12.9G  0 part [SWAP] ├─sda3   8:3    0     1K  0 part ├─sda1   8:1    0   487M  0 part └─sda6   8:6    0 144.4G  0 part /media/installed To turn on swap-drive /dev/sda5 swapon /dev/sda5 To make this permanent start-up on the system vim /etc/fstab  As the content below /dev/sda5 swap swap defaults 0 0 To check, if swap drive that work! free -h As the content below               total        used        free      shared  buff/cache   available Mem:           3.6G        2.2G        123M        321M        1.3G        

zimbra 8.6 cbpolicyd example

Links to below you maybe likes: How to zimbra enforce spf checking for incomming email How to use cbpolicyd to configure 120 message from sender in last 30s. in order configure in zimbra cbpolicyd policies -->policy_members -->quotas -->quotas_limits To create zimbra-example.sql file BEGIN TRANSACTION; INSERT INTO "policies" (ID,Name,Priority,Description) VALUES(6,'Example CBPolicyd Policies', 0, 'Example CBPolicyd Policies'); INSERT INTO "policy_members" (ID,PolicyID,Source,Destination) VALUES(10,6, 'user@domain', '!%internal_domains'); INSERT INTO "quotas" (ID,PolicyID,Name,Track,Period,Verdict,Data) VALUES (14,10, 'Sender:user@domain','Sender:user@domain', 30, 'REJECT', 'Rejected from CBPolicyd: Too many messages from sender in last 30s'); INSERT INTO "quotas_limits" (ID,QuotasID,Type,CounterLimit) VALUES(16,14, 'MessageCount', 120); COMMIT; To