The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #3142

Tagmail reporting barfs on call to

Added by Josh Anderson about 6 years ago. Updated about 6 years ago.

Status:ClosedStart date:02/02/2010
Priority:NormalDue date:
Assignee:James Turnbull% Done:


Category:reportsEstimated time:1.00 hour
Target version:0.25.5
Affected Puppet version:0.25.4 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


After upgrading from 0.24.7 to 0.25.3, I noticed that I was no longer getting tagmail reports. My MTA logs were full of “Error reading SMTP packet” entries, so I started looking at tagmail.rb.

What I found is that tagmail is barfing on calling

 smtp.open_message_stream(Puppet[:reportfrom], *emails) do |p|
   p.puts "From: #{Puppet[:reportfrom]}"
   p.puts "Subject: Puppet Report for %s" %
   p.puts "To: " + emails.join(", ")
   p.puts "Date: " +        <----- NoMethodError here!
   p.puts messages

The problem is that you can call without a “require ‘time’” statement, but you can’t call Time.rfc2822() without first requiring the module.

You can see this if you run the following in irb:

=> Tue Feb 02 15:41:29 -0800 2010
NoMethodError: undefined method `rfc2822' for Tue Feb 02 15:41:34 -0800 2010:Time
    from (irb):2
>> require 'time'
=> true
=> "Tue, 02 Feb 2010 15:42:00 -0800"

Because this happens after a fork(), no error messages are logged.

Adding a “require ‘time’” statement to tagmail.rb resolves this issue.


#1 Updated by James Turnbull about 6 years ago

  • Status changed from Unreviewed to Accepted
  • Assignee set to James Turnbull
  • Target version set to 0.25.5

#2 Updated by James Turnbull about 6 years ago

  • Status changed from Accepted to In Topic Branch Pending Review

#3 Updated by James Turnbull about 6 years ago

  • Status changed from In Topic Branch Pending Review to Closed

Pushed in commit:3457b876a104e6ae20d570cd4cf235881d869aaf in branch 0.25.x

Also available in: Atom PDF