habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Alma Linux 8 – Postfix SMTP Server

1 min read

Alma Linux 8 – Postfix SMTP Server

Today, i will write about postfix smtp server in Alma linux 8. Alma linux is the successor of the discontinued centos. Alma linux claim forever-free enterprise Linux distribution, focused on long-term stability, providing a robust production-grade platform. And also 1:1 binary compatible with RHEL® and pre-Stream CentOS.

Installing Postfix

On your Alma linux server, run the following commands.

yum install postfix -y

Once it’s installed, start Postfix SMTP server.

sudo systemctl start postfix

And enable auto-start at boot time.

sudo systemctl enable postfix

Now you can check its status with:

systemctl status postfix

Check Postfix version with this command:

root@server# postconf mail_version

mail_version = 3.5.8

Alma Linux 8 ships with Postfix v3.5.8.

Configuring Alma Linux 8 postfix

Listening on the public IP address

[root@server]# postconf inet_interfaces

inet_interfaces = localhost

We need to run the following command to configure Postfix to listen on the public IP address so it will be able to receive emails from other SMTP servers. The -e option enables postconf to edit the Postfix main configuration file.

sudo postconf -e "inet_interfaces = all"
postconf myhostname

Postfix uses this hostname to identify itself when communicating with other SMTP server.

sudo postconf -e "myhostname = mail.yourdomain.com"

Setting $myorigin Parameter

The $myorigin parameter specifies the default domain name that will be appended to sender and recipient addresses that have no @domain part. The default is to use the value of $myhostname, as can be seen with:

postconf myorigin


myorigin = $myhostname

You need to change its value to yourdomain.com, so a sender on your mail server will have @yourdomain.com address.

sudo postconf -e "myorigin = yourdomain.com"

Setting $mydestination Parameter

The $mydestination parameter specifies the list of domains that your server considers itself the final destination for. You can display the current value of $mydestination with:

postconf mydestination


mydestination = $myhostname, localhost.$mydomain, localhost

Default postfix SMTP server to receive emails coming for [email protected][email protected] and someone@localhost, but it won’t allow you Postfix SMTP server to receive emails coming for [email protected]. In order to achieve that, add yourdomain.com to the list of domains.

sudo postconf -e "mydestination = yourdomain.com, \$myhostname, localhost.\$mydomain, localhost"

Restarting Postfix

Finally, we need to restart Postfix for the changes to take effect.

sudo systemctl restart postfix

Ok, thats it. Please feel free for comment out. Maybe usefull.

See also  Log Zimbra.log not Show Anything

Credit Article: www.linuxbabe.com

Let's Buy Me Coffee.

Buy Me a Coffee at ko-fi.com

habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Easy Create Laravel Project with Composer

Requirement Laravel, a popular PHP framework, is renowned for its elegant syntax and robust features, making it a top choice for web developers. One...
1 min read

Virtualbox Change Storage Size

Changing the storage size of a virtual machine in VirtualBox involves a few steps. Here’s a general guide. Backup your Virtual Machine (VM) Before...
35 sec read

Easy Setup Logrotate Nginx Ubuntu

Log rotation is an important aspect of managing log files on a Linux system, including those generated by Nginx. Logrotate is a utility that...
1 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Never miss good article from us, get weekly updates in your inbox