How to setup SMTP Relay in Webmin/Virtualmin?

3 posts / 0 new
Last post
#1 Tue, 04/01/2014 - 20:21
s3w47m88

How to setup SMTP Relay in Webmin/Virtualmin?

Can anyone explain to me how to setup an SMTP relay in Webmin/Virtualmin? I'd like to set them up to use MailJet.com's service.

Thanks!

Sat, 04/12/2014 - 23:16
s3w47m88

Bump.

Fri, 04/17/2015 - 10:32
nilbud

To configure Postfix for relaying emails through mailjet

postconf -e 'relayhost = in-v3.mailjet.com'
postconf -e 'smtp_sasl_auth_enable = yes'
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
postconf -e 'smtp_sasl_security_options ='

Create the file sasl_passwd and insert the following line

in-v3.mailjet.com [Big lump of password from mailjet]

I used sudo nano sasl_passwd and pasted it in but you could do this instead

echo "in-v3.mailjet.com [Big lump of guff from mailjet]" > /etc/postfix/sasl_passwd
chown root:root sasl_passwd
chmod 600 sasl_passwd

Now convert /etc/postfix/sasl_passwd into a format that Postfix can read:

postmap /etc/postfix/sasl_passwd

This will create the file /etc/postfix/sasl_passwd.db.

All that is left to do is restart Postfix:

/etc/init.d/postfix restart

The following links are good info.

https://app.mailjet.com/account/setup

and

https://www.howtoforge.com/postfix_relaying_through_another_mailserver

Topic locked