1

Topic: AWS centos 7 changing hostname

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====I cannot change the hostname in amazon web services centos 7,

when I go to /etc/hostname and change my hostname to mail.example.com, it reverts back to the old hostname when i reboot ( ip-xxx.xx.xx.xx.us-west-2.compute.internal )

same thing happens when i Run 'hostnamectl set-hostname mail.example.com'

if I change  /etc/cloud/cloud.cfg and set preserve_hostname to True. it changes the hostname to mail.example.com  after reboot

but I still get the error message when i send email (     MAILER-DAEMON@ip-xxx-xxx-xx-xx.us-west-2.compute.internal)


After looking into it further I think the iRedMail install document is not explained correctly..
( http://www.iredmail.org/docs/install.ir … .rhel.html )

In /etc/hosts Do I need to add my Ip address and hostname like it is below?

    127.0.0.1 localhost.localdomain localhost

    12.34.56.78 hostname.example.com hostname




any ideas?




==== Required information ====
- iRedMail version:  0.9.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mySQL
- Web server (Apache or Nginx): nginx
- Linux/BSD distribution name and version:  cent0s 7
- Related log if you're reporting an issue:
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: AWS centos 7 changing hostname

You may try:

127.0.0.1 mail.domain.com mail localhost localhost.localdomain