I remember something for MTA behavior depended on the names order at /etc/hosts in VPS. The difference: 127.0.1.1 myserver.example.net myserver 127.0.1.1 myserver myserver.example.net
El 26/09/17 a les 19:06, German D ha escrit: > Hi everyone! > > Recently we've faced hostname issue on container running on CentOS with > cPanel. > > When container is rebooted, hostname became "server1" instead of > "server1.example.com <http://server1.example.com/>". We understand that > hostname shouldn't be FQDN, but unfortunately it breaks cPanel (we've > faced at least 2 issues such as invalid HELO name and revoked > certificate for WHM). So we made a patch for script > /etc/vz/dists/scripts/redhat-set_hostname.sh. If the server running > cPanel, it doesn't apply hostname. It would be great to add it to future > updates of OpenVZ. > > Details of the patch are below: > > --- redhat-set_hostname.sh2017-09-21 02:27:57.080899967 -0600 > +++ redhat-set_hostname_new.sh2017-09-21 02:30:24.921061967 -0600 > @@ -28,8 +28,8 @@ > > if [ -f /etc/hostname ]; then > # New style: RHEL7/Fedora15+ > -# Note hostname(5) says it should NOT be FQDN > -val=${val%%.*} > +# Note hostname(5) says it should NOT be FQDN, but it breaks cPanel > +[ -e /usr/local/cpanel/version ] || val=${val%%.*} > echo "$val" > /etc/hostname > else > # "Classic" style > > -- > Best regards, > NK Support Team > http://www.nksupport.com/ > > > _______________________________________________ > Users mailing list > Users@openvz.org > https://lists.openvz.org/mailman/listinfo/users > _______________________________________________ Users mailing list Users@openvz.org https://lists.openvz.org/mailman/listinfo/users