email should be sent via localhost, not the hostname

Bug #412676 reported by Chris Jones on 2009-08-12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
eucalyptus (Ubuntu)
Dustin Kirkland 

Bug Description seems to determine the host to connect to to send email with:

mailHost = InetAddress.getLocalHost().getHostName();

which (AFAIKS) returns the equivalent of /etc/hostname, which may not necessarily resolve to a address. In doing so Eucalyptus may end up talking to the LAN/public IP of the machine for SMTP, which will result in relaying being denied in a default Ubuntu postfix install.

Is there any reaosn for not using "localhost"?

Dustin Kirkland  (kirkland) wrote :


I agree. I'm committing such a fix to the Ubuntu Eucalyptus package.

I'm also adding a task against Eucalyptus upstream, in case they know better. If so, please speak up. If not, please cherry pick r601 from lp:~ubuntu-core-dev/eucalyptus/ubuntu and apply upstream.


Changed in eucalyptus:
status: New → Confirmed
Changed in eucalyptus (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Dustin Kirkland (kirkland)
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package eucalyptus - 1.6~bzr854-0ubuntu6

eucalyptus (1.6~bzr854-0ubuntu6) karmic; urgency=low

  [ Thierry Carrez ]
  * Apply upstream rev867 and rev876 diffs to fix SC registration through
    Web UI, LP: #436313
  * tools/ Reapply fix on boot messages that was lost
    on a merge, LP: #435766

  [ Dustin Kirkland ]
  * debian/80-eucalyptus-url: add an update-motd script that
    displays the administration URL in the MOTD at position 80, LP: #436199
  * debian/eucalyptus-nc.preinst: echo a warning message if a system
    installing the -nc does not have VT, LP: #426830
  * debian/rules: don't fail package installation due to init script
    failures, LP: #430075, #418473
  * tools/ vastly improve the output of
    'euca_conf --register-nodes', which was missing some pertinent
    information, LP: #424457
  * clc/modules/www/src/main/java/edu/ucsb/eucalyptus/admin/server/
    if we're going to use the local host to send email, use 'localhost' as
    the hostname, rather than the externally resolvable hostname which
    breaks in the default ubuntu postfix configuration, LP: #412676
  * debian/control:
    - have eucalyptus-common depend on openssh-server and openssh-client,
      as these should really be installed on most any Eucalyptus system,
      LP: #411656
    - have eucalyptus-common recommend unzip, since Eucalyptus uses zip
      files for credentials, which may be needed on various systems,
      LP: #436876
    - recommend libpam that provides pam_motd, LP: #436199
    - conflict with apache2-mpm-itk, LP: #338344
  * debian/eucalyptus-common.postinst: configure VNET_DHCPDAEMON and
    VNET_DHCPUSER appropriately for default Ubuntu on initial install,
    LP: #364938

  [ Colin Watson ]
  * debian/control:
    - Make eucalyptus-nc explicitly depend on apache2-mpm-worker |
      apache2-mpm-prefork, since the NC requires that Apache be configured
      to only start a single child (LP: #338344).

 -- Dustin Kirkland <email address hidden> Fri, 25 Sep 2009 18:01:29 -0700

Changed in eucalyptus (Ubuntu):
status: Fix Committed → Fix Released
Matt Zimmerman (mdz) wrote :

Marking FIx Committed upstream per:

        revno: 444.9.4
        committer: Neil <neil@pall>
        branch nick: 1.6-871
        timestamp: Fri 2009-09-25 13:54:49 -0700
          use localhost instead of getHostName for sending mail.

Changed in eucalyptus:
status: Confirmed → Fix Committed
Changed in eucalyptus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers