Posts

Configure Alias (Auto BCC) in Postfix

Sometimes we have to set auto forwarding in between addresses. For example, a department head shall get all the inbound emails received by his team members. We can achieve such target using aliases of postfix. Step 1: Create an alias file including its’ database. By default there is an aliases file in the server. If not, please proceed as below. root@mail:~# touch /etc/postfix/aliases root@mail:~# postalias /etc/postfix/aliases Step 2: Open the aliases file and set necessary aliases as required. root@mail:~# vim /etc/postfix/aliases user1: user1,hod user2: user2,hod   Step 3: Update database. root@mail:~# postalias /etc/postfix/aliases This alias acts like auto BCC. In this case user1, user2 shall not get any notification of this forwarding.

Postfix and Dovecot Based Email Server Configuration with SMTP Authentication

Image
Objective: Configuring a mail server using Postfix MTA, Dovecot MDA and Squirrelmail webmail. We are using the below information to configure the mail server. Domain Name: learnandgains.com Server Hostname: mail.learnandgains.com IP address: 192.168.22.30 OS: Ubuntu 20.04 LTS   Server Readiness: root@ubuntu:~# dpkg-reconfigure tzdata (Set the Geographic area: Asia, Time zone: Dhaka) root@ubuntu:~# apt install ntpdate root@ubuntu:~# ntpdate bd.pool.ntp.org root@ubuntu:~# sudo timedatectl set-ntp off root@ubuntu:~# date (To check the current date in the server)   root@ubuntu:~# vim /etc/hostname mail.learnandgains.com   root@ubuntu:~# vim /etc/hosts 192.168.22.30 mail.learnandgains.com  mail   root@ubuntu:~# apt update root@ubuntu:~# apt upgrade –y root@ubuntu:~# reboot Configuring Postfix: root@mail:~# apt install postfix root@mail:~# dpkg-reconfigure postfix Configuring Dovecot: root@mail:~# apt install dovecot-core do...

Restricting Users to Send Emails Locally and Externally

We, sometimes, need to block users to send emails both the internal and external destinations. For example, you are running an email account for receiving CVs only. However, you don’t have to reply them from this account. All the feedback email is maintained from another account. In that case, you may block the user to send emails. It will not impact in email receiving status. Please follow below guideline to achieve our goal. Goal: Restricting users to send emails to all internal and external domains.   Resolution: Step 1: Open the file smtpd_sender_restrictions.cf and add the below line at the top. root@mail:~# vim /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf %%contains VAR:zimbraMtaSmtpdSenderRestrictions check_sender_access lmdb:/opt/zimbra/common/conf/restricted_senders%%   Step 2: Execute the below line as Zimbra user. zimbra@mail:~$ zmprov ms `zmhostname` +zimbraMtaSmtpdSenderRestrictions "check_sender_access lmdb:/opt/zimbra/common/con...

Install SNMP and Configure Community String in CentOS

We have to regularly monitor server resources e.g. CPU, RAM, Storage, Network Bandwidth Utilization as a day-to-day activity. By monitoring the resources, we may find out the exact cause of any incident that might occur due to full resource utilization. It can guide us to increase the resources as well if require. We are currently using Observium and Cacti to monitor resource utilization. In order to connect the servers with the observium/Cacti, we have to configure SNMPD in the server. You may follow below guideline to install it in CentOS servers. Test Environment: CentOS 7   Step 1: Install SNMPD. [root@vps ~]# yum install net-snmp net-snmp-utils -y   Step 2: Verify that it is set to start at startup [root@vps ~]# systemctl enable snmpd   Step 3: Rename the existing snmpd.conf file and create a new one. [root@vps ~]#mv /etc/snmp/snmpd.conf   /etc/snmp/snmpd.conf.ori [root@vps ~]#touch /etc/snmp/snmpd.conf   Step 4: Configure ...

Install SNMP and Configure Community String in Ubuntu

We have to regularly monitor server resources e.g. CPU, RAM, Storage, Network Bandwidth Utilization as a day-to-day activity. By monitoring the resources, we may find out the exact cause of any incident that might occur due to full resource utilization. It can guide us to increase the resources as well if require. We are currently using Observium and Cacti to monitor resource utilization. In order to connect the servers with the observium/Cacti, we have to configure SNMPD in the server. You may follow below guideline to install it in Ubuntu servers. Test Environment: Ubuntu 16.04 LTS and Ubuntu 18.04 LTS   Step 1: Install SNMPD. root@mail:~# apt-get install snmpd   Step 2: Rename the existing snmpd.conf file and create a new one. root@mail:~#mv /etc/snmp/snmpd.conf   /etc/snmp/snmpd.conf.ori root@mail:~# touch /etc/snmp/snmpd.conf   Step 3: Configure the SNMP community string. root@mail:~# vim /etc/snmp/snmpd.conf rocommunity mystring@3...

How to Create a WHM Privileged/Full Control User

Image
I have been working on WHM/cPanel service since long. Sometimes, we get request from our customer that they would like to manage their VPS fully/partially. In such cases, we can directly provide them root user access or we can provide some privileges access based on the requirement. Here, I shall describe how to achieve the goal. Step 1: Login to shell by using root account. Step 2: Create desired user. In this case it is newuser. You have to change the username as per your requirement. [root@vps ~]#useradd newuser [root@vps ~]#passwd newuser [root@vps ~]#usermod -aG wheel newuser [root@vps ~]#echo "newuser:all" >> /var/cpanel/resellers After performing the above operation, you will be able to login into the system using ssh and WHM. This “newuser” has the full privilege in the system. Suppose, you need a user with some privileged access. You may provide such permission following below procedure. Step 3: Login to WHM using root account Step 4: Se...

Create admin account from Command Line in Zimbra

In general, there are multiple administrators who manage the mail server. It is wise to use separate administrative account to access in admin portal. It will help to identify the activities performed by an administrator. This article guides you to create an admin account and to provide administrative privileges on an existing account. Create a new admin account: zimbra@mail:~$ zmprov ca newadmin@domain.com newPassword zimbraIsAdminAccount TRUE It will create an admin account with full privilege. Provide administrative privilege to an existing account: zimbra@mail:~$ zmprov ma olduser@domain.com zimbraIsAdminAccount TRUE To change the password for the olduser: zimbra@mail:~$ zmprov sp olduser@domain.com newpassword