E-Mail Transport & Relay recipient

Discussion in 'General' started by pyte, Oct 24, 2022.

  1. pyte

    pyte Well-Known Member HowtoForge Supporter

    Hi there!

    I have two questions regarding transport with ISPConfig. When creating a new transport rule there is a field for "sort order"(i guess priority), but i don't know what this settings affects.

    And i've read in a guide that i have to create a relay recipient for transport to work, is this true and shouldn't it be created when i create a transport rule then?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The rules are sorted by that field.

    You must create a relay domain and relay recipient instead of an email domain and mailboxes/aliases to use transports. See also ISPConfig manual for a detailed decsription.
     
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

    Ok i guess i get it now. Without testing it can you tell me what happens when, i create a transport rule "test.com" -> "extern.mail.com", add the correct relay domain and relay recipient entry and at the same time create a virtual mailbox for another user within the same domain? Does this work? So can i have:

    [email protected] -> transport: smtp["extern.mail.com"]
    [email protected] -> virtual mailbox
     
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

    Ok i've tested it; Both at the same time do not work. You can create a transport rule and the required relay entries, when you now create the same domain as an email domain there is no warning but postfix will search the user within the virtual mailbox table and skip transport completly as it seems.

    So there maybe should be an check when creating a E-Mail Domain/Transport Rule in ISPConfig if one already exists in the other table, or is there a case where this works or makes sense?

    //EDIT: Is there a way to add relay domains via the API? Can't seem to find it
     
    Last edited: Oct 24, 2022
  5. remkoh

    remkoh Active Member

    In what world would there be 2 completely different mailservers handling delivery of emails from the same domainname?

    What you're describing lets me to believe you want to deliver emails to [email protected] locally and emails to [email protected] to be forwarded to an external email address like [email protected].
    So you create a mailbox for testuser1 too and set a 'send copy to' address, all in ISPConfig where you also created testuser2's mailbox.
    And if you don't want any local delivery in testuser1's mailbox you also check 'Disable (local) delivery'.

    Keep in mind that when relaying a domain or forwarding emails from a local mailbox to an external mailsystem that checks for valid SPF you'll definitely be running into SPF failures on that mailsystem when the sender's domain has SPF enabled. As your mailserver won't be part of the senders domain SPF record.
    When forwarding emails you can prevent this by implementing SRS (sender rewrite scheme) on your mailserver.
     
    Last edited: Dec 1, 2022
  6. zyzzza

    zyzzza Member

    Could you please explain how this could be done in ISPConfig ? I'm having porblems with SPF when forwarding, but cannot find clear solution for SRS :(
     
  7. pyte

    pyte Well-Known Member HowtoForge Supporter

  8. zyzzza

    zyzzza Member

    Your link says "You do not have permission to view this page or perform this action." :) wrong link, or do i need some access rights ?
     
  9. pyte

    pyte Well-Known Member HowtoForge Supporter

    Oh sorry, that's most likly because you are not a howtoforge supporter then...
    There is the post i refered to:
    There are a few old projects in GitHub, but i never checked them out.
    There was a discussion on the rspsmd GitHub about it with some examples on how to achieve it with rspamd, may have a look there.
     
    Last edited: Jan 22, 2023
    zyzzza likes this.
  10. remkoh

    remkoh Active Member

Share This Page