1

Topic: Hostname changed iredmail still send from old name

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4.0
- Deployed with iRedMail Easy or the downloadable installer?download
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro?No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
The original hostname of the iredmail server was mlr.freesend.us. I changed the hostname to freesend.causeaction.com. After setting up DKIM DMARC SPF and MX records I tried sending just 1 email to my own Office 365 account. It was bounced by MSN because the from server was mlr.freesend.us and no longer matched any of the IP addresses. Nad I see thsi on the bounced email notification.

Undelivered Mail Returned to Sender
Contact photo
From MAILER-DAEMON@mlr.freesend.us on 2021-07-07 13:32
Details Download all attachments

    Delivery report(~729 B)
    Undelivered Message(~2 KB)

This is the mail system at host mlr.freesend.us.

I thought that all email would be sent from freesend.causeaction.com now that the hostname is changed.  The bounced email was sent from the postmaster@freesend.causeaction.com also. So why did this happen and what shall I do to fix it? Thank you

2

Re: Hostname changed iredmail still send from old name

You should change the hostname in /etc/postfix/main.cf and /etc/amavis/conf.d/50-user too.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: Hostname changed iredmail still send from old name

Thank you for your help. We are almost there.
I followed your instructions and the email header looks much better now.
Except for tyhis line:
X-Virus-Scanned: Debian amavisd-new at mlr.freesend.us

Which still refers to the old hostname  mlr.freesend.us.

And scanning with grep I see these entries referring to the old hostname  mlr.freesend.us. Binary files?
I have edited postfix/main.cf. Any suggestions? Thank you

Binary file postfix/aliases.db matches
postfix/aliases:root: postmaster@freesend.us
postfix/main.cf.2021.05.21.13.55.09:myhostname = mlr.freesend.us
postfix/main.cf.2021.05.21.13.55.09:mydestination = $myhostname, mlr.freesend.us, localhost.freesend.us, , localhost