2017-09-08 08:28:34 +00:00
|
|
|
class SettingDeliveryPermanentFailed < ActiveRecord::Migration[4.2]
|
2017-05-30 06:55:51 +00:00
|
|
|
def up
|
|
|
|
|
|
|
|
# return if it's a new setup
|
|
|
|
return if !Setting.find_by(name: 'system_init_done')
|
|
|
|
|
|
|
|
setting = Setting.find_by(name: '0900_postmaster_filter_bounce_check')
|
|
|
|
if setting
|
|
|
|
setting.name = '0900_postmaster_filter_bounce_follow_up_check'
|
|
|
|
setting.state = 'Channel::Filter::BounceFollowUpCheck'
|
|
|
|
setting.save!
|
|
|
|
else
|
|
|
|
Setting.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
title: 'Defines postmaster filter.',
|
|
|
|
name: '0900_postmaster_filter_bounce_follow_up_check',
|
|
|
|
area: 'Postmaster::PreFilter',
|
2017-05-30 06:55:51 +00:00
|
|
|
description: 'Defines postmaster filter to identify postmaster bounced - to handle it as follow-up of the original ticket.',
|
2018-12-19 17:31:51 +00:00
|
|
|
options: {},
|
|
|
|
state: 'Channel::Filter::BounceFollowUpCheck',
|
|
|
|
frontend: false
|
2017-05-30 06:55:51 +00:00
|
|
|
)
|
|
|
|
end
|
|
|
|
Setting.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
title: 'Defines postmaster filter.',
|
|
|
|
name: '0950_postmaster_filter_bounce_delivery_permanent_failed',
|
|
|
|
area: 'Postmaster::PreFilter',
|
2017-05-30 06:55:51 +00:00
|
|
|
description: 'Defines postmaster filter to identify postmaster bounced - disable sending notification on permanent deleivery failed.',
|
2018-12-19 17:31:51 +00:00
|
|
|
options: {},
|
|
|
|
state: 'Channel::Filter::BounceDeliveryPermanentFailed',
|
|
|
|
frontend: false
|
2017-05-30 06:55:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|