# Standard Configuration

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.

## SMTP hostname

Mailjet’s host name is `in-v3.mailjet.com`.

## SMTP Ports

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](https://www.mailjet.com/blog/news/which-smtp-port-mailjet/) for details on the supported SMTP ports.

### SMTP Credentials

Access your Mailjet account and go to the [SMTP section](https://app.mailjet.com/account/relay) to find your SMTP credentials.

## Postfix Installation

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_passwd
```

In /etc/postfix/sender_relay, list addresses that must go through a relay.

```
@example.com in.mailjet.com
example@example.net in.mailjet.com
```

In /etc/postfix/saslpasswd, provide credentials for each address listed in `/etc/postfix/senderrelay`.

```
@example.com apikey:secretkey
example@example.net apikey2:secretkey2
```

Don't forget the following commands.

```
cd /etc/postfix
chmod 600 sasl_passwd
chown root:root sasl_passwd
postmap sasl_passwd sender_relay
postfix reload
```

### Other Configurations

- Desktop email clients ([Outlook](https://uk.mailjet.com/support/how-do-i-change-my-smtp-settings-in-outlook,98.htm), [Apple Mail](https://uk.mailjet.com/docs/apple-mail-smtp-setup), [Thunderbird](https://uk.mailjet.com/docs/thunderbird-smtp-setup))
- MTA & MDA ([exim](https://uk.mailjet.com/docs/code/exim))
- Frameworks and Languages ([Php](https://uk.mailjet.com/docs/code/php), [Java](https://uk.mailjet.com/docs/code/java), [Asp.net](https://uk.mailjet.com/docs/code/asp), [Zend](https://uk.mailjet.com/docs/code/php/zend), [CodeIgniter](https://uk.mailjet.com/docs/code/php/codeigniter))
- Webmail ([Gmail and Google Apps](https://uk.mailjet.com/support/how-to-set-up-mailjet-s-smtp-with-gmail,110.htm))