Check for Mail Routing/Mail Domain

Discussion in 'Developers' Forum' started by pyte, Nov 19, 2024.

  1. pyte

    pyte Well-Known Member HowtoForge Supporter

    Hi,
    quick thought regarding the E-Mail Domain and E-Mail Routing feature:
    I currently manage quite a few "E-Mail Routing" transport rules to relay mail to our exchange servers for customers. When I log in with a customers credentials, I cant see their E-Mail Routing settings, which is fine. However, I do have a slight concern: what if a customer adds their domain under "E-Mail Domain" because they assume it should be there? This could potentially break the existing transport rules.

    Would it make sense to implement a check within the interfaces create functions? For instance, if someone tries to create an "E-Mail Domain" but there is already an existing "E-Mail Routing" entry (or vice versa), there could be shown a warning about the potential conflict.

    Any thoughts?
     
    ahrasis and michelangelo like this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, we should add such a check. The other way round too (adding a transport when there is already a email domain).
     
    ahrasis and remkoh like this.
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

    So would the approach to extend the validate_mail_transport.inc.php for both functions be the preferred one? Or do you think we should separate them allthough i can't seem to find a validate_ for mail_domain or mail itself?
     
    ahrasis likes this.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe we should add the transport validation in validate_mail_transport.inc.php and add a similar new file for mail domain, just to keep things tidy and organized. If you look up such things in a few years, you would likely not expect to find the mail domain validation in the transport file, so we better make a new file for the mail domain check.
     
    ahrasis likes this.
  5. pyte

    pyte Well-Known Member HowtoForge Supporter

    remkoh, ahrasis and till like this.

Share This Page