20190806000001_setting_postmaster_send_reject_email.rb 972 B

12345678910111213141516171819202122232425262728293031323334
  1. class SettingPostmasterSendRejectEmail < ActiveRecord::Migration[5.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. Setting.create_if_not_exists(
  6. title: 'Send postmaster mail if mail too large',
  7. name: 'postmaster_send_reject_if_mail_too_large',
  8. area: 'Email::Base',
  9. description: 'Send postmaster reject mail to sender of mail if mail is too large.',
  10. options: {
  11. form: [
  12. {
  13. display: '',
  14. null: true,
  15. name: 'postmaster_send_reject_if_mail_too_large',
  16. tag: 'boolean',
  17. options: {
  18. true => 'yes',
  19. false => 'no',
  20. },
  21. },
  22. ],
  23. },
  24. state: true,
  25. preferences: {
  26. online_service_disable: true,
  27. permission: ['admin.channel_email'],
  28. },
  29. frontend: false
  30. )
  31. end
  32. end