Configure DomainKeys- DKIM (OpenDKIM) with Postfix on CentOS 7

OpenDKIM is method to digitally sign & verify emails on the mail servers using public & private keys. In other words opendkim implements the DKIM (DomainKeys Identified Mail) standard for signing and verifying email messages on a per-domain basis. DomainKeys are implemented to reduce the chances of outgoing mails to be marked as SPAM.

In this post we will demonstrate how to install & configure DomainKeys with postfix (MTA) on CentOS 7, i am assuming Postfix is already installed with following domain and hostname.

Hostname = mail5.freshdaymall.com
Domain = freshdaymall.com

Step:1 Set EPEL Repository using below rpm command

OpenDKIM package is not available in the default yum repositories but available in CentOS 7 EPEL repositories

[root@mail5 ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Step:2 Install OpenDKIM Package using yum

[root@mail5 ~]# yum install -y opendkim

Step:3 Run below Command to create keys

Execute the below command to create public & private keys under folder “/etc/opendkim/keys” Continue reading “Configure DomainKeys- DKIM (OpenDKIM) with Postfix on CentOS 7” »

Share

Install LibreNMS Monitoring Tool with Nginx on Ubuntu 20.04

First, it is recommended to update your system packages to the latest version. You can do it with the following command:

apt-get update -y

After updating all packages, install all the dependencies required for LibreNMS with the following command:

apt-get install rrdtool whois fping imagemagick graphviz mtr-tiny nmap python3-mysqldb snmp snmpd python3-pip python3-memcache mtr-tiny acl unzip git curl wget -y

Once all the dependencies are installed, you can proceed to the next step. Continue reading “Install LibreNMS Monitoring Tool with Nginx on Ubuntu 20.04” »

Share

Setup mail server on centos 7 using postfix and dovecot

Installing packages

Step 1 » Assign hostname for the server using the below command.

[root@krizna ~]# hostnamectl set-hostname mail.krizna.com

Step 2 » Make a host entry with your IP in /etc/hosts file.

172.27.0.51 mail.krizna.com

Step 3 » Now start installing packages.

[root@krizna ~]# yum -y install postfix dovecot

After package installation continue with postfix configuration. Continue reading “Setup mail server on centos 7 using postfix and dovecot” »

Share

Sectigo SSL certificate installation on Zimbra

1. Login to your Zimbra Admin Console using a browser.

2. In the left navigation pane under Home click Configure. Click Certificate.

3. On the right of the Zimbra Admin console click on the settings icon and select Install Certificate.

4. The Certificate Installation Wizard will pop up.

5. Under Server Name Select the Target server you are going to install the certificate for. Click Next Continue reading “Sectigo SSL certificate installation on Zimbra” »

Share

Install LAMP with PHP 7.4 on FastCGI/CGI configuration on CentOS 7

Step 1 – Setup Yum Repository

In the first step install all the required yum repositories in your system used in the remaining tutorial for various installations. You are adding REMI, EPEL, Webtatic & MySQL community server repositories in your system.

CentOS / RHEL 7

yum install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm

Step 2 – Install PHP 7.4

Now install php 7 packages from webtatic rpm repository using following command.

yum --enablerepo=remi-php74 install php

Now install required php modules. Use following command to list available modules in yum repositories.

yum --enablerepo=remi-php74 search php

Now check all listed modules in above command and install required modules like below.

yum --enablerepo=remi-php74 install php-mysql php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

For additonal php function to install use the command syntax below-

yum --enablerepo=remi-php74 install <your-php-funciton>

Continue reading “Install LAMP with PHP 7.4 on FastCGI/CGI configuration on CentOS 7” »

Share

How to enable Proxy Settings for Yum Command on RHEL / CentOS Servers

This can be easily achieved with yum config file “/etc/yum.conf“. Under main section define the proxy settings like below:

………………
proxy=http://<Proxy-Server-IP-Address>:<Proxy_Port>
proxy_username=<Proxy-User-Name>
proxy_password=<Proxy-Password> 
………………

Save and exit the file and start using the yum command. Sample yum Config file with proxy settings is shown below :

Share

Ping behind proxy using httping

You can use utility httping for that. It sends a HEAD request (by default) to a web server and measures the time it took to get a response.

The utility is available through a number of repositories for different OS’es and Linux distros:

Ubuntu:

sudo apt install httping

Alpine:

sudo apk add httping

macOS with Homebrew:

brew install httping

How to use it:

httping -x 192.68.1.12:1080 -g http://google.com

Continue reading “Ping behind proxy using httping” »

Share

Manually purge data from Graylog 2.1

First aid: check which indices are present:

curl http://localhost:9200/_cat/indices

Then delete the oldest indices (you should not delete all)

curl -XDELETE http://localhost:9200/graylog_1
curl -XDELETE http://localhost:9200/graylog_2
curl -XDELETE http://localhost:9200/graylog_3

Fix: You can then reduce the parameter elasticsearch_max_number_of_indices in /etc/graylog/server/server.conf to a value that fits your disk.

Src: https://stackoverflow.com/questions/39502069/how-to-manually-purge-data-from-graylog-2-1

Share

Install Rainloop on PHP 5.6 on Debian 8 LAMP

Step-1: Install LAMP on Debian

I’ve used a bash script to install LAMP. You may find it useful.

#!/bin/bash

########################################################
### This script is created by Hasn T. Emdad Rumi <h.t.emdad@gmail.com>.
### Released under GPL 2.0 licensing
### Date: 12-Aug-2016
########################################################

echo "Updating Debian Repository..."
apt-get install debian-keyring debian-archive-keyring -y
apt-get update
echo "Installing mysql serve & client..."
apt-get install mysql-server mysql-client -y

echo "Installing Apache2 and PHP5..."
apt-get install apache2 php5 libapache2-mod-php5 libapache2-mod-auth-mysql libmysqlclient15-dev php5-mysql  php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php-xml pcre php-common curl phpmyadmin -y

echo "Now rebooting services..."
/etc/init.d/apache2 restart

clear

ip_add=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`

l1=" _____ _ _ _ _ _ "
l2=" |_ _| | | | | | | | |"
l3=" | | _ __ ___| |_ __ _| | | ___ __| | |"
l4=" | | | '_ \/ __| __/ _ | | |/ _ \/ _ | |"
l5=" _| |_| | | \__ \ || (_| | | | __/ (_| |_|"
l6=" |_____|_| |_|___/\__\__,_|_|_|\___|\__,_(_)"
echo "$l1"
echo "$l2"
echo "$l3"
echo "$l4"
echo "$l5"
echo "$l6"
echo "=============================================="
echo "Phpmyadmin is available at http://$ip_add/phpmyadmin/"
echo "=============================================="
echo "username: root"
echo "password: (mysql root password)"
echo "Update: innodb_file_per_table=1"

Continue reading “Install Rainloop on PHP 5.6 on Debian 8 LAMP” »

Share

E: Release file for http://archive.debian.org/debian/dists/jessie-backports/InRelease is expired (invalid since 715d 18h 14min 9s). Updates for this repository will not be applied Update Wheezy or Jessie Repo

Wheezy and jessie both has gone EOL and repos too. archive repo doesn’t seem to usually work either. So here’s a little trick that worked for me. Below is my repo.list file-

deb http://archive.debian.org/debian jessie main
deb http://archive.debian.org/debian-archive/debian-security/ jessie updates/ma$
#deb http://security.debian.org/ jessie/updates non-free contrib main
#deb http://mirrors.ocf.berkeley.edu/debian/ jessie-updates main contrib non-fr$
deb http://security.debian.org/ jessie/updates main
deb http://ftp.fr.debian.org/debian jessie-updates main

Nowupdate apt as below- Continue reading “E: Release file for http://archive.debian.org/debian/dists/jessie-backports/InRelease is expired (invalid since 715d 18h 14min 9s). Updates for this repository will not be applied Update Wheezy or Jessie Repo” »

Share