Configure a Null Client Mail Server on RHEL / CentOS 7 - CentLinux


Monday, 3 December 2018

Configure a Null Client Mail Server on RHEL / CentOS 7

Configure a Null Client Mail Server in RHEL

A null client is a client machine that runs a local mail server which forwards all emails to an outbound mail relay server for delivery. A null client does not accept local delivery for any messages, it can only send them to the outbound mail relay server. Users may run mail clients on the null client to read and send emails.

In Red Hat Enterprise Linux (RHEL) 7, default mail server is postfix (a powerful but easy-to-configure mail server). In this article, we will configure a null client using postfix mail server.


System Specification:

There is no special requirement for null client. Therefore, we are using a virtual machine with following specification.

  • Operating System - Red Hat Enterprise Linux (RHEL) 7
  • Hostname -
  • IP Address -
  • Email Relay Host -


Installing Postfix on RHEL 7:

Connect to using ssh, and install postfix using yum command.

[root@server1 ~]# yum install -y postfix Loaded plugins: langpacks, product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Resolving Dependencies --> Running transaction check ---> Package postfix.x86_64 2:2.10.1-6.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================== Package Arch Version Repository Size ========================================================================================================================== Installing: postfix x86_64 2:2.10.1-6.el7 localyum 2.4 M Transaction Summary ========================================================================================================================== Install 1 Package Total download size: 2.4 M Installed size: 12 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : 2:postfix-2.10.1-6.el7.x86_64 1/1 Verifying : 2:postfix-2.10.1-6.el7.x86_64 1/1 Installed: postfix.x86_64 2:2.10.1-6.el7 Complete!

Configure postfix using postconf command.

[root@server1 ~]# postconf -e 'relayhost=[]' [root@server1 ~]# postconf -e 'inet_interfaces=loopback-only' [root@server1 ~]# postconf -e '' [root@server1 ~]# postconf -e 'mydestination=' [root@server1 ~]# postconf -e 'local_transport=error: local delivery disabled' [root@server1 ~]# postconf -e 'mynetworks=,[::1]/128' [root@server1 ~]# systemctl start postfix.service ; systemctl enable postfix.service

Our null client mail server on RHEL 7 has been configured successfully.

No comments:

Post a Comment