Improved message_id generation (more random).
This commit is contained in:
parent
b6093930e3
commit
13854f7fa7
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class Observer::Ticket::Article::FillupFromEmail < ActiveRecord::Observer
|
||||||
# generate message id, force it in prodution, in test allow to set it for testing reasons
|
# generate message id, force it in prodution, in test allow to set it for testing reasons
|
||||||
if !record.message_id || Rails.env.production?
|
if !record.message_id || Rails.env.production?
|
||||||
fqdn = Setting.get('fqdn')
|
fqdn = Setting.get('fqdn')
|
||||||
record.message_id = "<#{DateTime.current.to_s(:number)}.#{record.ticket_id}.#{rand(999_999)}@#{fqdn}>"
|
record.message_id = "<#{DateTime.current.to_s(:number)}.#{record.ticket_id}.#{rand(999_999_999_999)}@#{fqdn}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
# generate message_id_md5
|
# generate message_id_md5
|
||||||
|
|
Loading…
Reference in a new issue