Configure relayhost for sending to Microsoft domains

Discussion in 'Installation/Configuration' started by agenturadler, Jun 15, 2026 at 5:04 PM.

  1. agenturadler

    agenturadler New Member

    Hi all,
    I want to configure a relayhost for sending mails to Microsoft. Unfortunately, Microsoft set a rate limit to our server and is not willing to respond to any message from us or our ISP since more than 3 months.

    I’ve found some tutorials to set up such relayhosts manually with `transport_maps`. But I just want to check, if this is possible via the UI as well.

    As far as I understood, the relayhost configuration entry under Settings is a general configuration for all mails. Otherwise, I haven’t found any possibility to configure a relayhost based on the recipient domain.

    Thank you for your help.
    Kind regards, Christian
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig has a general relay setting and a setting per sender domain. There is no relay for a specific recipient; you will have to configure that manually in Postfix.
     
  3. agenturadler

    agenturadler New Member

    Thank you Till for the feedback.

    Here is a brief summary of what I did to ensure that emails can be sent to Microsoft addresses via a relay host.
    1. Get an outbound smtp service like outboundsmtp.com, sweego.io, smtp2go, etc.
    2. Set up all sending domains at this service and add all SPF and DKIM records for each domain in your DNS
    3. Configure postfix to send all mails to Microsoft addresses via the relayhost
    How to configure postfix
    1. Create a transport_map
      Code:
      nano /etc/postfix/transport
      --
      /.*@hotmail.*/i    relay:[YOUR-SERVICE-URL]:PORT
      /.*@outlook.*/i    relay:[YOUR-SERVICE-URL]:PORT
      /.*@live.*/i       relay:[YOUR-SERVICE-URL]:PORT
      /.*@msn.*/i        relay:[YOUR-SERVICE-URL]:PORT
      --
      postmap hash:/etc/postfix/transport
    2. Create sasl_passwd
      Code:
      nano /etc/postfix/sasl_passwd
      --
      [YOUR-SERVICE-URL]:PORT user:pwd
      --
      postmap hash:/etc/postfix/sasl_passwd
    3. Add or adapt postfix configuration
      Code:
      nano /etc/postfix/main.cf
      --
      transport_maps = regexp:/etc/postfix/transport
      smtp_sasl_auth_enable = yes
      smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
      smtp_sasl_tls_security_options = noanonymous
      smtp_tls_security_level = encrypt or dane
      --
      postfix check && systemctl restart postfix
    If you don't use a regex for matching the mail address, you need to use "hash:" instead of "regexp:" in your main.cf for transport_maps. If you have more transport_maps configured, you can separate them with a colon.
     
    Last edited: Jun 17, 2026 at 6:01 PM

Share This Page