Change mail server hostname

Discussion in 'Installation/Configuration' started by MrMapple, Apr 10, 2021.

  1. MrMapple

    MrMapple New Member


    I have the following Question:

    I have two domains: and

    All records of are pointing to my Server IP including MX record etc...
    Of there is only a MX record to and a A record to my Server IP.
    Other A records a pointing to a different IP.

    The hostname of the server is
    For sending E-Mail I am using the hostname, because there is already the SSL certificate in postifx for installed and working.

    Now I got the Problem that one E-Mail provider rejects mails from my server because they say the hostname where the mails are coming from is not, but

    I've set up DMARC, DKIM and SPF and they are working.

    Now in order to achieve this goal, do I have to create a new SSL cert. for and change the mail server name in postfix?
    Do I have to change the complete hostname of the server to

    Or is it a bigger Problem that only is pointing to a different IP than the other records?

    I'm sorry for my lack knowledge but when it comes to hostname/server name things I can't really imagine this things.
    I have already googled a few hours but I found no solution yet, probably it's very easy...

    Kind regards
    Last edited: Apr 10, 2021
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Set SPF to include the e-mail server (servers) that really sends the message.
    Do you have one server? Set all domains MX to the e-mail server FQDN, and SPF to the sending e-mail server.
    My signature has links to tutorials.
  3. MrMapple

    MrMapple New Member

    Thank you for your answer.

    In the SPF Record is already the "v=spf1 a mx ip4:...."

    So since there is only one FQDN/one Server/IP for all services, I think I have to change the hostname completely to in order to fulfill the weird requirements. ( )** Not yet allowed to post Links

    I think I will create a Website for, to get a Let's Encrypt SSL cert.
    Change the Hostname of the Server and Postfix to and make a link from the website cert to the postfix cert.
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    ISPConfig sets up the hostname e-mail uses from the hostname (refer to the ISPConfig Perfect Server Guide). So what
    hostname -f 
    shows becomes the mailname.
    If you do not want that, you can configure postfix to use some other mailname. It is in postfix configuration files. Then restart postix.
    Jesse Norell likes this.
  5. MrMapple

    MrMapple New Member

    Alright, Thank you.
    So and there is no constraint that postfix has to use the FQDN of the Server?
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    No, you can have it use whatever hostname you "need" (our main server uses several names, depending on the ip address in use). What is not as flexible is reverse dns, your server's address can resolve to only one name. For best email delivery, use a consistent name in reverse dns, in your postfix config (or server hostname) and in your mx records; it's not "required" by rfc that they're all the same, but some spam scanners will perform better for you (ie. deliver your mail better) that way.

Share This Page