schleuder 3.6.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -6
  3. data/Rakefile +12 -14
  4. data/bin/schleuder +1 -1
  5. data/db/migrate/20140501103532_create_lists.rb +1 -1
  6. data/db/migrate/20140501112859_create_subscriptions.rb +1 -1
  7. data/db/migrate/{201508092100_add_language_to_lists.rb → 20150809210000_add_language_to_lists.rb} +1 -1
  8. data/db/migrate/20150812165700_change_keywords_admin_only_defaults.rb +1 -1
  9. data/db/migrate/20150813235800_add_forward_all_incoming_to_admins.rb +1 -1
  10. data/db/migrate/{201508141727_change_send_encrypted_only_default.rb → 20150814172700_change_send_encrypted_only_default.rb} +1 -1
  11. data/db/migrate/{201508222143_add_logfiles_to_keep_to_lists.rb → 20150822214300_add_logfiles_to_keep_to_lists.rb} +1 -1
  12. data/db/migrate/{201508261723_rename_delivery_disabled_to_delivery_enabled_and_change_default.rb → 20150826172300_rename_delivery_disabled_to_delivery_enabled_and_change_default.rb} +1 -1
  13. data/db/migrate/{201508261815_strip_gpg_passphrase.rb → 20150826181500_strip_gpg_passphrase.rb} +1 -1
  14. data/db/migrate/{201508261827_remove_default_mime.rb → 20150826182700_remove_default_mime.rb} +1 -1
  15. data/db/migrate/20160501172700_fix_headers_to_meta_defaults.rb +1 -1
  16. data/db/migrate/20170713215059_add_internal_footer_to_list.rb +1 -1
  17. data/db/migrate/20180110203100_add_sig_enc_to_headers_to_meta_defaults.rb +1 -1
  18. data/db/migrate/20180723173900_add_deliver_selfsent_to_list.rb +1 -1
  19. data/db/migrate/20190906194820_add_autocrypt_header_to_list.rb +1 -1
  20. data/db/migrate/20200118170110_add_set_reply_to_to_sender_and_munge_from.rb +1 -1
  21. data/db/schema.rb +45 -47
  22. data/etc/postfix/schleuder_sqlite.cf +1 -1
  23. data/etc/schleuder-weekly-key-maintenance.service +9 -0
  24. data/etc/schleuder-weekly-key-maintenance.timer +9 -0
  25. data/etc/schleuder.yml +3 -3
  26. data/lib/schleuder-api-daemon/helpers/schleuder-api-daemon-helper.rb +3 -3
  27. data/lib/schleuder-api-daemon/routes/subscription.rb +4 -4
  28. data/lib/schleuder.rb +9 -11
  29. data/lib/schleuder/cli.rb +9 -188
  30. data/lib/schleuder/cli/cert.rb +2 -2
  31. data/lib/schleuder/cli/cli_helper.rb +14 -0
  32. data/lib/schleuder/cli/schleuder_cert_manager.rb +4 -4
  33. data/lib/schleuder/conf.rb +3 -3
  34. data/lib/schleuder/errors/base.rb +2 -2
  35. data/lib/schleuder/errors/decryption_failed.rb +1 -1
  36. data/lib/schleuder/errors/fatal_error.rb +1 -1
  37. data/lib/schleuder/errors/key_adduid_failed.rb +1 -1
  38. data/lib/schleuder/errors/key_generation_failed.rb +1 -1
  39. data/lib/schleuder/errors/message_empty.rb +1 -1
  40. data/lib/schleuder/errors/message_too_big.rb +1 -1
  41. data/lib/schleuder/errors/too_many_keys.rb +1 -1
  42. data/lib/schleuder/filters/post_decryption/10_request.rb +3 -3
  43. data/lib/schleuder/filters/post_decryption/20_max_message_size.rb +1 -1
  44. data/lib/schleuder/filters/post_decryption/30_forward_to_owner.rb +1 -1
  45. data/lib/schleuder/filters/post_decryption/40_receive_admin_only.rb +1 -1
  46. data/lib/schleuder/filters/post_decryption/50_receive_authenticated_only.rb +1 -1
  47. data/lib/schleuder/filters/post_decryption/60_receive_signed_only.rb +1 -1
  48. data/lib/schleuder/filters/post_decryption/70_receive_encrypted_only.rb +1 -1
  49. data/lib/schleuder/filters/post_decryption/80_receive_from_subscribed_emailaddresses_only.rb +1 -1
  50. data/lib/schleuder/filters/pre_decryption/10_forward_bounce_to_admins.rb +1 -1
  51. data/lib/schleuder/filters/pre_decryption/30_send_key.rb +1 -1
  52. data/lib/schleuder/filters/pre_decryption/40_fix_exchange_messages.rb +1 -1
  53. data/lib/schleuder/filters/pre_decryption/50_strip_html_from_alternative.rb +2 -2
  54. data/lib/schleuder/filters_runner.rb +9 -9
  55. data/lib/schleuder/gpgme/ctx.rb +15 -35
  56. data/lib/schleuder/gpgme/key.rb +4 -136
  57. data/lib/schleuder/gpgme/user_id.rb +2 -0
  58. data/lib/schleuder/keyword_handlers/attach_list_key.rb +17 -0
  59. data/lib/schleuder/keyword_handlers/base.rb +36 -0
  60. data/lib/schleuder/keyword_handlers/get_version.rb +11 -0
  61. data/lib/schleuder/keyword_handlers/key_management.rb +141 -0
  62. data/lib/schleuder/keyword_handlers/list_management.rb +19 -0
  63. data/lib/schleuder/keyword_handlers/resend.rb +208 -0
  64. data/lib/schleuder/keyword_handlers/sign_this.rb +54 -0
  65. data/lib/schleuder/keyword_handlers/subscription_management.rb +213 -0
  66. data/lib/schleuder/keyword_handlers_runner.rb +146 -0
  67. data/lib/schleuder/list.rb +11 -39
  68. data/lib/schleuder/list_builder.rb +16 -5
  69. data/lib/schleuder/listlogger.rb +1 -1
  70. data/lib/schleuder/mail/message.rb +82 -61
  71. data/lib/schleuder/runner.rb +18 -16
  72. data/lib/schleuder/subscription.rb +9 -10
  73. data/lib/schleuder/validators/boolean_validator.rb +1 -1
  74. data/lib/schleuder/validators/email_validator.rb +1 -1
  75. data/lib/schleuder/validators/fingerprint_validator.rb +1 -1
  76. data/lib/schleuder/validators/greater_than_zero_validator.rb +1 -1
  77. data/lib/schleuder/validators/no_line_breaks_validator.rb +1 -1
  78. data/lib/schleuder/version.rb +1 -1
  79. data/locales/de.yml +48 -36
  80. data/locales/en.yml +33 -21
  81. metadata +117 -53
  82. data/bin/pinentry-clearpassphrase +0 -72
  83. data/lib/schleuder/plugin_runners/base.rb +0 -91
  84. data/lib/schleuder/plugin_runners/list_plugins_runner.rb +0 -24
  85. data/lib/schleuder/plugin_runners/request_plugins_runner.rb +0 -27
  86. data/lib/schleuder/plugins/attach_listkey.rb +0 -13
  87. data/lib/schleuder/plugins/get_version.rb +0 -7
  88. data/lib/schleuder/plugins/key_management.rb +0 -121
  89. data/lib/schleuder/plugins/list_management.rb +0 -15
  90. data/lib/schleuder/plugins/resend.rb +0 -199
  91. data/lib/schleuder/plugins/sign_this.rb +0 -46
  92. data/lib/schleuder/plugins/subscription_management.rb +0 -207
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 648f81aa424a3214a9d03fb66e5b3e216c8990e092d1b5b18ab41a1f0a1e5fd3
4
- data.tar.gz: 62a5a77189860b4228a2168690f3990d02e53ee4dfb6c458a0273b5407e8a2e7
3
+ metadata.gz: 71fae6520fb76978d0292533c7e4b1d4ed72cd881ba81be71eacd2ab1811d5e2
4
+ data.tar.gz: 5542044280bcd7bb2875bdc443c37146c490fe186a16c9d2449d8d9dab8131c9
5
5
  SHA512:
6
- metadata.gz: 97a79b18f6655bd6f9c56beded7527e061fd955433ac2e436a28176eef9d8903916b16a1b0ee22a51f600fbd56d4639b5fadd5a53f3df08d4ca156fc805c9cbb
7
- data.tar.gz: 6e6b4ea2847974d64a3b38a0d99ec0bfa5bb824a36d566fa731889a711b88f127ad6314f9f44b8dd99937977dc0f9d9f2530419762fae527bb24e37b10517343
6
+ metadata.gz: 8c724133f39be4c6af72c61d6f26e95bcf4f1a99f6184ac845d55a36d53eaea60fc78273950609f3bbae7fc4faec72005adf9324ab5186d505be58495cb58582
7
+ data.tar.gz: 608978e0555f93ab3e4f7aefb67063df9e0fd8f7b06b28d20ea8f869384ba7ed0e08ba0d071ca81fccd2f269656907413b82fce930c6535aff30f60ef8ad4f95
data/README.md CHANGED
@@ -10,8 +10,8 @@ For more details see <https://schleuder.org/docs/>.
10
10
 
11
11
  Requirements
12
12
  ------------
13
- * ruby >=2.1
14
- * gnupg 2.0.x, or >=2.1.16
13
+ * ruby >=2.5
14
+ * gnupg >=2.2
15
15
  * gpgme
16
16
  * sqlite3
17
17
  * openssl
@@ -48,15 +48,15 @@ Additionally these **rubygems** are required (will be installed automatically un
48
48
  Installing Schleuder
49
49
  ------------
50
50
 
51
- 1. Download [the gem](https://schleuder.org/download/schleuder-3.6.0.gem) and [the OpenPGP-signature](https://schleuder.org/download/schleuder-3.6.0.gem.sig) and verify:
51
+ 1. Download [the gem](https://schleuder.org/download/schleuder-4.0.0.gem) and [the OpenPGP-signature](https://schleuder.org/download/schleuder-4.0.0.gem.sig) and verify:
52
52
  ```
53
53
  gpg --recv-key 0xB3D190D5235C74E1907EACFE898F2C91E2E6E1F3
54
- gpg --verify schleuder-3.6.0.gem.sig
54
+ gpg --verify schleuder-4.0.0.gem.sig
55
55
  ```
56
56
 
57
57
  2. If all went well install the gem:
58
58
  ```
59
- gem install schleuder-3.6.0.gem
59
+ gem install schleuder-4.0.0.gem
60
60
  ```
61
61
 
62
62
  3. Set up schleuder:
@@ -146,4 +146,4 @@ GNU GPL 3.0. Please see [LICENSE.txt](LICENSE.txt).
146
146
  Alternative Download
147
147
  --------------------
148
148
 
149
- Alternatively to the gem-files you can download the latest release as [a tarball](https://schleuder.org/download/schleuder-3.6.0.tar.gz) and [its OpenPGP-signature](https://schleuder.org/download/schleuder-3.6.0.tar.gz.sig).
149
+ Alternatively to the gem-files you can download the latest release as [a tarball](https://schleuder.org/download/schleuder-4.0.0.tar.gz) and [its OpenPGP-signature](https://schleuder.org/download/schleuder-4.0.0.tar.gz.sig).
data/Rakefile CHANGED
@@ -7,9 +7,7 @@ require_relative "lib/#{project}.rb"
7
7
  @filename_gem = "#{@tagname}.gem"
8
8
  @filename_tarball = "#{@tagname}.tar.gz"
9
9
 
10
- load "active_record/railties/databases.rake"
11
-
12
- puts @filename_gem
10
+ load 'active_record/railties/databases.rake'
13
11
 
14
12
  # Configure ActiveRecord
15
13
  ActiveRecord::Tasks::DatabaseTasks.tap do |config|
@@ -21,7 +19,7 @@ ActiveRecord::Tasks::DatabaseTasks.tap do |config|
21
19
  end
22
20
 
23
21
  # ActiveRecord requires this task to be present
24
- Rake::Task.define_task("db:environment")
22
+ Rake::Task.define_task('db:environment')
25
23
 
26
24
  namespace :db do
27
25
  # A shortcut.
@@ -44,7 +42,7 @@ end
44
42
  task :publish_gem => :website
45
43
  task :git_tag => :check_version
46
44
 
47
- desc "Build new version: git-tag and gem-file"
45
+ desc 'Build new version: git-tag and gem-file'
48
46
  task :new_version => [
49
47
  :check_version,
50
48
  :edit_readme, :edit_changelog,
@@ -59,12 +57,12 @@ task :new_version => [
59
57
  ] do
60
58
  end
61
59
 
62
- desc "Edit CHANGELOG.md"
60
+ desc 'Edit CHANGELOG.md'
63
61
  task :edit_changelog do
64
62
  edit_and_add_file('CHANGELOG')
65
63
  end
66
64
 
67
- desc "Edit README"
65
+ desc 'Edit README'
68
66
  task :edit_readme do
69
67
  edit_and_add_file('README')
70
68
  end
@@ -74,12 +72,12 @@ task :git_tag do
74
72
  `git tag -u #{@gpguid} -s -m "Version #{@version}" #{@tagname}`
75
73
  end
76
74
 
77
- desc "Add changed version to git-index"
75
+ desc 'Add changed version to git-index'
78
76
  task :git_add_version do
79
77
  `git add lib/#{project}/version.rb`
80
78
  end
81
79
 
82
- desc "Commit changes as new version"
80
+ desc 'Commit changes as new version'
83
81
  task :git_commit do
84
82
  `git commit -m "Version #{@version}"`
85
83
  end
@@ -91,7 +89,7 @@ end
91
89
 
92
90
  desc 'OpenPGP-sign gem and tarball'
93
91
  task :sign_tarball do
94
- `gpg -v -u #{@gpguid} -b #{@filename_tarball}`
92
+ `gpg -u #{@gpguid} -b #{@filename_tarball}`
95
93
  end
96
94
 
97
95
  desc 'OpenPGP-sign gem'
@@ -113,10 +111,10 @@ desc 'Publish gem-file to rubygems.org'
113
111
  task :publish_gem do
114
112
  puts "Really push #{@filename_gem} to rubygems.org? [yN]"
115
113
  if $stdin.gets.match(/^y/i)
116
- puts "Pushing..."
114
+ puts 'Pushing...'
117
115
  `gem push #{@filename_gem}`
118
116
  else
119
- puts "Not pushed."
117
+ puts 'Not pushed.'
120
118
  end
121
119
  end
122
120
 
@@ -127,7 +125,7 @@ end
127
125
 
128
126
  desc 'Describe manual release-tasks'
129
127
  task :website do
130
- puts "Please remember to publish the release-notes on the website and on schleuder-announce."
128
+ puts 'Please remember to publish the release-notes on the website and on schleuder-announce.'
131
129
  end
132
130
 
133
131
  desc 'Check if version-tag already exists'
@@ -135,7 +133,7 @@ task :check_version do
135
133
  # Check if Schleuder::VERSION has been updated since last release
136
134
  if `git tag`.match?(/^#{@tagname}$/)
137
135
  $stderr.puts "Warning: Tag '#{@tagname}' already exists. Did you forget to update lib/#{project}/version.rb?"
138
- $stderr.print "Delete tag to continue? [yN] "
136
+ $stderr.print 'Delete tag to continue? [yN] '
139
137
  if $stdin.gets.match(/^y/i)
140
138
  `git tag -d #{@tagname}`
141
139
  else
data/bin/schleuder CHANGED
@@ -4,7 +4,7 @@
4
4
  # error-message.
5
5
  $VERBOSE=nil
6
6
 
7
- trap("INT") { exit 1 }
7
+ trap('INT') { exit 1 }
8
8
 
9
9
 
10
10
  begin
@@ -1,4 +1,4 @@
1
- class CreateLists < ActiveRecord::Migration
1
+ class CreateLists < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! table_exists?(:lists)
4
4
  create_table :lists do |t|
@@ -1,4 +1,4 @@
1
- class CreateSubscriptions < ActiveRecord::Migration
1
+ class CreateSubscriptions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! table_exists?(:subscriptions)
4
4
  create_table :subscriptions do |t|
@@ -1,4 +1,4 @@
1
- class AddLanguageToLists < ActiveRecord::Migration
1
+ class AddLanguageToLists < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! column_exists?(:lists, :language)
4
4
  add_column :lists, :language, :string, default: 'en'
@@ -1,4 +1,4 @@
1
- class ChangeKeywordsAdminOnlyDefaults < ActiveRecord::Migration
1
+ class ChangeKeywordsAdminOnlyDefaults < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  change_column_default :lists, :keywords_admin_only, "[\"subscribe\", \"unsubscribe\", \"delete-key\"]"
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddForwardAllIncomingToAdmins < ActiveRecord::Migration
1
+ class AddForwardAllIncomingToAdmins < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! column_exists?(:lists, :forward_all_incoming_to_admins)
4
4
  add_column :lists, :forward_all_incoming_to_admins, :boolean, default: false
@@ -1,4 +1,4 @@
1
- class ChangeSendEncryptedOnlyDefault < ActiveRecord::Migration
1
+ class ChangeSendEncryptedOnlyDefault < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  change_column_default :lists, :send_encrypted_only, true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddLogfilesToKeepToLists < ActiveRecord::Migration
1
+ class AddLogfilesToKeepToLists < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! column_exists?(:lists, :logfiles_to_keep)
4
4
  add_column :lists, :logfiles_to_keep, :integer, default: 2
@@ -1,4 +1,4 @@
1
- class RenameDeliveryDisabledToDeliveryEnabledAndChangeDefault < ActiveRecord::Migration
1
+ class RenameDeliveryDisabledToDeliveryEnabledAndChangeDefault < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if column_exists?(:subscriptions, :delivery_disabled)
4
4
  rename_column :subscriptions, :delivery_disabled, :delivery_enabled
@@ -1,4 +1,4 @@
1
- class StripGpgPassphrase < ActiveRecord::Migration
1
+ class StripGpgPassphrase < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if column_exists?(:lists, :gpg_passphrase)
4
4
  remove_column :lists, :gpg_passphrase
@@ -1,4 +1,4 @@
1
- class RemoveDefaultMime < ActiveRecord::Migration
1
+ class RemoveDefaultMime < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  remove_column :lists, :default_mime
4
4
  end
@@ -1,4 +1,4 @@
1
- class FixHeadersToMetaDefaults < ActiveRecord::Migration
1
+ class FixHeadersToMetaDefaults < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  change_column_default :lists, :headers_to_meta, '["from", "to", "date", "cc"]'
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddInternalFooterToList < ActiveRecord::Migration
1
+ class AddInternalFooterToList < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! column_exists?(:lists, :internal_footer)
4
4
  add_column :lists, :internal_footer, :text, default: ''
@@ -1,4 +1,4 @@
1
- class AddSigEncToHeadersToMetaDefaults < ActiveRecord::Migration
1
+ class AddSigEncToHeadersToMetaDefaults < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  change_column_default :lists, :headers_to_meta, '["from", "to", "cc", "date", "sig", "enc"]'
4
4
  list_klass = create_list_klass
@@ -1,4 +1,4 @@
1
- class AddDeliverSelfsentToList < ActiveRecord::Migration
1
+ class AddDeliverSelfsentToList < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! column_exists?(:lists, :deliver_selfsent)
4
4
  add_column :lists, :deliver_selfsent, :boolean, default: true
@@ -1,4 +1,4 @@
1
- class AddAutocryptHeaderToList < ActiveRecord::Migration
1
+ class AddAutocryptHeaderToList < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! column_exists?(:lists, :include_autocrypt_header)
4
4
  add_column :lists, :include_autocrypt_header, :boolean, default: true
@@ -1,4 +1,4 @@
1
- class AddSetReplyToToSenderAndMungeFrom < ActiveRecord::Migration
1
+ class AddSetReplyToToSenderAndMungeFrom < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  if ! column_exists?(:lists, :set_reply_to_to_sender)
4
4
  add_column :lists, :set_reply_to_to_sender, :boolean, default: false
data/db/schema.rb CHANGED
@@ -1,66 +1,64 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
5
4
  #
6
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
5
+ # This file is the source Rails uses to define your schema when running `rails
6
+ # db:schema:load`. When creating a new database, `rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
11
10
  #
12
11
  # It's strongly recommended that you check this file into your version control system.
13
12
 
14
- ActiveRecord::Schema.define(version: 20200118170110) do
13
+ ActiveRecord::Schema.define(version: 2020_01_18_170110) do
15
14
 
16
15
  create_table "lists", force: :cascade do |t|
17
16
  t.datetime "created_at"
18
17
  t.datetime "updated_at"
19
- t.string "email", limit: 255
20
- t.string "fingerprint", limit: 255
21
- t.string "log_level", limit: 255, default: "warn"
22
- t.string "subject_prefix", limit: 255, default: ""
23
- t.string "subject_prefix_in", limit: 255, default: ""
24
- t.string "subject_prefix_out", limit: 255, default: ""
25
- t.string "openpgp_header_preference", limit: 255, default: "signencrypt"
26
- t.text "public_footer", default: ""
27
- t.text "headers_to_meta", default: "[\"from\", \"to\", \"cc\", \"date\", \"sig\", \"enc\"]"
28
- t.text "bounces_drop_on_headers", default: "{\"x-spam-flag\":\"yes\"}"
29
- t.text "keywords_admin_only", default: "[\"subscribe\", \"unsubscribe\", \"delete-key\"]"
30
- t.text "keywords_admin_notify", default: "[\"add-key\"]"
31
- t.boolean "send_encrypted_only", default: true
32
- t.boolean "receive_encrypted_only", default: false
33
- t.boolean "receive_signed_only", default: false
34
- t.boolean "receive_authenticated_only", default: false
35
- t.boolean "receive_from_subscribed_emailaddresses_only", default: false
36
- t.boolean "receive_admin_only", default: false
37
- t.boolean "keep_msgid", default: true
38
- t.boolean "bounces_drop_all", default: false
39
- t.boolean "bounces_notify_admins", default: true
40
- t.boolean "deliver_selfsent", default: true
41
- t.boolean "include_list_headers", default: true
42
- t.boolean "include_openpgp_header", default: true
43
- t.integer "max_message_size_kb", default: 10240
44
- t.string "language", limit: 255, default: "en"
45
- t.boolean "forward_all_incoming_to_admins", default: false
46
- t.integer "logfiles_to_keep", default: 2
47
- t.text "internal_footer", default: ""
48
- t.boolean "include_autocrypt_header", default: true
49
- t.boolean "set_reply_to_to_sender", default: false
50
- t.boolean "munge_from", default: false
18
+ t.string "email", limit: 255
19
+ t.string "fingerprint", limit: 255
20
+ t.string "log_level", limit: 255, default: "warn"
21
+ t.string "subject_prefix", limit: 255, default: ""
22
+ t.string "subject_prefix_in", limit: 255, default: ""
23
+ t.string "subject_prefix_out", limit: 255, default: ""
24
+ t.string "openpgp_header_preference", limit: 255, default: "signencrypt"
25
+ t.text "public_footer", default: ""
26
+ t.text "headers_to_meta", default: "[\"from\", \"to\", \"cc\", \"date\", \"sig\", \"enc\"]"
27
+ t.text "bounces_drop_on_headers", default: "{\"x-spam-flag\":\"yes\"}"
28
+ t.text "keywords_admin_only", default: "[\"subscribe\", \"unsubscribe\", \"delete-key\"]"
29
+ t.text "keywords_admin_notify", default: "[\"add-key\"]"
30
+ t.boolean "send_encrypted_only", default: true
31
+ t.boolean "receive_encrypted_only", default: false
32
+ t.boolean "receive_signed_only", default: false
33
+ t.boolean "receive_authenticated_only", default: false
34
+ t.boolean "receive_from_subscribed_emailaddresses_only", default: false
35
+ t.boolean "receive_admin_only", default: false
36
+ t.boolean "keep_msgid", default: true
37
+ t.boolean "bounces_drop_all", default: false
38
+ t.boolean "bounces_notify_admins", default: true
39
+ t.boolean "include_list_headers", default: true
40
+ t.boolean "include_openpgp_header", default: true
41
+ t.integer "max_message_size_kb", default: 10240
42
+ t.string "language", limit: 255, default: "en"
43
+ t.boolean "forward_all_incoming_to_admins", default: false
44
+ t.integer "logfiles_to_keep", default: 2
45
+ t.text "internal_footer", default: ""
46
+ t.boolean "deliver_selfsent", default: true
47
+ t.boolean "include_autocrypt_header", default: true
48
+ t.boolean "set_reply_to_to_sender", default: false
49
+ t.boolean "munge_from", default: false
51
50
  end
52
51
 
53
52
  create_table "subscriptions", force: :cascade do |t|
54
- t.integer "list_id"
55
- t.string "email", limit: 255
56
- t.string "fingerprint", limit: 255
57
- t.boolean "admin", default: false
58
- t.boolean "delivery_enabled", default: true
53
+ t.integer "list_id"
54
+ t.string "email", limit: 255
55
+ t.string "fingerprint", limit: 255
56
+ t.boolean "admin", default: false
57
+ t.boolean "delivery_enabled", default: true
59
58
  t.datetime "created_at"
60
59
  t.datetime "updated_at"
60
+ t.index ["email", "list_id"], name: "index_subscriptions_on_email_and_list_id", unique: true
61
+ t.index ["list_id"], name: "index_subscriptions_on_list_id"
61
62
  end
62
63
 
63
- add_index "subscriptions", ["email", "list_id"], name: "index_subscriptions_on_email_and_list_id", unique: true
64
- add_index "subscriptions", ["list_id"], name: "index_subscriptions_on_list_id"
65
-
66
64
  end
@@ -15,7 +15,7 @@
15
15
  # it is not recommended to use this table for more powerful
16
16
  # configuration options (e.g. transport_maps) because it could give
17
17
  # the schleuder user (which can write the given sqlite database) the
18
- # power to change settings for for other mail handled by this Postfix
18
+ # power to change settings for other mail handled by this Postfix
19
19
  # instance.
20
20
 
21
21
  dbpath = /var/lib/schleuder/db.sqlite
@@ -0,0 +1,9 @@
1
+ [Unit]
2
+ Description=Schleuder weekly key maintenance
3
+ After=local-fs.target network.target
4
+
5
+ [Service]
6
+ Type=oneshot
7
+ ExecStart=/usr/local/bin/schleuder refresh_keys
8
+ ExecStart=/usr/local/bin/schleuder check_keys
9
+ User=schleuder
@@ -0,0 +1,9 @@
1
+ [Unit]
2
+ Description=Schleuder weekly key maintenance
3
+
4
+ [Timer]
5
+ OnCalendar=weekly
6
+ Persistent=true
7
+
8
+ [Install]
9
+ WantedBy=timers.target
data/etc/schleuder.yml CHANGED
@@ -4,8 +4,8 @@ lists_dir: /var/lib/schleuder/lists
4
4
  # Where to write list-logs. The actual log-file will be <lists_logs_base_dir>/<hostname>/<listname>/list.log.
5
5
  listlogs_dir: /var/lib/schleuder/lists
6
6
 
7
- # Schleuder reads plugins also from this directory.
8
- plugins_dir: /etc/schleuder/plugins
7
+ # Schleuder looks for additional, custom keyword-handlers in this directory.
8
+ keyword_handlers_dir: /usr/local/lib/schleuder/keyword_handlers
9
9
 
10
10
  # Schleuder reads filters also from this directory path,
11
11
  # in the specific pre_decryption or post_decryption subdirectory.
@@ -22,7 +22,7 @@ filters_dir: /usr/local/lib/schleuder/filters
22
22
  log_level: warn
23
23
 
24
24
  # Which keyserver to refresh keys from (used by `schleuder refresh_keys`, meant
25
- # to be run from cron weekly).
25
+ # to be run from cron or systemd weekly).
26
26
  # If you have gnupg 2.1, we strongly suggest to use a hkps-keyserver:
27
27
  #keyserver: hkps://hkps.pool.sks-keyservers.net
28
28
  # If you have gnupg 2.1 and TOR running locally, use a onion-keyserver:
@@ -23,7 +23,7 @@ module SchleuderApiDaemonHelper
23
23
  if params[:list_id].present?
24
24
  id_or_email = params[:list_id]
25
25
  else
26
- client_error "Parameter list_id is required"
26
+ client_error 'Parameter list_id is required'
27
27
  end
28
28
  end
29
29
  if is_an_integer?(id_or_email)
@@ -41,7 +41,7 @@ module SchleuderApiDaemonHelper
41
41
  else
42
42
  # Email
43
43
  if params[:list_id].blank?
44
- client_error "Parameter list_id is required when using email as identifier for subscriptions."
44
+ client_error 'Parameter list_id is required when using email as identifier for subscriptions.'
45
45
  else
46
46
  sub = list.subscriptions.where(email: id_or_email).first
47
47
  end
@@ -103,7 +103,7 @@ module SchleuderApiDaemonHelper
103
103
  expiry: key.expires,
104
104
  generated_at: key.generated_at,
105
105
  primary_uid: key.primary_uid.uid,
106
- oneline: key.oneline,
106
+ summary: key.summary,
107
107
  trust_issues: key.usability_issue
108
108
  }
109
109
  if include_keydata