To route your emails through Mailjet’s SMTP server you will only have to modify your SMTP settings using our hostname, port and your SMTP credentials.
Mailjet’s host name is in-v3.mailjet.com.
Here’s the list of ports that Mailjet is supporting:
| Port | TLS | SSL |
|---|---|---|
| 25 | Optional | No |
| 80 | Optional | No |
| 465 | No | Yes |
| 587/588 | Optional | No |
| 2525 | Optional | No |
Read our blogpost for details on the supported SMTP ports.
Access your Mailjet account and go to the [SMTP section(https://app.mailjet.com/account/relay) to find your SMTP credentials.
You can configure your Postfix to send via in.mailjet.com relay, depending on the sender, by following these steps:
In this example, all outgoing emails are sent directly to Mail eXchangers (MX), except when From is *@example.com or example@example.net, which are going through Mailjet.
Caution: for Postfix, a sender is not the From: but the sender envelope passed to sendmail (in the 5th mail() argument: -fexample@example.com or in PHP config php.ini : sendmail_path = /path/to/sendmail -t -i -fexample@example.com).
In /etc/postfix/main.cf (remove relayhost).
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwdIn /etc/postfix/sender_relay, list addresses that must go through a relay.
@example.com in.mailjet.com
example@example.net in.mailjet.comIn /etc/postfix/saslpasswd, provide credentials for each address listed in /etc/postfix/senderrelay.
@example.com apikey:secretkey
example@example.net apikey2:secretkey2Don't forget the following commands.
cd /etc/postfix
chmod 600 sasl_passwd
chown root:root sasl_passwd
postmap sasl_passwd sender_relay
postfix reload- Desktop email clients (Outlook, Apple Mail, Thunderbird)
- MTA & MDA (exim)
- Frameworks and Languages (Php, Java, Asp.net, Zend, CodeIgniter)
- Webmail (Gmail and Google Apps)