HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   dns/mai server domain change -> squirrelmail emails still with old domain -> spam (http://www.howtoforge.com/forums/showthread.php?t=23377)

Dennis 17th May 2008 15:05

dns/mail server domain change -> squirrelmail emails still with old domain -> spam
 
Recently I changed my server domain. Now squirrelmail emails are classified as spam - "From SPF protected domain over unauthorized server". Roundcube emails are not classified as spam. The squirrelmail emails still show the old domain.

Here is the header of a squirrelmail email:
Quote:

Return-Path: <email@domain_added_though_ispc.tld>
X-Flags: 1001
Delivered-To: Emailprovider delivery to emailaccaount@emailprovider.tld
Received: (qmail invoked by alias); 17 May 2008 10:13:44 -0000
Received: from mail.newdomain.tld (EHLO mail.newdomain.tld) [xxx.xxx.xxx.xxx]
by mx0.emailprovider.tld (mx002) with SMTP; 17 May 2008 12:13:44 +0200
Received: from www.olddomain.tld (localhost [127.0.0.1])
by mail.newdomain.tld (Postfix) with ESMTP id 196621E94153
for <emailaccount@emailprovider.tld>; Sat, 17 May 2008 12:13:44 +0200 (CEST)
Received: from yyy.yyy.yyy.yyy
(SquirrelMail authenticated user username)
by www.olddomain.tld with HTTP;
Sat, 17 May 2008 12:13:44 +0200 (CEST)
Message-ID: <54833.yyy.yyy.yyy.yyy.1211019224.squirrel@www.old domain.tld>

Date: Sat, 17 May 2008 12:13:44 +0200 (CEST)
Subject: squirrelmail test
From: "Test" <email@domain_added_through_ispc.tld>
To: emailaccount@emailprovider.tld
Reply-To: email@domain_added_through_ispc.tld
User-Agent: SquirrelMail/1.5.1
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Emailprovider-Antivirus: -1 (not scanned, may not use virus scanner)
X-Emailprovider-Htest: 0.6899999999999999
X-Emailprovider-Antispam: 4 (From SPF protected domain over unauthorized server)
X-Emailprovider-UID: 65gcebFrIyd196J5QWdrp5laa2FkZlWC
I was sending a test email from an email address created by ispconfig (email@...) to a freemail account (emailaccount@...).
olddomain = domain used during "Perfect server setup - Debian Etch", ispconfig, roundcube plugin and squirrelmail plugin install.
newdomain = new domain for the dns and mail server
domain_added_through_ispconfig = this domain has been added through ispconfig
xxx.xxx.xxx.xxx = my server ip
yyy.yyy.yyy.yyy = my dynamic ip at home

Does anyone know where I can change those old entries?

I just used the dns manager. Although I did not change anything - I just saved the existing settings of the domain_added_through_ispc -, roundcube emails now show the old domain, too:

Quote:

Received: from server1.olddomain.tld (EHLO mail.newdomain.tld) [xxx.xxx.xxx.xxx]
Which file did I forget to change?

Edit 2: I have only restarted the server and now all emails go into the inbox. Roundcube header shows the new domain. Squirrelmail still shows the same header as above, but it is not classified as spam.

I tried to reproduce the problem with the dns manager, but this time the server name does not change.

Still I don' t like the fact that squirrelmail shows the old domain. Moreover I don' t like that the ispconfig account username is shown in the header.

falko 18th May 2008 16:03

Quote:

Originally Posted by Dennis
Does anyone know where I can change those old entries?

Please change the value of myorigin in /etc/postfix/main.cf and restart Postfix.

Dennis 19th May 2008 12:12

Quote:

Originally Posted by falko
Please change the value of myorigin in /etc/postfix/main.cf and restart Postfix.

Myorigin points to /etc/mailname and that file contains mail.newdomain.tld .

I think the squirrelmail problem is that when I try to access http://www.newdomain.tld:81/squirrelmail/, I will be redirected to http://www.olddomain.tld:81/squirrelmail/. Redirect to old domain also happens with roundcube webmail access.

Both emails are not classified as spam anymore. The only problem are the traces to the old domain in squirrelmail and the webmail redirects. The latter is even worse, because users do not only need to confirm one certificate error, but two - one for the newdomain and one for the old domain before redirection.

squirrelmail header:
Quote:

Received: (qmail invoked by alias); 17 May 2008 10:13:44 -0000
Received: from mail.newdomain.tld (EHLO mail.newdomain.tld) [xxx.xxx.xxx.xxx]
by mx0.emailprovider.tld (mx002) with SMTP; 17 May 2008 12:13:44 +0200
Received: from www.olddomain.tld (localhost [127.0.0.1])
by mail.newdomain.tld (Postfix) with ESMTP id 196621E94153
for <emailaccount@emailprovider.tld>; Sat, 17 May 2008 12:13:44 +0200 (CEST)
Received: from yyy.yyy.yyy.yyy
(SquirrelMail authenticated user username)
by www.olddomain.tld with HTTP;
Sat, 17 May 2008 12:13:44 +0200 (CEST)
Message-ID: <54833.yyy.yyy.yyy.yyy.1211019224.squirrel@www.old domain.tld>
I think that solving the redirect problem will also solve the squirrelmail header problem. It looks like squirrelmail puts the access domain (from which you accessed squirrelmail webmail) into the header and uses that domain for the message id, too.

All of these seem to reflect the new domain:
http://www.howtoforge.com/forums/sho...94&postcount=2

I don' t know if this is important. First I have not created a new site for the new domain. I followed this howto to setup new nameservers:
http://www.howtoforge.com/ispconfig_...domain_schlund
But today I have added the new domain (created a new reseller in admin folder, then created new client for the new reseller and afterwards added the site to the new client). Unfortunately the redirect still takes place.

falko 20th May 2008 23:04

Did you change the hostname in /home/admispconfig/ispconfig/lib/config.inc.php as well?

Dennis 22nd May 2008 09:20

Yes, I already changed it.

/home/admispconfig/ispconfig/lib/config.inc.php:
Code:

if(isset($_SERVER['HTTP_HOST'])){
  $go_info["server"]["server_url"] = 'https://'.$_SERVER['HTTP_HOST'];
} else {
  $go_info["server"]["server_url"] = "https://www.newdomain.tld:81";
}

In an older thread (see above) Till told someone to change these files:
Quote:

/etc/hostname, /etc/mailname, /etc/postfix/main.cf, /etc/hosts, /home/admispconfig/ispconfig/lib/config.inc.php
All those files have the new domain or server name in them. Now we can also exclude that nameservers haven' t reflected the domain changes yet. Reverse dns is set for my ip. Traceroute to my ip address returns mail.newdomain.tld .

Unfortunately the redirection is still in place. :(

till 22nd May 2008 10:05

What is the output of:

hostname

and

hostname -f

Dennis 22nd May 2008 12:39

Both commands give me: mail.newdomain.tld

falko 23rd May 2008 11:58

Put the new hostname in /etc/hostname and run
Code:

/etc/init.d/hostname.sh restart

Dennis 26th May 2008 13:29

/etc/hostname already had the new hostname:
Code:

mail.newdomain.tld
/etc/init.d/hostname.sh restart was answered with:
Quote:

Error: argument 'restart' not supported
I then used /etc/init.d/hostname.sh stop and /etc/init.d/hostname.sh start, but nothing seems to have changed. When I try to access: https://www.newdomain.tld:81/squirrelmail, I will be redirected to: https://www.olddomain.tld:81/squirrelmail

falko 27th May 2008 17:18

IS the old domain referenced somewhere in /root/ispconfig/httpd/conf/httpd.conf?


All times are GMT +2. The time now is 12:52.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.