Splitting email domain into transactional and personal

Discussion in 'ISPConfig 3 Priority Support' started by Trix, Aug 29, 2020.

  1. Trix

    Trix Member

    Hello,

    I have two servers at the moment one with a full setup (web, ftp, db) including mail (A) and a standalone mail server(B) that is connected to the first.
    What i want to achieve if its possible is to split a mail domain into 2. What is mean by this is that lets say we have a [email protected] mailbox and a [email protected] mailbox then i want the [email protected] to be sent from server A (transactional mail) and the mailing involving [email protected] to be sent from the dedicated mail server B.

    Since i have ISPConfig dashboard installed only on server A i cant create two email domains one pointing to server A and the other pointing to server B since it will throw an error that the email domain allready exists.

    Is this kind of setup possible with ispconfig and if yes please share your oppinion.

    Many thanks,
    Trix
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  3. Trix

    Trix Member

    The linked thread contains only my first post i cant see any other repllies there.
    I purchased a membership so i can post here maybe i will get faster replies.
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Weird, but i'll answer it again.

    If server A and B are separate servers (not in the same ISPConfig setup), you can create the mailaccount on both servers and log in to server B to sent from info@. Make sure you add the IP address of server B to your SFP record. But if your MX record is pointed to server A, email to info@ will still be received on server A.
     
  5. Trix

    Trix Member

    Server A is the main server (also has a mail set up). Server B is a dedicated mail server that is connected to Server A ispconfig (They are in the same ISPConfig setup just sepparete servers). In this case is there any way to split emails so that noreply@ will be sent from server A and info@ from Serve B ?
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Setup server B as mirror and then log in to server B
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Mail is sent from that server that you connect with your mail client to and the sending server must be allowed to send for that domain, so mirroring as @Th0m mentioned is one option, but servers must be set up for mirroring then, that#s nothing that can be enabled just with a few clicks. Personally, I won't do such a setup to split sending for the same domain in such a way.
     
    Th0m likes this.
  8. Trix

    Trix Member

    Ok thank your for pointing out the possibilities. This helped alot in making a decision.
    Cheers.
     
  9. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Another option if you only care about sending via the separate servers (not receiving via 2 servers) is to setup one server, say server A, to handle all mail for the domain, then just relay mail from info@ through server B. Your mx record points to server A, and all your mail clients (including info@) send via server A, then server A relays the mail via server B for info@.

    There are two postfix config maps which could achieve that,
    sender_dependent_relayhost_maps and sender_dependent_default_transport_maps. This is untested, but on server A set:
    Code:
    sender_dependent_relayhost_maps = texthash:/etc/postfix/sender_relaymap
    Then create /etc/postfix/sender_relaymap with:
    Code:
    [email protected]  server-B.domain.com
    I don't think you need
    Code:
    smtp_sender_dependent_authentication = yes
    but if it isn't working, try setting that.

    And you'll setup server B to allow relaying from server A (or maybe just from the info@ address), eg. add server A to mynetworks, or use smtpd_relay_restrictions to specify a map with check_sender_access to allow [email protected].
     
    nhybgtvfr and Th0m like this.
  10. Trix

    Trix Member

    Hey Jesse

    Thank you for the tip. I will try it out this weekend and will check back with the results.

    Cheers!
     

Share This Page