Verified Commit d1dc50bc authored by paz's avatar paz

Improve wording about automated messages.

Not all of those were bounces, the texts were a little misleading.
parent 40ae84a4
......@@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](
* Tolerate 0x-prefix on input for fingerprints of subscriptions.
* Tolerate spaces on input for fingerprints in keywords.
* `X-GET-KEY` returns keys as attachments now.
* The texts that describe the forwarded automated messages now reflect that not all of those were bounces.
### Fixed
module Schleuder
module Filters
def self.forward_bounce_to_admins(list, mail)
if mail.bounce? "Forwarding bounce to admins"
list.logger.notify_admin I18n.t(:forward_bounce_to_admins), mail.original_message, I18n.t('bounce')
if mail.automated_message? "Forwarding automated message to admins"
list.logger.notify_admin I18n.t(:forward_automated_message_to_admins), mail.original_message, I18n.t('automated_message_subject')
......@@ -171,7 +171,7 @@ module Mail
def bounce?
def automated_message?
@recipient.match(/-bounce@/) ||
# Empty Return-Path
self.return_path.to_s == '<>' ||
......@@ -133,8 +133,8 @@ de:
notice: Hinweis
incoming_message: Eingehende Email
forward_all_incoming_to_admins: Die angehängte Email ging ein.
forward_bounce_to_admins: Die angehängte Email ging als zurückgewiesen (bounce) ein.
bounce: Zurückgewiesene Nachricht
forward_automated_message_to_admins: Die angehängte Email wurde vermutlich von einer Maschine und nicht von einem Menschen versendet. Daher ist sie nicht über die Liste verteilt sondern an euch Admins weitergeleitet worden.
automated_message_subject: Automatische Nachricht empfangen
check_keys: Schlüsselprüfung
check_keys_intro: "Bitte kümmere dich um die folgenden Schlüssel für Liste %{email}."
key_expires: Schlüssel %{fingerprint} %{email} läuft in %{days} Tagen ab.
......@@ -133,8 +133,8 @@ en:
notice: Notice
incoming_message: Incoming message
forward_all_incoming_to_admins: The attached message was received.
forward_bounce_to_admins: The attached message was received as bounce.
bounce: Bounced message
forward_automated_message_to_admins: Attached is a message that probably was sent by a machine, not a human. Therefore it has not been passed on to the list, but only to you, the admins.
automated_message_subject: Automated message received
check_keys: Keys check
check_keys_intro: "Please take care of these keys for list %{email}."
key_expires: Key %{fingerprint} expires in %{days} days.
......@@ -85,8 +85,8 @@ describe 'someone sends an email to a listname-dash-address' do
message = raw_msg.setup(, list)
expect( eql([''])
expect(message.subject).to eql('Bounced message')
expect( eql('The attached message was received as bounce.')
expect(message.subject).to eql(I18n.t('automated_message_subject'))
expect( eql(I18n.t('forward_automated_message_to_admins'))
expect( eql('message/rfc822')
expect( include('From:')
expect( include(mail.message_id)
......@@ -17,5 +17,26 @@ describe Mail::Message do
expect( eql('image/png')
expect( eql('text/plain')
# TODO: test message with "null" address ("<>") as Return-Path. I couldn't
# bring Mail to generate such a message, yet.
it "recognizes a message sent to listname-bounce@hostname as automated
message" do
list = create(:list)
mail =
mail = mail.setup('something-bounce@localhost', list)
expect(mail.automated_message?).to be(true)
it "recognizes a message with 'Auto-Submitted'-header as automated message" do
list = create(:list)
mail =
mail.header['Auto-Submitted'] = 'yes'
mail = mail.setup('something@localhost', list)
expect(mail.automated_message?).to be(true)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment