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!
Bump.
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_passwdchown root:root sasl_passwdchmod 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
Bump.
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