Project

General

Profile

Actions

Bug #241

closed

email notifications don't work when mail relay requires domain name

Added by Eric Plaster over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
E-Mail
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I followed the instructions on http://theforeman.org/projects/foreman/wiki/Mail_Notifications and http://theforeman.org/projects/foreman/wiki/Email_configuration but continually got the following:

[09:03 AM]root@puppet:foreman# rake reports:summarize days=3 RAILS_ENV="production" 
(in /usr/share/foreman)
rake aborted!
550 5.1.1 <reporting@domain.com>: Recipient address rejected: domain.com

I have this in my config/settings.yaml:

:administrator: reporting@domain.com
:failed_report_email_notification: true

And this in my config/email.yaml:

production:
  delivery_method: :smtp
  smtp_settings:
    address: smtp.domain.com
    port: 25
    domain: domain.com
    authentication: :none

After chatting with Ohad Levy in #theforeman, I got a little farther by adding email=reporting.domain.com to the end of the rake command:

[09:10 AM]root@ksmgmt01:foreman# rake reports:summarize days=3 RAILS_ENV="production" email=reporting@domain.com
(in /usr/share/foreman)
rake aborted!
504 5.5.2 <Foreman-noreply>: Sender address rejected: need fully-qualified address

Again after talking with Ohad Levy I had to change line 33 in app/models/host_mailer.rb from:

    from "Foreman-noreply" 

to
    from "foreman@kingcompanies.com" 
</pre

Another thing to note is, we don't administer our own email server. We go through http://www.01.com, and they may be a little more restrictive on mail relaying (i.e. only our domain to our domain without authentication). However, we should be able to specify the sender and recipients for the reports.

Other information:
I installed it using puppet (very sweet install btw)
architecture => x86_64
facterversion => 1.5.7
kernelrelease => 2.6.32-22-server
lsbdistcodename => lucid
lsbdistdescription => Ubuntu 10.04 LTS
manufacturer => VMware, Inc.
operatingsystem => Ubuntu
puppetversion => 0.25.5
rubyversion => 1.8.7

[09:45 AM]root@puppet:foreman# gem list

  • LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
eventmachine (0.12.10)
fastthread (1.0.7)
gem_plugin (0.2.3)
hobofields (1.0.0)
hobosupport (1.0.0)
hoe (2.6.0)
json_pure (1.4.2)
mongrel (1.1.5)
mysql (2.8.1)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rubyforge (2.0.4)
stompserver (0.9.9)

Actions

Also available in: Atom PDF