Configuring another server to relay emails using MIAB

I have two AWS instances.
AWS1: Mail in a box
AWS2: A Wordpress website with postfix.
I want to relay emails from AWS2 using MIAB SMTP.
I configured Postfix on** AWS2** as follows:

Install necessary packages
sudo apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules

Configure Postfix
vim /etc/postfix/main.cf

Added the following lines
relayhost = [box.example.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes

After that I created
vim /etc/postfix/sasl_passwd

Added
[box.example.com]:587 USERNAME@example.com:PASSWORD

Fixed the permission and updated postfix config to use sasl_passwd file:
sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd

Reloaded the postfix
sudo /etc/init.d/postfix reload

Is there any step I missed?

Note:- I am still using self generated ssl certificate by MIAB.
Do I need to get SSL certificate to resolve this issue?

Any reason you can’t use a SMTP login to MIAB to send mail from your Wordpress install?

I am not sure about the reason. But yes my mails aren’t getting relayed from MIAB.

Anyone to help me out!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.