diff --git a/app/models/action_mailroom/inbound_email.rb b/app/models/action_mailroom/inbound_email.rb
index <HASH>..<HASH> 100644
--- a/app/models/action_mailroom/inbound_email.rb
+++ b/app/models/action_mailroom/inbound_email.rb
@@ -8,6 +8,8 @@ class ActionMailroom::InboundEmail < ActiveRecord::Base
   has_one_attached :raw_email
   enum status: %i[ pending processing delivered failed bounced ]
 
+  before_save :generate_missing_message_id
+
   class << self
     def create_from_raw_email!(raw_email, **options)
       create! raw_email: raw_email, message_id: extract_message_id(raw_email), **options
@@ -21,7 +23,7 @@ class ActionMailroom::InboundEmail < ActiveRecord::Base
       def extract_message_id(raw_email)
         mail_from_source(raw_email.read).message_id
       rescue => e
-        # TODO: Assign message id if it can't be extracted?
+        # FIXME: Add logging with "Couldn't extract Message ID, so will generating a new random ID instead"
       end
   end
 
@@ -32,4 +34,9 @@ class ActionMailroom::InboundEmail < ActiveRecord::Base
   def source
     @source ||= raw_email.download
   end
+
+  private
+    def generate_missing_message_id
+      self.message_id ||= Mail::MessageIdField.new.message_id
+    end
 end
Ensure message id is present