What is Postfix and How to Install and Configure it?

What is Postfix and How to Install and Configure it?

In this article, we are going to be looking at Postfix. It is a Mail Transfer Agent (MTA) which is used to send and receive emails. It is currently used by 33% of internet mail servers. Let’s move on to installing the Postfix.

What is Postfix and How to Install and Configure it?

Installing Postfix

To install postfix you need to type in the following command:

sudo apt-get update && sudo apt install postfix mailutils

You also need to install mailutils utility for Postfix to work correctly.

Configuring the Postfix

We need to configure the inet_interfaces in the Postfix main config file. The network interface addresses that this mail system receives mail on. Specify “all” to receive mail on all network interfaces (default), and “loopback-only” to receive mail on loopback network interfaces only

nano /etc/postfix/main.cf

When the file is opened, scroll down the page until you see the line:

inet_interfaces = all

Now it’s up to you on which interface you want to receive emails. You can either go with the default one this all which listens on all interfaces or you can replace it with loopback-only to listen only on localhost.

Another directive that we need to look at is mydestination, the list of domains that are delivered via the local_transport mail delivery transport. By default, this is the Postfix delivery agent which looks up all recipients in /etc/passwd and /etc/aliases.

Mine is configured to:

mydestination = localhost, localhost.localdomain

After making changes, you need to restart the Postfix.

sudo systemctl restart postfix

Testing the SMTP Server

Now it’s time to test the Postfix whether it can send an email or not using the mail the command which comes with the package mailutils that we installed earlier.

echo "This is the body of the email" | mail -s "This is the subject line" your_email_address

In place of your_email_address, enter the valid email address to which you want to send the email. Now check the account on which you have sent the mail.

That’s it for now.

Here you can read How to log in to the Rainloop admin dashboard?

Read More: How to Change Upload limit On CyberPanel?

How to Change Upload limit On CyberPanel?

How to change time zone on Linux server using command line?

How to change time zone on Linux server using command line?

In this article, we will know How to change time zone on a Linux server using command line. This is a very easy and a few steps process so follow along to change your time zone according to your need.

The Time zone is the standard time for any specific region. The server time zone is a basic and one of the important things. Server time zone set while installing and setup server. Sometimes we need to change our server time zone according to our requirements. There are many ways but here we will go through command line one. This is one of the easy ways while using Linux.

How to check Current TimeZone of your server?

Before changing your server time zone first of all you must know what is the current time zone of your server to do so you just need to run a very simple command. This command is available in all Linux flavors.

open terminal and run:

$ timedatectl
How to check Current TimeZone of your server?

You can see your current time zone of your server.

2. Set / Change Time zone on Linux Server Using Command line:

Before changing your time zone first of all you must have to know about the time zone you want to set. Like if you want to set somewhere in Asia. you must have to know about your region and cit. Now, how you can do it.

For this there is a command to list all time zones:

$ timedatectl list-timezones
List all time zones

Select your required time zone from the list and add it to this cmd.

timedatectl set-timezone “you time zone”

Make sure that you are login from root account if not use sudo with this.

$ sudo timedatectl set-timezone <your specific time zone>
set time zone

After running this run the timedatctl again and verify if time zone updated or not.

$ timedatectl

Now you can see time zone that you set using above methode.

NOTE: Time zone is one of the core important things many features and services depend upon it so before doing anything make sure that you understood all. moreover, you just need a reboot to apply a new time zone on all servers.

Here you can read How to log in to the Rainloop admin dashboard?

Read More: How to Change Upload limit On CyberPanel?

How to Change Upload limit On CyberPanel?

You can follow us on Facebook too.