dns/mai server domain change -> squirrelmail emails still with old domain -> spam

Discussion in 'Installation/Configuration' started by Dennis, May 17, 2008.

  1. Dennis

    Dennis New Member

    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:
    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:

    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.
     
    Last edited: May 17, 2008
  2. falko

    falko Super Moderator ISPConfig Developer

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

    Dennis New Member

    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:
    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/showpost.php?p=111094&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_dns_providerdomain_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.
     
  4. falko

    falko Super Moderator ISPConfig Developer

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

    Dennis New Member

    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:
    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. :(
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    What is the output of:

    hostname

    and

    hostname -f
     
  7. Dennis

    Dennis New Member

    Both commands give me: mail.newdomain.tld
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Put the new hostname in /etc/hostname and run
    Code:
    /etc/init.d/hostname.sh restart
     
  9. Dennis

    Dennis New Member

    /etc/hostname already had the new hostname:
    Code:
    mail.newdomain.tld
    /etc/init.d/hostname.sh restart was answered with:
    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
     
  10. falko

    falko Super Moderator ISPConfig Developer

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

    Dennis New Member

    Thank you so much, falko! This was the problem. It had two more lines with the old domain in it. There is good chance that I edited that file before, because two lines already reflected the new domain.

    I restarted the server after the change, since I wasn' t sure if I had to restart any services. Now I don' t get redirected anymore when I access the new domain. Accessing the old domain redirects to the new one.

    So you have to edit these files, if you want to change the main (ispconfig) domain:

    Code:
    /etc/hostname
    /etc/mailname
    /etc/postfix/main.cf
    /etc/hosts
    /home/admispconfig/ispconfig/lib/config.inc.php
    /root/ispconfig/httpd/conf/httpd.conf
     

Share This Page