Change hostname to have different domain single install

Discussion in 'Server Operation' started by senormedia, May 9, 2020.

  1. senormedia

    senormedia Member HowtoForge Supporter

    I currently have one server install
    with
    A mail.domain.com handled by IP
    mx domain.com is handled by panel.domain.com

    I want to change it to mail.domain.com that way if someones set ups a mail on gmail to add it on the hostname instead of panel.domain.com

    Do i need to add to the host
    ipaddress mail.domain.com

    so it can register is as that or im stuck with the panel.domain
     

    Attached Files:

  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I'm not sure I understand what you are asking. And it seems you have several questions today in different threads, but I am too lazy to read the other threads to maybe get a clue.
    But you can name your e-mail server anything you want, and mailname can be different from the hostname it otherwise uses.
    You can also change the MX record, if that is what you are asking. The FQDN you have in MX record must have A record in name service.
    Maybe it would be easier to use ISPConfig to set up and maintain your servers?
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Sure. If you want you can separate all main services in a server to operate own their own domain like mail.domain.com for your mail service, panel.domain.com for your web panel etc; so long they are properly setup and work; and you can always have each of them secured using LE SSL too.

    In relation to your mail service problem, I don't think the problem was the hostname panel.domain.com but something else which you need to check and verify. I can't help much on mail service though as I use gSuite instead.
     
    Last edited: May 9, 2020
  4. senormedia

    senormedia Member HowtoForge Supporter

    Taleman thank you, The other questions are about the extra nginx server different than this one

    Ill give that a try
    So instead of adding
    Mx domain.com by panel.domain.com change that to
    Mx domain by mail.domain.com

    Do i need to add mail.domain.com on the host file

    Ahrasis
    https://www.howtoforge.com/community/threads/change-emails-hostname.13640/

    I think this might have the answer. I still want to have panel.domain.com to login but for the email to have mail.domain.com but without multi server just on a single install
     
    Last edited: May 9, 2020
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    As I said, that is possible.
     
  6. senormedia

    senormedia Member HowtoForge Supporter

    Ok so could not figure it out
    So im adding the additional mail server
    After i add the mail server
    What will happen to my emails with the panel.domain.com.

    Reason im asking its because i have to change mx
    domain.com by panel.domain.com
    To
    domain.com by mail.domain.com
    Wouldnt that make them stop working.
    Or does the a record take care of that.
    Do i just change the server for the client for mail and tools sync.

    Let me know before i add it dont want to mess it up
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The MX record has to point to the server that receives the emails for a specific domain name, it is not a record that defines which server is sending email. You should add all servers that are allowed to send emails into the SPF record of that domain though.
     
  8. senormedia

    senormedia Member HowtoForge Supporter

    Gotcha i understand what i do on ispconfig now, for the a record not defining the sending server i understand that my question for that was more of
    the mx
    so do i just add an extra mx record
    domain.com handle by newslave.domain.com
    and leave the other one as well
    domain.com handled by panel.domain.com

    This is the dns, but dont know if i should add it dont want to mess up what i got

    OLD
    domain.com. 1800 IN NS ns1.digitalocean.com.
    domain.com. 1800 IN NS ns2.digitalocean.com.
    ns20.domain.com. 1800 IN A ip1
    ns21.domain.com. 1800 IN A ip1
    domain.com. 1800 IN A ip1
    *.domain.com. 1800 IN A ip1
    service.domain.com. 1800 IN A ip1
    nweb.domain.com. 1800 IN A ip2
    mail.domain.com. 1800 IN A ip1
    domain.com. 3600 IN MX 10 service.domain.com.
    domain.com. 3600 IN TXT v=spf1 a mx ip4:ip1 -all
    default._domainkey.domain.com. 3600 IN TXT v=DKIM1; t=s; et...

    NEW, for additional mail server - mail.domain.com
    domain.com. 1800 IN NS ns1.digitalocean.com.
    domain.com. 1800 IN NS ns2.digitalocean.com.
    ns20.domain.com. 1800 IN A ip1
    ns21.domain.com. 1800 IN A ip1
    domain.com. 1800 IN A ip1
    *.domain.com. 1800 IN A ip1
    service.domain.com. 1800 IN A ip1
    nweb.domain.com. 1800 IN A ip2
    mail.domain.com. 1800 IN A ip3
    domain.com. 3600 IN MX 10 service.domain.com.
    domain.com. 3600 IN TXT v=spf1 a mx ip4:ip1 -all
    default._domainkey.domain.com. 3600 IN TXT v=DKIM1; t=s; et...
    domain.com. 3600 IN MX 10 mail.domain.com.
     

Share This Page