<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,7 +8,7 @@ class Message
   attr_reader :mail, :attachments
 
   class &lt;&lt; self
-    attr_reader   :queue_path
+    attr_reader   :queue_path, :archive_path
     attr_accessor :recipient_header_order
   end
 
@@ -17,6 +17,11 @@ class Message
     @queue_path = File.expand_path(path)
   end
 
+  def self.archive_path=(path)
+    FileUtils.mkdir_p path
+    @archive_path = File.expand_path(path)
+  end
+
   self.recipient_header_order = %w(original_to delivered_to to)
   self.queue_path = File.join(File.dirname(__FILE__), '..', '..', 'queue')
 
@@ -40,7 +45,11 @@ class Message
 
   def self.receive_file(path, raw = nil)
     message = receive IO.read(path)
-    FileUtils.rm_rf path
+    if archive_path
+      FileUtils.mv path, archive_path / Time.now.year.to_s / Time.now.month.to_s / Time.now.day.to_s / File.basename(path)
+    else
+      FileUtils.rm_rf path
+    end
     message
   end
 </diff>
      <filename>app/models/message.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0ebf9216782ec1d1d8ca66f230e68ece7f6016c2</id>
    </parent>
  </parents>
  <author>
    <name>rick</name>
    <email>technoweenie@gmail.com</email>
  </author>
  <url>http://github.com/jnunemaker/astrotrain/commit/182ae72c825098bf22b9e539930280cb25314860</url>
  <id>182ae72c825098bf22b9e539930280cb25314860</id>
  <committed-date>2009-04-19T19:44:29-07:00</committed-date>
  <authored-date>2009-03-17T14:54:43-07:00</authored-date>
  <message>add optional archive path

Signed-off-by: John Nunemaker &lt;nunemaker@gmail.com&gt;</message>
  <tree>212eaefbdec703e3eca0fcbb411c2af9fbd88f8e</tree>
  <committer>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </committer>
</commit>
