Local addresses

If your server has multiple IP addresses/interfaces available, you can configure EmailEngine to use these whenever making an outbound connection to an email server.

Using multiple addresses is primarily helpful if you are making many connections and might get rate limited by destination server based on your IP address. This approach allows you to distribute connections between separate IP addresses.

Set up local addresses

Open the Network configuration page.

On this page, you can manage network-related configurations like proxying and local addresses.

Choose address selection strategy.

EmailEngine can either use the default address, assign a static address for each account or select a random address every time a new connection to an email server is made.

Set up address pool.

EmailEngine provides you with a list of IP addresses it can use. Check all addresses that are valid for your use case. If you happen to remove an address that is used as a static address for some accounts, then no need to worry – EmailEngine will automatically pick another one.

Proxies as an alternative

In addition to local addresses, you can route all your connections through proxy servers. The email server would see the proxy server's IP address as the client IP.

EmailEngine supports HTTP CONNECT-based proxies and SOCKS proxies (versions 4 and 5).

The format of the Proxy URL is the following:

proxytype://username:password@server:port

Example HTTP proxy with username and password (if the server is using a standard HTTP or HTTPS port, then you do not have to specify it):

http://andris:verysecret@proxy.example.com

Example SOCKS5 proxy url:

socks5://proxy.example.com:1080

Option 1 – global proxy

On the same network configuration page, as shown above, you can also set up a global proxy. In that case, all connections, both for IMAP and SMTP, would be proxied through this specific proxy server. This is primarily useful when your network is private, and you have to make requests through a dedicated proxy server with a public interface.

Option 2 – account specific proxies

Another option is to set up account-specific proxies. When creating or updating an account, use the proxy property that takes the proxy URL as its value.

The following example sets up the account to make all IMAP/SMTP connections for that account through a proxy server at socks5://proxy.example.com:1080

curl -XPOST "http://127.0.0.1:3000/v1/account" \
    -H "Authorization: Bearer f77cf263b70488..." \
    -H "Content-type: application/json" \
    -d '{
      "account": "example",
      "name": "Andris Reinman",
      "email": "andris@example.com",
      "proxy": "socks5://proxy.example.com:1080",
      "imap": {
        "auth": {
          "user": "andris",
          "pass": "sercretpass"
        },
        "host": "mail.example.com",
        "port": 993,
        "secure": true
      },
      "smtp": {
        "auth": {
          "user": "andris",
          "pass": "secretpass"
        },
        "host": "mail.example.com",
        "port": 465,
        "secure": true
      }
    }'