Article overview

Help article

Using the VPS mail service with Postfix

On our VPS's you can always use our VPS mail service free of charge, also referred to as 'Carefree Mailing'. With this service you will use our mail services to relay outgoing e-mail. In order to use the mail service, a one-time configuration of Postfix on your VPS is required.

When using the mail service you will no longer have to worry about mails being delivered in the spamfolder due to incorrect reverse DNS or SPF-records, or because a blacklist is blocking mails from your IP-address.

To successfully set this up you will need to perform some configuration changes on your VPS to make sure your VPS and domains are properly authenticated for the use of our platform.

  • The easiest method for configuring the mail service is using the wizard in the control panel. Click here to immediately be taken to the wizard.
  • The mailservice is not an MTA. A working installation of Postfix on your VPS is required.

Configuring Postfix manually

Use these steps if you're not using the wizard. First, consult this article if you haven't already, in order to retrieve your username and password, as well as to configure the required DNS records for your domain. Then, follow the steps below in your VPS-console or using SSH.

 

Step 1

Log in onto your BladeVPS via the console or via SSH and make sure you are running as 'root' or use the 'sudo' command to perform these steps.


 

Step 2

Open the file /etc/postfix/main.cf (or /usr/local/etc/postfix/main.cf is case of FreeBSD):

nano /etc/postfix/main.cf

 

Stap 3

Add the following to the file:

relayhost = vps.transip.email:587
 smtp_sasl_auth_enable = yes
 smtp_sasl_security_options = noanonymous
 smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
 smtp_use_tls = yes
 smtp_tls_security_level = encrypt
 smtp_tls_note_starttls_offer = yes

 

Step 4

Save the changes and exit. In nano this can be done using ctrl + x > y > enter. In vi(m) you can write and close via ':wq!'.


 

Step 5

Create and open the file /etc/postfix/sasl_passwd,for example by using:

nano /etc/postfix/sasl_passwd

 

Step 6

Add the following and then write and close the file (ctrl + x > y > enter for nano).

vps.transip.email:587 [username]@vps.transip.email:[password].

The username and the password can be found using the steps in this article.


 

Step 7

Execute the following command:

postmap hash:/etc/postfix/sasl_passwd

If you are running CentOS, ArchLinux, FreeBSD of OpenBSD, you will need to install the 'cyrus-sasl'-package of 'postfix-sasl'-package. For CentOS for example, you can use:

yum -y install cyrus-sasl-plain

 

Step 8

Reload Postfix, using one of the two commands below.

systemctl restart postfix
service postfix reload

Postfix has now been successfully been configured for using the mail service and you can start mailing!


 

Should you have any questions left regarding this article, do not hesitate to contact our support department. You can reach them via the ‘Contact Us’ button at the bottom of this page.

If you want to discuss this article with other users, please leave a message under 'Comments'.

 

Has this article been helpful?

Create an account or log in to leave a rating.

Comments

Create an account or log in to be able to leave a comment.

0
nicferrier May 23, 2023 (#9949)

Is there a way to test the outgoing usage of the mail service? I have a complex postfix config with dovecot SASL integration on the SMTPD side. I am pretty sure those don't interfere but I am getting an error from your relay and I can't work out what's going wrong. A separate test would help establish.

0
Matthijs van Beek Admin August 21, 2020 (#4686)

@markedge,

If you're running into errors, could you send our support department a message (using the 'Contact us' button below) including after which step you're receiving this error and a paste of the relevant config files (e.g. /etc/postfix/main.cf)

0
markedge May 2, 2020 (#4359)

no such file or directory