1

Topic: changed the domain for my website and emails.. how to update iredmail?

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mySQL
- Linux/BSD distribution name and version: Debian 7
- Related log if you're reporting an issue:
====

i freshly installed iredmail months ago, for use with a website (with .com domain) on a server that hosts both the website and iredmail.

recently i changed the domain name of the entire website and so needed to change the email settings too. i added the new domain and user accounts via iredadmin and mostly the situation is ok.
today though, i received some 'mail delivery failed' messages from aol and other email hosts, which included references to my old email domain - even though i am sending through the accounts created that reference the new domain.

as i search the files in the filesystem for instances of the old domain name, i see that these files contain it:

etc/postfix/main.cf
etc/postfix/aliases
etc/mail/default-auth-info
etc/resolv.conf
etc/mailname
etc/amavis/conf.d/50-user

plus some others that are not so relevant.

what is the correct approach for updating the iredmail files to reflect that i have changed the main domain name of the server?

can i just replace all the occurrences of the old domain in the files i listed here? or is there a more elegant approach?
i will not be sending emails from the email accounts created with the old domain name - however, i do wish to forward/alias the mails that the server receives, which are addressed to the accounts created with the old domain name to the equivalent accounts attached to the new domain name.

anyone know?

thanks

----

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

2

Re: changed the domain for my website and emails.. how to update iredmail?

urasoul1 wrote:

today though, i received some 'mail delivery failed' messages from aol and other email hosts, which included references to my old email domain - even though i am sending through the accounts created that reference the new domain.

Please show us these 'mail delivery failed' bounce message, usually, it contains detailed technical info to help you solve this issue.

Also, did you change mail domain name, or server hostname?

3

Re: changed the domain for my website and emails.. how to update iredmail?

thanks for responding. i changed the server hostname and created a new mail domain name (and website) with the new domain.
so both DNS records for the old and new domain now point to the same server. nginx forwards all web traffic from the old domain to the new domain.

here's the mail delivery failed message:
i replaced the domain names and ip with fictional ones.

Return-path: <me@myolddomain.com>
Received: from mynewdomain.org ([xx.xxx.xxx.xx] helo=myolddomain.com)
    by amaildomain.tld with esmtps (TLSv1:AES256-SHA:256)
    (Exim 4.76)
    (envelope-from <me@myolddomain.com>)
    id 1Wtvdx-0008Dt-BT
    for thetargetrecipient@adomain.tld; Mon, 09 Jun 2014 11:13:29 +0200
Received: from localhost (localhost.localdomain [127.0.0.1])
    by myolddomain.com (Postfix) with ESMTP id 5935AE4C44A4
    for <thetargetrecipient@adomain.tld>; Mon,  9 Jun 2014 11:25:12 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at myolddomain.com
Received: from myolddomain.com ([127.0.0.1])
    by localhost (myolddomain.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id mEsrPmH9sbqT for <thetargetrecipient@adomain.tld>;
    Mon,  9 Jun 2014 11:25:11 +0200 (CEST)
Received: by myolddomain.com (Postfix, from userid 1000)
    id B419DE4C44B9; Mon,  9 Jun 2014 11:25:05 +0200 (CEST)
To: thetargetrecipient@adomain.tld
Subject: =?UTF-8?B?Y29tbXVuaXR5IGRpZ2VzdHMgYXJlIG5vdyBhY3RpdmF0ZWQu?=
X-PHP-Originating-Script: 1000:functions.php
From: info@mynewdomain.org
X-Mailer: PHP/5.5.12-1~dotdeb.1
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="mynewdomain.org53957d71b074a"
Message-Id: <20140609092505.B419DE4C44B9@myolddomain.com>
Date: Mon,  9 Jun 2014 11:25:05 +0200 (CEST)

4

Re: changed the domain for my website and emails.. how to update iredmail?

urasoul1 wrote:

i changed the server hostname

*) Did you change the server names in Postfix config file? /etc/postfix/main.cf, parameter 'myhostname'. Don't forget to check 'mydomain' and 'myorigin' too.
*) Update /etc/hosts and /var/spool/postfix/etc/hosts?

urasoul1 wrote:

here's the mail delivery failed message:

We need the mail body, it contains technical details to help you solve this issue.

5

Re: changed the domain for my website and emails.. how to update iredmail?

oh, and another type of message here:

This is the mail system at host myolddomain.tld.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<recipient@targetdomain.tld>: host mailin.mx.targetdomain.tld[xx.xx.xx.xx] refused to
    talk to me: 554 5.7.1 : (RTR:BL)
    http://postmaster.targetdomain.tld/errors/554rtrbl.html



Reporting-MTA: dns; myolddomain.tld
X-Postfix-Queue-ID: 94831E4C4498
X-Postfix-Sender: rfc822; me@myolddomain.tld
Arrival-Date: Mon,  9 Jun 2014 11:15:13 +0200 (CEST)

Final-Recipient: rfc822; recipient@targetdomain.tld
Original-Recipient: rfc822;recipient@targetdomain.tld
Action: failed
Status: 4.7.1
Remote-MTA: dns; mailin.mx.targetdomain.tld
Diagnostic-Code: smtp; 554 5.7.1 : (RTR:BL)
    http://postmaster.targetdomain.tld/errors/554rtrbl.html

6

Re: changed the domain for my website and emails.. how to update iredmail?

urasoul1 wrote:

<recipient@targetdomain.tld>: host mailin.mx.targetdomain.tld[xx.xx.xx.xx] refused to
    talk to me: 554 5.7.1 : (RTR:BL)
    http://postmaster.targetdomain.tld/errors/554rtrbl.html

It's pretty clear here. Maybe this server blocks smtp connection from your server, maybe other reasons.

7

Re: changed the domain for my website and emails.. how to update iredmail?

i ran some tests to check for blacklisting and some minor hits were noted - though i presently do not know why.
i tested the spf record for the server and found that i had missed the .tld part of the domain name in the record, so i have now corrected that.

however, i am still seeing some warnings via an mx test service - where some aspects of the mail server point to the old domain and some to the new.

Warning - Reverse DNS does not match SMTP Banner (which is what i am wishing to resolve by altering the iredmail files)

i spoke with the domain registrar and they pointed that:

The hostname on the server (mail service) is currently olddomain.tlf It should be changed to reflect pointer newdomain.tld

so i still need to know where to update the hostname in the email apps / iredmail.

8

Re: changed the domain for my website and emails.. how to update iredmail?

urasoul1 wrote:

so i still need to know where to update the hostname in the email apps / iredmail.

*) Postfix parameter "myhostname".
*) /etc/hosts and /var/spool/postfix/etc/hosts

9

Re: changed the domain for my website and emails.. how to update iredmail?

ok, well, i have changed those values now.. and now i am unable to send emails to most domains.
one of the blacklisting testing pages i have used is now sowing: No MX Records are assigned to this domain !
even though the mx records are still present.

so i think i have misconfigured the hostname values.

the debian hostname on my server is being set automatically to 'www' - even when i edit the hostname directly to be domain.tld  and then reboot.. the hostname is reset somehow to just be 'www'.

anyone seen this behavior before? i have not found any hits via search engines yet.

10

Re: changed the domain for my website and emails.. how to update iredmail?

It's hard to know whether or not your modifications are correct with your description, why not show us file content of modified files? And original error log in log files.