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.

RELAY HOST LIST PER LOCATION:

LOCATIONRELAY HOST DOMAIN
Chicago (CHI)chi-tls.heficed.com:587
Los Angeles (LAX)lax-tls.heficed.com:587
Reston (RES)res-tls.heficed.com:587
London (LON)lon-tls.heficed.com:587
Frankfurt (FRA)fra-tls.heficed.com:587
São Paulo (SAO)sao-tls.heficed.com:587
Johannesburg (JHB)jhb-tls.heficed.com:587

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

STEP 1

Connect to your server and navigate to the postfix folder.

cd /etc/postfix/

Open main.cf file with your favorite file editor.

vi main.cf

STEP 2

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 lon-tls.heficed.com:587

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.

STEP 3

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:

heficed.com smtp: lon-tls.heficed.com:587 
postmap hash:/etc/postfix/transport
heficed.com smtp

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

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

STEP 4

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 ->https://heficed.com/kb/installation/how-to-set-up-tls-for-mailing/ Please enable TLS for my server and the following additional ips: Used relayhost domain: lon-tls.heficed.com:587 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.

STEP 5

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 support@heficed.com

Was this article helpful?

Need support?

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