diff options
| author | Paul Lathrop <paul@tertiusfamily.net> | 2008-01-15 15:16:25 -0800 |
|---|---|---|
| committer | Paul Lathrop <paul@tertiusfamily.net> | 2008-01-15 15:16:25 -0800 |
| commit | 34f5bda4e5f40b1137bd49e9d659dded7d473410 (patch) | |
| tree | b921cea08c322e14c8ffce9973f8c64b697bf4d2 | |
| parent | 1ff9d658f852698ca4fcd62c94d633824950d5c1 (diff) | |
| parent | b24ac77d938cca8d436ed2aceba3523e97a1ab74 (diff) | |
| download | puppet-34f5bda4e5f40b1137bd49e9d659dded7d473410.tar.gz puppet-34f5bda4e5f40b1137bd49e9d659dded7d473410.tar.xz puppet-34f5bda4e5f40b1137bd49e9d659dded7d473410.zip | |
Merge branch '0.24.x' of git://reductivelabs.com/puppet into 0.24.x
| -rwxr-xr-x | bin/puppetrun | 2 | ||||
| -rwxr-xr-x | bin/ralsh | 23 | ||||
| -rw-r--r-- | lib/puppet/reports/tagmail.rb | 13 |
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 @@ -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 |
