Results 1 to 12 of 12

Thread: EXIM using old hostname for HELO

  1. #1
    Join Date
    Jun 2016
    Posts
    9

    Question EXIM using old hostname for HELO

    Hello,

    I am having a problem with Exim. I recently changed my hostname from server1.olddomain.com to server.newdomain.com within the DirectAdmin Admin Panel. Everything is working correctly following the change. I am using SPF and DKIM and have no issues with that either.

    However, when I send any emails, the HELO is incorrect when viewing the original message and is still using the old hostname:

    Code:
    Received: from [::1] (helo=server1.olddomain) by server.newdomain.com with esmtpa (Exim 4.87)
    I have changed primary_hostname to primary_hostname = server.newdomain.com in etc/exim.conf (and removed the # so it is not a comment).

    Where is Exim getting the information for HELO from? Does anyone know how I can fix this?

  2. #2
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,081
    The ::1 looks to be pointing to ipv6.

    Check your hostname by SSH and /etc/hosts if it's correct there.
    Greetings, Richard.

  3. #3
    Join Date
    Jun 2016
    Posts
    9
    Thanks for the reply Richard.

    I checked and it looks like this, which I am assuming looks correct as it has the new domain there:

    Code:
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost localhost4.localdomain4 localhost4
    # Auto-generated hostname. Please do not remove this comment.
    199.180.131.3 server.newddomain.com  server
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

  4. #4
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,081
    You're welcome Biv.

    As for the hosts file, no it doesn't look correct.
    I've read somewhere on the forums that only 127.0.0.1 should be named localhost and/or localhost.localdomain.
    You should remove the localhost and localhost.localdomain statements from the ::1 line because that will give issues with Exim.

    Ah... found it here:
    http://forum.directadmin.com/showthread.php?t=53299
    Greetings, Richard.

  5. #5
    Join Date
    Jun 2016
    Posts
    9
    Hmm, I made those changes in /etc/hosts and it just changed ::1 to 127.0.0.1 in the Received from of the email, and the old hostname is still in there:

    Before:
    Code:
    Received: from [::1] (helo=server1.olddomain) by server.newdomain.com with esmtpa (Exim 4.87)
    After:
    Code:
    Received: from [127.0.0.1] (helo=server1.olddomain.com) by server.newddomain.com with esmtpa (Exim 4.87)
    Any other ideas?

  6. #6
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,081
    Oops, I've read wrongly, changing my reply.

    Helo is taken from the hostname, check your hostname for the old hostname, the /etc/hosts and /etc/hostname and check /etc/sysconfig/network-scripts/ for the ethx running scripts, like eth0 and eth1 for presence of the old hostname.
    I presume it's not present in DA anymore.

    If the above won't help, I hope Zeiter or somebody else can shed their light on this, because then I'm out of idea's.

    Edit: Also check your /etc/exim.conf for this line:
    # primary_hostname =
    if it does not contain the old hostname (should not contain any name by default).
    Last edited by Richard G; 12-07-2017 at 11:22 AM.
    Greetings, Richard.

  7. #7
    Join Date
    Jun 2016
    Posts
    9
    Thanks for the reply, I checked the following files but couldn't find any instances of the old servername. And in exim.conf, I manually set the primary hostname to server.newdomain.com. I did not see any smtp_active_hostname variable at all in that file either.

    This is really puzzling to me, but thanks for trying!

    Code:
    ifcfg-lo        ifdown-isdn    ifup-bnep   ifup-ppp
    ifcfg-venet0    ifdown-post    ifup-eth    ifup-routes
    ifcfg-venet0:0  ifdown-ppp     ifup-ippp   ifup-sit
    ifdown          ifdown-routes  ifup-ipv6   ifup-tunnel
    ifdown-bnep     ifdown-sit     ifup-isdn   ifup-wireless
    ifdown-eth      ifdown-tunnel  ifup-plip   init.ipv6-global
    ifdown-ippp     ifup           ifup-plusb  network-functions
    ifdown-ipv6     ifup-aliases   ifup-post   network-functions-ipv6

  8. #8
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,081
    Odd.
    Just to be sure, which DA are you using? CB 1.2 or 2.0?
    Which exim version?
    Which exim.pl version?
    Which exim.conf version?
    Greetings, Richard.

  9. #9
    Join Date
    Jun 2016
    Posts
    9
    I'm using DA 1.52.1; CB 2.0; exim version 4.87; exim.pl version 16; exim.conf version is the SpamBlocker 2.1.1 release.

  10. #10
    Join Date
    Jun 2016
    Posts
    9

    Cool SOLUTION to old hostname in email headers (with Roundcube)

    After some more web searching, I finally figured it out! This actually has to do with the settings directly in Roundcube. It did not change here when I changed the hostname (after Roundcube was already installed). I tried checking custombuild for Roundcube settings, but it seems that Roundcube may have been installed differently on my server. Here is the solution if anyone is having this problem in the future.

    SOLUTION:
    Code:
    nano /var/www/html/roundcube/config/config.inc.php
    (or wherever your Roundcube config.inc.php file is)

    Find and update $config['smtp_helo_host'] = 'server.oldname.com';

    Thanks again Richard.

  11. #11
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,081
    You're welcome. I now see why I did not find it. You put me on the wrong foot:
    However, when I send any emails,
    With *any* mails, you state really any mails. So I was presuming normal mail traffic via an email client, or "any" as in email client as well as webmail.
    We might have found it faster if you had stated you only use webmail, or the problem only occurs on webmail.
    But no problem, can happen to anyone, maybe you did not think of it.

    I don't have any "smtp_helo_host" in roundcube's config.inc.php, there are no hardcoded things in there by default.
    So I'm wondering where that line is coming from, or if it's an old Roundcube version.
    I presume you have roundcube=yes in your options.conf and maybe also webapps_updates=yes?

    I would suggest removing roundcube and let it build from Custombuild again so that helo host is gone there too and you have the latest version of Roundcube which does not need that.
    At least... if you're running on Centos.

    Some other tips:
    exim.pl version 16; exim.conf version is the SpamBlocker 2.1.1 release.
    This is the default exim.conf but well.... it's really very basic.
    If you want life better, also better protection, it might be wise to use the newest exim.pl version 24 and Spamblocker 4.5.7 which makes life al lot easier for you.
    Via eximconf=yes and exim=yes you can have both automatically updated.

    Anyway I'm glad you found and fixed the issue.
    Greetings, Richard.

  12. #12
    Join Date
    Jun 2016
    Posts
    9
    Yes, the title of the topic was misleading as I did not think that it could be an issue with just webmail itself until later. I ran several mail tests that passed, so that was my fault. Also thanks for the other tips, DA was initially installed by my VPS host so I'm not sure how they set up everything or if they may have installed Roundcube separately.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •