Can not Send Mail when changed the hostname

Discussion in 'Installation/Configuration' started by muekno, Jan 8, 2021.

  1. muekno

    muekno Member HowtoForge Supporter

    Build a server based on debian perfect server tutotial and build a .OVA file. Imported thins on my ESXi
    added a .bash_profile

    Code:
    echo 'ALERT - Servername -Root Shell Access on:' `date` `who` | mail -s "Alert: servername Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" [email protected]
    This I have at all my servers working fine.
    When starting the new server ist work, itr works too
    after setting a fixed IP
    after modifing /tec/host to new host name
    after modifiing /etc/et/postfix/main.cf (new server name)
    did several reboots between I always get the mail after login with root
    the I edit /etc/hostname and did a reboot as written in the tutorial
    login in now I get the error message
    Code:
    mail: cannot send message: Process exited with a non-zero status
    Did at least 4 different installations with different sequence of mods, everytime the hostname was change sending mail fails. hostname and hostename -f has the correct answer.
    Please help
    Rainer
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  3. muekno

    muekno Member HowtoForge Supporter

    Yes will try.

    I did not user the tutorial .ova, I build my own one as I needed an other hardware version and did some additional mods like this one above. And I would use it for other than ISPconfig servers too. So I have a .ova with less apps than needed for ISPconfig
    Rainer
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You also have /etc/mailname, did you change this?
     
    muekno likes this.
  5. muekno

    muekno Member HowtoForge Supporter

    Oh no, there is still the old server same. Thanks
    Rainer
     

Share This Page