How to set up TLS for mailing?

This guide was made using CentOS 7 and Postfix service. Make sure you have done the basic configuration of postfix before setting up TLS.


Chicago (CHI)
Los Angeles (LAX)
Reston (RES)
London (LON)
Frankfurt (FRA)
São Paulo (SAO)
Johannesburg (JHB)

IMPORTANT! Make sure to use the same location relay host domain as you server.


Connect to your server and navigate to the postfix folder.

cd /etc/postfix/

Open file with your favorite file editor.



Find the relayhost line and add domain address from the RELAY HOST PER LOCATION list (look at the beginning of this article).

In this example

Set up TLS, find relayhost

IMPORTANT! Make sure to uncomment the line (remove #)

Find a TRANSPORT MAP section and add a line:

transport_maps = hash:/etc/postfix/transport
Transport maps at TLS

After both lines are changed save and close the file.


With file editor open file transport

vi transport

Sometimes the transport file is not created while installing postfix, in that case just create a new file and name it transport.

Inside the file in the beginning add these two lines: smtp: 
postmap hash:/etc/postfix/transport smtp

IMPORTANT! Make sure to change the information accordingly to your needs: 1. change with your domain name. 2. change to the same as used in relayhost line.

After these two lines are added save and close the file.


Restart the postfix service. In CentOS 7:

systemctl restart postfix

After everything is done you can try sending mail.

IMPORTANT! Your mail will not be delivered until we (Heficed Support) add your server to our filtering list.

To do that please create a Technical Support Ticket at your terminal and fill this form down below:

Subject: “Request to enable TLS for my server/ips” Hello, I have configured my mail server using -> Please enable TLS for my server and the following additional ips: Used relayhost domain: Server location: London (LON) Server IP: x.x.x.x Additional mailing ips: x.x.x.y x.x.x.z Let me know when TLS is enabled.

IMPORTANT! Make sure to change BOLDED information accordingly to your case.


Sit back and relax your job is done!

Once our team adds your server and ips to the filtering list we will let you know.

If you have any further questions, make sure to create a Ticket or contact us directly at

Was this article helpful?

Need support?

If you need any further help, don't hesitate to send a support request to our support team.