return host;
try { String FQDN = InetAddress.getByName(host).getCanonicalHostName(); if (log.isDebugEnabled()) log.debug ("FDQN for " +host+ " is " +FQDN); return FQDN; } catch (Exception e) { throw new RuntimeException (e.toString()); }
  private String getFQDN (String host)  {    //  Not till Java 1.4 can we get the fully qualified domain name    //  (FQDN) for hosts (via the new InetAddress getCanonicalHostname())    //  when running on Windows.  So for now we will require that the     //  hostnames in email .props files are FQDN names.    if (host.equals ("localhost"))    {      System.err.println ("ERROR: Only fully qualified domain names allowed as mailhost names: " +host);      throw new RuntimeException ("Only fully qualified domain names allowed as mailhost names: " +host);    }    else if (host.indexOf ('.') == -1)    {//    System.err.println ("WARNING: Only fully qualified domain names allowed as mailhost names: " +host);    }    return host;  }