Posts

zimbra duplicate emails issue

Image
How to remove zimbra duplicate emails in inbox. some trouble message with double message-id. The resolution enable zimbraMessageIdDedupeCacheSize attribute. The default, zimbra disable zimbraMessageIdDedupeCacheSize attribute. I'm running commands with account zimbra ( su - zimbra ) To find current value zmprov gcf zimbraMessageIdDedupeCacheSize The looks like as below zimbraMessageIdDedupeCacheSize: 3000  The modified value and zimbra mailbox service restart zmprov mcf zimbraMessageIdDedupeCacheSize 0 zmmailboxdctl restart The conclusion The solve problem, "zimbra duplicate message id", "zimbra duplicate emails". The commands use my post, support zimbra mail server version 8.6 8.5 8.0

zimbra DKIM (DomainKeys identified Mail)

Image
zimbra DKIM (Domainkeys identified Mail) include: Private-key insert header of email sending mail server. Public-key updated into DNS public. Links to below you maybe likes: zimbra custom spamassassin rules How to create auto Bcc for Recipient mails for Zimbra 8.6 How to add spam filters on zimbra 8.6 How to create auto Bcc for sender mails for Zimbra 8.6 list accounts that has not logged in for the last x days in zimbra Step 1: To configure zimbra DKIM To add DKIM data into domain not existing DKIM /opt/zimbra/libexec/zmdkimkeyutil -a -d huuphan.com The output as bellow DKIM Data added to LDAP for domain huuphan.com with selector 0E9F133A-9577-11E1-AD0E-2A2FBBAC6BCB  Public key to enter into DNS:  0E9F133A-9577-11E1-AD0E-2A2FBBAC6BCB._domainkey IN TXT "v=DKIM1;=rsa;  p=MIGfMA0GCXXXSSFWwfdfdfEEAA4GNADCBiQKBgQDY5CBg15nZ2vYnRmrNub6Jn6ghQ2DXQbQgOJ/E5IGziUYEuE2OnxkBm1h3jived21uHjpNy0naOZjLj0xLyyjclVy1chrhSbsGAhe8HLXUsdXyfRvNTq8NWLsUnMEsoomtJCJ  /4GSWYU1whOQ9oKZ

zmprov command create account attributes in zimbra

Image
How to zmprov command create account attributes in zimbra. zmprov command creating accounts, aliases, domain, cos, distribute lists and calendar resources. Links to below you maybe likes: zimbra custom spamassassin rules How to create auto Bcc for Recipient mails for Zimbra 8.6 How to add spam filters on zimbra 8.6 How to create auto Bcc for sender mails for Zimbra 8.6 list accounts that has not logged in for the last x days in zimbra Print all attribute names zmprov desc The syntax for modify attributes in zimbra Use + to add an attribute Use - to remove an attribute How to create account with attributes use zmprov command zmprov ca [email protected] 123456789 sn 'huupv' cn 'Huu, Phan Van' displayName 'Huu, Phan Van (IT)' zimbraMailHost mail.huuphan.local Account information     Account email: [email protected]     Password: 123456789     lastName: huupv     fullName: Huu, Phan Van     displayName: Huu, Phan Van (IT

Bash script while loop case statement example

Image
How to create "Menu Lists" use Bash script while loop case statement. I'm use while loop with case statement create "Menu Lists". Bash script for fun! The display color for echo command Red color RED='\033[0;31m'   Blue color BLUE='\033[0;34m' No color NC='\033[0m' Read from standard input and write to standard output and files tee -a /tmp/log__$DATE  To run bash script [huupv@huupv ~]$ ./menu_list  The display as below:  Menu Lists  1) My blog  2) Your name  3) How old are you?  4) Your Hobbies  5) Quit >> My full bash script "bash script while loop case statement" example #!/bin/bash # author: HuuPV RED='\033[0;31m' BLUE='\033[0;34m' NC='\033[0m' #No color DATE=$(date +%Y%m%d) while true do     echo ""     echo -e "$BLUE Menu Lists $NC"     echo -e ""     echo -e "$BLUE 1) My blog $NC"     echo -e "$BLUE 2)

zimbra ldap reset last login time

Image
How to change last login time for all accounts in zimbra ldap. I'm running scripts on zimbra ldap with zimbra account. To use zimbra  8.6 The explain scripts zimbra ldap reset last login time File /tmp/email the contain accounts email, you want change last login time. cat /tmp/email The output as bellow [email protected] [email protected] when you running script, then zimbraLastLogonTimestamp change the last login the current date DATE=$(date +%Y%m%d) The output as bellow 20170726 For example [email protected] with zimbraLastLogonTimestamp : 20170511135742.260Z to changed zimbraLastLogonTimestamp : 20170726000000.000Z My scripts zimbra ldap reset last login time #!/bin/bash #HuuPV rm -f /tmp/account_DN DATE=$(date +%Y%m%d) LDAP_HOST=$(/opt/zimbra/bin/zmlocalconfig ldap_host | cut -d\ '' -f3) LDAP_PASSWORD=$(/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_password | cut -d\ '' -f3) LDAP_USERDN=$(/opt/zimbra/bin/zmlocalcon

CentOS/RHEL Use yum Command To Downgrade Upgrade or Rollback Updates

Use yum Command To Downgrade Upgrade or Rollback Update. How to downgrade the package? How to upgrade the package? How to rollback update the package?. I'm running commands with root account. You may reading link below : How to reset root password on centos 7 Generate and Verify Files with MD5 Checksum in Linux use inotify-tools on centos awk useful commands examples How to  Downgrade Upgrade package use yum command The basic syntax Downgrade package yum downgrade package1 yum downgrade package1 package2 showing multiple versions of a package yum --showduplicates list package For example How to Downgrade php-fpm 7.0.21 roll-back php-fpm 5.3.3 yum downgrade php-fpm The output as bellow Resolving Dependencies --> Running transaction check ---> Package php-fpm.x86_64 0:7.0.20-1.el6.remi will be a downgrade --> Processing Dependency: php-common(x86-64) = 7.0.20-1.el6.remi for package: php-fpm-7.0.20-1.el6.remi.x86_64 ---> Package php-fpm.x86_64 0:7.0

How To Install Wordpress with nginx on CentOS 6

Image
How To Install Wordpress with nginx on CentOS 6. In this posts, the tutorial to install and configure mysql, wordpress and nginx on centos 6 step by step. I'm running account huupv as "root" privilege . Links to below you maybe likes: How to install php7 on centos 6 How to install and configure redmine on centos 6 How to owncloud 9 install ssl certificate centos 7 How To Install the BIND DNS Server on CentOS 6 KeepAlived IP Failover on CentOS & Red Hat To release version on your server cat /etc/redhat-release The output as bellow CentOS release 6.9 (Final) To update server sudo yum update To install epel-release sudo yum install epel-release To install nginx sudo yum install nginx sudo /etc/init.d/nginx start sudo yum install php-fpm php-mysql php-gd To install and configure mysql sudo yum install mysql-server sudo /etc/init.d/mysqld restart sudo /usr/bin/mysql_secure_installation To add user and database for WP_HuuPV on Mysql mysql -u root -p

How to configure ntp client server

Image
CentOS / Red Hat Configure ntp(Network time protocol) client server synchronised. NTP client ----> NTP server (192.16.1.10) To configure ntp on ntp server To configure allow port 123 on IPtables firewalls cat /etc/sysconfig/iptables The output as bellow -A INPUT -p tcp -m state --state NEW --dport 123 -j ACCEPT -A INPUT -p udp -m state --state NEW --dport 123 -j ACCEPT To configure ntp.conf file restrict 127.0.0.1 restrict 192.16.1.0 netmask 255.255.255.0 nomodify notrap restrict 172.235.0.0 netmask 255.255.0.0 nomodify notrap restrict -6 ::1 server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst server 2.centos.pool.ntp.org iburst server 3.centos.pool.ntp.org iburst server 0.asia.pool.ntp.org server 1.asia.pool.ntp.org server 2.asia.pool.ntp.org server 3.asia.pool.ntp.org To configure ntp on ntp client To configure allow port 123 on IPtables firewalls cat /etc/sysconfig/iptables The output as bellow -A OUTPUT -d 192.16.1.10/32 -m state --stat

zimbra mail server security fail2ban

Image
zimbra mail server security with fail2ban. How to configure fail2ban for prevent "brute force attack" zimbra 8.6 on centos. How to improve zimbra mail server security with fail2ban . I'm running commands as root account. Links to below you maybe likes: zimbra custom spamassassin rules How to create auto Bcc for Recipient mails for Zimbra 8.6 How to add spam filters on zimbra 8.6 How to create auto Bcc for sender mails for Zimbra 8.6 list accounts that has not logged in for the last x days in zimbra To install fail2ban yum install fail2ban nano To backup file cp /etc/fail2ban/action.d/iptables-allports.conf /etc/fail2ban/action.d/iptables-allports.conf.backup cp /etc/fail2ban/filter.d/zimbra.conf /etc/fail2ban/filter.d/zimbra.conf.backup cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.conf.backup To create zimbra.conf file cat /etc/fail2ban/filter.d/zimbra.conf The content as below # Fail2Ban configuration file # # Author: # # $Revision: 1 $ # [Def

Generate and Verify Files with MD5 Checksum in Linux

How to generate and Verify Files with MD5 Checksum in Linux. in my post, to create "checksum" folder and 3 file: file_md5,file2_md5,file3_md5 in "checksum" folder. You may reading link below : How to reset root password on centos 7 CentOS/RHEL Use yum Command To Downgrade Upgrade or Rollback Updates use inotify-tools on centos awk useful commands examples MD5 sums are 128-bit character strings(numerals and letters) resulting from running the MD5 algorithm. To create checksum folder with 3 files $ mkdir checksum $ echo "huuphan.com" > file_md5 $ echo "Phan Van Huu" > file2_md5 $ echo "huupv" > file3_md5 $ ls -ll total 12 -rw-r--r-- 1 huupv huupv 13 Jul 13 09:04 file2_md5 -rw-r--r-- 1 huupv huupv  6 Jul 13 09:04 file3_md5 -rw-r--r-- 1 huupv huupv 12 Jul 13 09:03 file_md5 To generate MD5 Checksum on a single file $ md5sum file_md5 01ff693ecd0492aca683eed0dcd2bb44  file_md5 To generate MD5 Checksum on multiple