Using Mailrelay as a relay host for Postfix or Exim

You can easily configure Mailrelay's SMTP as a relay host for Postfix and Exim.


TABLE OF CONTENTS


Configuring Postfix


  1. Edit the file /etc/postfix/main.cf and add the following content:
    relayhost = [smtp1.s.ipzmarketing.com]:587
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = static:MAILRELAY_SMTP_USERNAME:MAILRELAY_SMTP_PASSWORD
    smtp_sasl_security_options = noanonymous
    Make sure that you have replaced MAILRELAY_SMTP_USERNAME and MAILRELAY_SMTP_PASSWORD with the credentials that you generated. 
  2. Restart Postfix and the emails should now be sent using Mailrelay's SMTP server.


Configuring Exim

  1. Edit your exim.conf, find the routes section and add the following content:
    # This must be placed in the routes section
    mailrelay:
            driver = manualroute
            domains = ! +local_domains
            transport = mailrelay_transport
            route_list = * smtp1.s.ipzmarketing.com byname
  2. Edit /etc/exim/passwd.client and add your credentials:
    smtp1.s.ipzmarketing.com:MAILRELAY_SMTP_USERNAME:MAILRELAY_SMTP_PASSWORD

    Make sure that you have replaced MAILRELAY_SMTP_USERNAME and MAILRELAY_SMTP_PASSWORD with the credentials that you generated.

  3. Restart Postfix and the emails should now be sent using Mailrelay's SMTP server.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article