2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
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
|
2020-08-03 08:35:43 +00:00
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
2017-05-30 06:55:51 +00:00
|
|
|
|
|
|
|
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
|