58

Installing postfix3 on CentOS 7 | ComputingForGeeks

 2 years ago
source link: https://computingforgeeks.com/installing-postfix3-on-centos-7/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

This guide will take you through the steps of Installing postfix3 on CentOS 7. Before diving to installation of postfix 3 on CentOS 7, let’s first define what’s postfix.

What is Postfix?

Postfix, designed by Wietse Venema, is a mail server built with security in mind and specifically
designed to replace Sendmail. Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail

There are several different components to the email system which work together to move, deliver or
retrieve your email.  These includes but not limited to:

  • Mail Transfer Agent (MTA)
  • Mail Delivery Agent (MDA)
  • Mail User Agent (MUA)

Postfix has several hundred configuration parameters that are controlled via the main.cf  file.

Adding Postfix 3 mirrors

Let’s add the repository:

vim /etc/yum.repos.d/gf.repo
[gf]
name=Ghettoforge packages that won't overwrite core distro packages.
mirrorlist=http://mirrorlist.ghettoforge.org/el/7/gf/$basearch/mirrorlist
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-gf.el7
failovermethod=priority

[gf-plus]
name=Ghettoforge packages that will overwrite core distro packages.
mirrorlist=http://mirrorlist.ghettoforge.org/el/7/plus/$basearch/mirrorlist
# Please read http://ghettoforge.org/index.php/Usage *before* enabling this repository!
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-gf.el7
failovermethod=priority

You can now go ahead and update yum cache:

yum clean all
yum makecache fast

Test by searching postfix3 packages:

# yum search postfix3
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
========== N/S matched: postfix3 =======================
postfix3.x86_64 : Postfix Mail Transport Agent
postfix3-cdb.x86_64 : CDB Database Support for Postfix
postfix3-ldap.x86_64 : LDAP Database Support for Postfix
postfix3-lmdb.x86_64 : LMDBtabase Support for Postfix
postfix3-mysql.x86_64 : MySQL Database Support for Postfix
postfix3-pcre.x86_64 : PCRE Database Support for Postfix
postfix3-perl-scripts.x86_64 : Postfix utilities written in perl
postfix3-pgsql.x86_64 : PostgreSQL Database Support for Postfix
postfix3-sqlite.x86_64 : SQLite Database Support for Postfix

Proceed to Installing postfix3 on CentOS 7. Add any additional packages you want.

yum -y install postfix3 postfix3-ldap postfix3-mysql postfix3-mysql

Check installed postfix3 version:

# rpm -qi postfix3
Name : postfix3
Epoch : 2
Version : 3.2.2
Release : 4.gf.el7
Architecture: x86_64
Install Date: Thu 07 Sep 2017 09:16:33 PM EAT
Group : System Environment/Daemons
Size : 10447398
License : IBM
Signature : RSA/SHA1, Mon 24 Jul 2017 02:20:56 AM EAT, Key ID d005ae31da8b7718
Source RPM : postfix3-3.2.2-4.gf.el7.src.rpm
Build Date : Mon 24 Jul 2017 02:20:11 AM EAT
Build Host : builder-01.ghettoforge.org
Relocations : (not relocatable)
Packager : [email protected]
Vendor : GhettoForge
URL : http://www.postfix.org
Summary : Postfix Mail Transport Agent
Description :
Postfix is a Mail Transport Agent (MTA), supporting LDAP, SMTP AUTH (SASL),
TLS

Starting postfix3 service

To start postfix3 on CentOS 7, do:

systemctl start postfix.service

Enable postfix to start on boot up:

systemctl enable postfix

Check postfix status:

systemctl status postfix

Open postfix smtp and smtps ports on firewall.

firewall-cmd --add-service={smtp,smtps} --permanent

Confirm firewall configurations:

# firewall-cmd --list-services 
http smtp dhcpv6-client snmp smtps ssh https

Now you are rolling with Postfix3 on your CentOS 7 server. In our next tutorial, I’ll cover how to integrate LDAP and postfix for relay access restrictions. Until then, keep checking for new articles and subscribe to our email alerts.

After installing Postfix, you can look at my cheat sheet on Postfix administration:

Postfix Commands Administration Cheat Sheet

Search Tags:

How to install postfix 3 on CentOS 7, Postfix version 3 on CentOS, Posftix and LDAP installation on CentOS 7, Installing postfix 3 on CentOS.

See Also:

Easiest way to install letsencrypt on Linux

How to subscribe CentOS Server to Katello/Foreman

How to create local CentOS 6 and CentOS 7 mirrs

How to Install cbpolicyd On CentOS 7


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK