Commit 22191671 authored by maxigas's avatar maxigas Committed by georg

Introduce X-LIST-NAME keyword, alias for X-LISTNAME

Thanks, maxigas!

Closes #260
parent 8657fd7a
......@@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
* Log the full exception when sending a message fails. (Thanks, Lunar!)
* When creating a new list, we do not anymore look for a matching key for the admin-address in the list's keyring. We don't want to look up keys for subscriptions by email at all. (This was anyway only useful in the corner case where you prefilled a keyring to use for the new list.)
* API: Access to `/status.json` is now allowed without authentication.
* Deprecate X-LISTNAME in favour of X-LIST-NAME, for the sake of consistency in spelling keywords (but X-LISTNAME is still supported). (Thanks, maxigas!)
### Fixed
......
......@@ -25,7 +25,7 @@ module Schleuder
return error if error
command = keyword.gsub('-', '_')
if command == 'listname'
if ['list_name', 'listname'].include? (command)
return nil
elsif ! @plugin_module.respond_to?(command)
return I18n.t('plugins.unknown_keyword', keyword: keyword)
......@@ -66,7 +66,7 @@ module Schleuder
def check_listname_keyword
return nil if @mail.keywords.blank?
listname_kw = @mail.keywords.assoc('listname')
listname_kw = @mail.keywords.assoc('list-name') || @mail.keywords.assoc('listname')
if listname_kw.blank?
@mail.reply_to_signer I18n.t(:missing_listname_keyword_error)
exit
......
......@@ -130,8 +130,8 @@ de:
no_output_result: Deine Email ergab keinen Ausgabe-Text.
owner_forward_prefix: Die folgende Email ging für die Listen-Besitzer/innen ein.
no_keywords_error: Deine Email enthielt keine Schlüsselwörter, daher gab es nichts zu tun.
missing_listname_keyword_error: Deine Email enthielt nicht das notwendige X-LISTNAME-Schlüsselwort, daher wurde sie zurückgewiesen.
wrong_listname_keyword_error: Deine Email enthielt ein falsches X-LISTNAME-Schlüsselwort. Der Wert dieses Schlüsselworts muss der Emailadresse dieser Liste gleichen.
missing_listname_keyword_error: Deine Email enthielt nicht das notwendige X-LIST-NAME-Schlüsselwort, daher wurde sie zurückgewiesen.
wrong_listname_keyword_error: Deine Email enthielt ein falsches X-LIST-NAME-Schlüsselwort. Der Wert dieses Schlüsselworts muss der Emailadresse dieser Liste gleichen.
bounces_drop_all: Die angehängte Email hätte zurückgewiesen (bounced) werden sollen, wurde aber stillschweigend fallen gelassen, weil die Konfiguration dieser Liste definiert, dass für diese Liste nie Email zurückgewiesen werden soll.
bounces_drop_on_headers: "Die angehängte Email hätte zurückgewiesen (bounce) werden sollen, wurde aber stillschweigend fallen gelassen, weil diese Kopfzeile gefunden wurde: %{key}: %{value}"
bounces_notify_admins: "Die angehängte Email wurde mit folgender Nachricht zurückgewiesen:"
......
......@@ -130,8 +130,8 @@ en:
no_output_result: Your message resulted in no output.
owner_forward_prefix: The following message was received for the list-owners.
no_keywords_error: Your message didn't contain any keywords, thus there was nothing to do.
missing_listname_keyword_error: Your message didn't contain the mandatory X-LISTNAME-keyword, thus it was rejected.
wrong_listname_keyword_error: Your message contained a wrong X-LISTNAME-keyword. The value of that keyword must match the email address of this list.
missing_listname_keyword_error: Your message didn't contain the mandatory X-LIST-NAME-keyword, thus it was rejected.
wrong_listname_keyword_error: Your message contained a wrong X-LIST-NAME-keyword. The value of that keyword must match the email address of this list.
bounces_drop_all: The attached message should have been bounced but was dropped without further notice because the list's configuration defines that no message should ever be bounced.
bounces_drop_on_headers: "The attached message should have been bounced but was dropped without further notice because it matched this header-line: %{key}: %{value}"
bounces_notify_admins: "The attached message was bounced with the following notice:"
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment