20170927000001_setting_send_no_auto_response_reg_exp.rb 421 B

123456789101112
  1. class SettingSendNoAutoResponseRegExp < ActiveRecord::Migration[5.0]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. # improved domain name matching
  6. return if !Setting.find_by(name: 'send_no_auto_response_reg_exp')
  7. Setting.set('send_no_auto_response_reg_exp', '(mailer-daemon|postmaster|abuse|root|noreply|noreply.+?|no-reply|no-reply.+?)@.+?')
  8. end
  9. end