Relaying email domain

Discussion in 'Installation/Configuration' started by remkoh, Dec 3, 2022.

  1. remkoh

    remkoh Active Member

    I've ran into an unexpected problem relaying emails sent to a domain to another host.
    In ISPConfig I've added the mail domain and set a relayhost for it expecting all emails sent to the domain would be relayed to the set host.
    Except now I see errors in the logs saying the email address doesn't exist.
    So it looks like emails are not relayed but delivered local.
    Testing the query in mysql-virtual_sender-relayhost.cf (which is set in Postfix' main.cf for sender_dependent_relayhost_maps) does give me the relayhost I've set.
    If I delete the mail domain in ISPConfig and create a map file for sender_dependent_relayhost_maps by hand it does work as expected.
     
    Last edited: Dec 3, 2022
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do not add a mail domain if you want to use the system as a relay. A mail domain is for local delivery only, so when you add a mail domain you can not relay for that domain and have to add local mailboxes. Just add a relay domain and relay recipients in ISPConfig mail module (menu on the left side, near the bottom).
     
    ahrasis likes this.
  3. remkoh

    remkoh Active Member

    Then what's the function of the relay settings in a mail domain?
    When you add a relay domain and relay recipients you're not given an option where to relay to.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    That's what you define in email routing in ISPConfig.
     
  5. remkoh

    remkoh Active Member

    Thank you for clearing that up.

    But what about the relay settings in a mail domain?
    What is it used for?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no relay setting in email domain in ISPConfig, see screenshot: 2022-12-03 19_29_11-ISPConfig.png
     
  7. remkoh

    remkoh Active Member

    Then it's removed in 3.2.9?

    My 3.2.8p2 installation looks like this:
    upload_2022-12-3_20-6-38.png
     
  8. Benedict

    Benedict New Member HowtoForge Supporter

    This feature is not enabled by default. See Main Configuration > Mail. Then use, for example, third-party SMTP relays.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Plus, it's for relaying outgoing emails sent from mail users of this domain, not incoming emails for this domain.
     
  10. remkoh

    remkoh Active Member

    Can't remember enabling it ever. Running this system for some years now and haven't had te need to relay incoming domains until now.

    Thanks for all the explanations. I'll look into the previous suggested relay options.
     

Share This Page