summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/puppetrun2
-rwxr-xr-xbin/ralsh23
-rw-r--r--lib/puppet/reports/tagmail.rb13
3 files changed, 25 insertions, 13 deletions
diff --git a/bin/puppetrun b/bin/puppetrun
index cc78f81a8..5f99d6325 100755
--- a/bin/puppetrun
+++ b/bin/puppetrun
@@ -40,7 +40,7 @@
# you want any Puppet daemon to allow -- it is currently global to all Puppet
# daemons.
#
-# An example file looks like this:
+# An example file looks like this::
#
# [fileserver]
# allow *.madstop.com
diff --git a/bin/ralsh b/bin/ralsh
index e43177d35..fdf64916f 100755
--- a/bin/ralsh
+++ b/bin/ralsh
@@ -63,17 +63,18 @@
#
# = Example
#
-# $ ralsh user luke
-# user { 'luke':
-# home => '/home/luke',
-# uid => '100',
-# ensure => 'present',
-# comment => 'Luke Kanies,,,',
-# gid => '1000',
-# shell => '/bin/bash',
-# groups => ['sysadmin','audio','video','puppet']
-# }
-# $
+# This example uses ``ralsh`` to return Puppet configuration for the user ``luke``::
+#
+# $ ralsh user luke
+# user { 'luke':
+# home => '/home/luke',
+# uid => '100',
+# ensure => 'present',
+# comment => 'Luke Kanies,,,',
+# gid => '1000',
+# shell => '/bin/bash',
+# groups => ['sysadmin','audio','video','puppet']
+# }
#
# = Author
#
diff --git a/lib/puppet/reports/tagmail.rb b/lib/puppet/reports/tagmail.rb
index a2c973f8f..9b3711148 100644
--- a/lib/puppet/reports/tagmail.rb
+++ b/lib/puppet/reports/tagmail.rb
@@ -28,6 +28,10 @@ Puppet::Reports.register_report(:tagmail) do
This will send all messages to ``me@domain.com``, and all messages from
webservers that are not also from mailservers to ``httpadmins@domain.com``.
+
+ If you are using anti-spam controls, such as grey-listing, on your mail
+ server you should whitelist the sending email (controlled by ``reportform``
+ configuration option) to ensure your email is not discarded as spam.
"
@@ -127,7 +131,14 @@ Puppet::Reports.register_report(:tagmail) do
Net::SMTP.start(Puppet[:smtpserver]) do |smtp|
reports.each do |emails, messages|
Puppet.info "Sending report to %s" % emails.join(", ")
- smtp.send_message(messages, Puppet[:reportfrom], *emails)
+ smtp.open_message_stream(Puppet[:reportfrom], *emails) do |p|
+ p.puts "From: #{Puppet[:reportfrom]}"
+ p.puts "Subject: Puppet Report for %s" % self.host
+ p.puts "To: " + emails.join(", ")
+ p.puts "Date: " + Time.now.rfc2822
+ p.puts
+ p.puts messages
+ end
end
end
rescue => detail