0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-11 01:06:53 +08:00
discourse/spec/fixtures/emails
Michael Brown a2b22d182e
FIX: email to a category should not require enabling reply-by-email (#37227)
DEV: email/receiver tests should explicitly test alternative_reply_by_email_addresses

Some of the email/receiver tests were using an alternative reply address in
their data, implicitly testing that functionality.

This commit modifies the test email fixtures to always use the main reply
address, and added a separate test explicitly testing the functionality of
`alternative_reply_by_email_addresses`.

This serves the mission of configuring as little as possible to not rely on
side effects.

DEV: email/processor tests should explicitly configure reply-by-email

Tests that rely on reply-by-email being configured should explicitly do so.

They're now moved to a common context in the same style as email/receiver
specs.

FIX: email to a category should not require enable reply-by-email

This commit removes the side effect of disabling category email address lookups
when `reply_by_email_enabled` is not configured, restoring functionality to the
situation where a category's `email_in` is configured without
`reply_by_email_enabled`.

Added tests for each of these situations.

DEV: separate tests for email receiver by whether reply_by_email should be configured

The impetus for this change is commit e05ef50c introducing an unintended side
effect that *should* have caused tests to fail; specifically the situation
where `email_in` is enabled and a category has an incoming email address
configured, but `reply_by_email_enabled` is *not* enabled.

The change in the referenced commit broke this configuration, but this was not
noticed as the spec always configured `reply_by_email_enabled`.

The only change made in this commit is reorganising the tests such that
reply-by-email is only configured when necessary. Thus, this commit *alone*
will break tests.
2026-02-03 13:01:16 -05:00
..
apple_mail_attachment.eml FIX: properly handle attachments in received emails 2019-01-25 19:13:34 +01:00
attached_eml_file.eml FIX: don't strip eml attachments from received emails 2018-11-05 09:35:22 +01:00
attached_pdf_file.eml FIX: support incoming emails with just an attachment 2018-02-16 18:14:56 +01:00
attached_rb_file.eml FEATURE: new 'allow_all_attachments_for_group_messages' site setting 2016-02-29 22:39:24 +01:00
attached_txt_file.eml FIX: replace 'discourse_email_parser' with 'email_reply_trimmer' to better trim replies from plain text emails 2016-01-30 01:29:31 +01:00
attached_txt_file_2.eml FIX: validates attachments against current authorized extensions 2017-11-07 19:17:33 +01:00
auto_generated_allowlisted.eml FIX: use allowlist and blocklist terminology (#10209) 2020-07-27 10:23:54 +10:00
auto_generated_header.eml FEATURE: new 'block_auto_generated_emails' site setting 2016-04-20 21:29:27 +02:00
auto_generated_precedence.eml FEATURE: new 'block_auto_generated_emails' site setting 2016-04-20 21:29:27 +02:00
auto_generated_unblocked.eml FEATURE: new 'block_auto_generated_emails' site setting 2016-04-20 21:29:27 +02:00
bad_destinations.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
base64_encoded_body.eml FIX: Email::Cleaner must clear the encoding of replaced bodies 2026-01-15 13:05:25 -05:00
blocklist_allowlist_email.eml FIX: use allowlist and blocklist terminology (#10209) 2020-07-27 10:23:54 +10:00
body_with_image.eml FEATURE: Parse images in email signatures (#10137) 2020-07-08 15:50:30 +10:00
bounced_email.eml FEATURE: If PM email bounced for staged user then alert in whisper reply (#6648) 2018-11-27 00:29:37 +05:30
bounced_email_multiple_status_codes.eml FIX: bounced email can contain multiple status codes 2018-01-03 17:59:20 +01:00
cc.eml FIX: don't invite users with the same email as 'reply_be_email_address' 2016-01-19 15:24:34 +01:00
chinese_reply.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
dmarc_fail.eml FEATURE: hide posts from incoming email based on dmarc verdict (#8333) 2019-11-26 15:55:22 +01:00
email_reply_1.eml FIX: associates email replies using both 'In-Reply-To' and 'References' headers 2016-01-20 22:52:08 +01:00
email_reply_2.eml FIX: associates email replies using both 'In-Reply-To' and 'References' headers 2016-01-20 22:52:08 +01:00
email_reply_3.eml FIX: associates email replies using both 'In-Reply-To' and 'References' headers 2016-01-20 22:52:08 +01:00
email_reply_4.eml FIX: associates email replies using both 'In-Reply-To' and 'References' headers 2016-01-20 22:52:08 +01:00
email_reply_like.eml FIX: delete staged users when the incoming email is rejected 2017-10-11 16:17:01 +02:00
email_reply_staged.eml FIX: delete staged users when the incoming email is rejected 2017-10-11 16:17:01 +02:00
email_reply_to_group_email_username.eml FEATURE: Use group SMTP settings for sending user notification emails (initial) (#13220) 2021-06-03 14:47:32 +10:00
email_to_group_email_username_1.eml FIX: Link up reply to post correctly when emailing group (#13339) 2021-06-10 15:28:50 +10:00
email_to_group_email_username_2.eml FIX: Link up reply to post correctly when emailing group (#13339) 2021-06-10 15:28:50 +10:00
email_to_group_email_username_2_as_unknown_sender.eml FIX: Link up reply to post correctly when emailing group (#13339) 2021-06-10 15:28:50 +10:00
email_to_group_email_username_3.eml FIX: Handle multiple In-Reply-To Message-ID in group inbox (#29912) 2024-11-26 11:12:40 +10:00
email_to_group_email_username_auto_generated.eml DEV: Add email fixture (#23364) 2023-09-01 16:29:47 +10:00
encoded_display_name.eml Use proper encoding for email fixtures. 2018-02-21 17:06:35 +08:00
encoded_filename.eml DEV: Update mail and use fork (#10639) 2021-02-18 20:15:02 +02:00
encoding_undefined_conversion.eml FIX: Catch UndefinedConversionError for inbound emails (#13000) 2021-05-10 14:26:23 +10:00
exchange_html_body.eml FIX: email to a category should not require enabling reply-by-email (#37227) 2026-02-03 13:01:16 -05:00
exchange_html_body_and_reply.eml FIX: email to a category should not require enabling reply-by-email (#37227) 2026-02-03 13:01:16 -05:00
exchange_html_reply.eml FIX: email to a category should not require enabling reply-by-email (#37227) 2026-02-03 13:01:16 -05:00
existing_user.eml FIX: staged users couldn't create new topic in a private category via email 2016-02-22 19:57:53 +01:00
forwarded_by_group_to_inbox.eml FIX: Capture CC addresses for forwarded emails (#14254) 2021-09-07 08:46:28 +10:00
forwarded_by_group_to_inbox_double_cc.eml FIX: Capture CC addresses for forwarded emails (#14254) 2021-09-07 08:46:28 +10:00
forwarded_email_1.eml FIX: wasn't able to parse FROM email in the embedded email 2016-12-01 18:34:47 +01:00
forwarded_email_2.eml FIX: mark forwarded email as read by the forwarder 2017-01-06 15:33:55 +01:00
forwarded_email_3.eml FIX: update mail gem to fix UTF-8 parsing issue 2018-04-25 21:53:37 +02:00
forwarded_email_4.eml FEATURE: Add small action post to indicate forwarded email 2020-02-12 16:23:17 +01:00
forwarded_email_to_category.eml Allow inclusion of elided text from emails when sending to a category… (#4844) 2017-06-29 13:03:14 +09:00
from_reply_by_email_address.eml ignore emails that are from the reply by email addresses (#5843) 2018-05-23 10:04:45 +02:00
from_the_future.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
gmail_html_reply.eml FIX: email to a category should not require enabling reply-by-email (#37227) 2026-02-03 13:01:16 -05:00
group_existing_user.eml FIX: Force enable user PM emails option when user posts to a group by email. 2018-10-02 12:38:10 +08:00
hard_bounce_via_verp.eml FEATURE: handle bounced emails 2016-05-02 23:15:32 +02:00
hard_bounce_via_verp_2.eml FEATURE: handle bounced emails 2016-05-02 23:15:32 +02:00
hebrew_reply.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
html_reply.eml FIX: email to a category should not require enabling reply-by-email (#37227) 2026-02-03 13:01:16 -05:00
ignored.eml FIX: ignore_by_title should match case-insensitive 2017-11-12 01:43:18 +01:00
inactive_sender.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
inline_image.eml Use proper encoding for email fixtures. 2018-02-21 17:06:35 +08:00
inline_image_2.eml FIX: Gracefully handle inline images in emails (#12855) 2021-04-29 10:17:33 +03:00
inline_mixed_replies.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
inline_reply.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
invalid_from_1.eml FIX: Handle incoming emails without email address in From header (#5177) 2017-09-12 22:35:24 +02:00
invalid_from_2.eml FIX: Handle incoming emails without email address in From header (#5177) 2017-09-12 22:35:24 +02:00
iphone_signature.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
like.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
logo_1.eml FIX: prevents duplicate attachments in incoming emails (#25986) 2024-03-01 18:38:49 +01:00
logo_2.eml FIX: prevents duplicate attachments in incoming emails (#25986) 2024-03-01 18:38:49 +01:00
long_embedded_email_headers.eml FIX: Parse address lists in embedded emails (#14514) 2021-10-06 15:07:29 +03:00
mailinglist.eml ignore some site settings for emails sent to mailinglist mirror category 2017-11-17 15:29:14 +01:00
mailinglist_dmarc_fail.eml FIX: Ignore DMARC for emails sent to mailing list mirror 2019-12-06 13:29:39 +01:00
mailinglist_reply.eml ignore some site settings for emails sent to mailinglist mirror category 2017-11-17 15:29:14 +01:00
mailinglist_short_message.eml FIX: Do not validate messages sent to mailing list mirror 2018-01-05 11:21:53 +01:00
mailinglist_unsubscribe.eml FIX: Don't reply to Unsubscribe email sent to mailing list mirror 2018-10-11 16:09:22 +02:00
mailman_1.eml FIX: improve mailman email parsing (#21627) 2023-05-19 10:33:48 +02:00
mailman_2.eml FIX: improve mailman email parsing (#21627) 2023-05-19 10:33:48 +02:00
mailman_3.eml FIX: improve mailman email parsing (#21627) 2023-05-19 10:33:48 +02:00
mailman_4.eml FIX: improve mailman email parsing (#21627) 2023-05-19 10:33:48 +02:00
missing_message_id.eml FIX: use MD5 of the email_string when there's no 'Message-Id' 2016-03-14 18:18:58 +01:00
mute.eml FEATURE: allow users to easily track/watch/mute topics via email 2019-03-06 18:38:49 +11:00
new_user.eml FEATURE: add support for multiple incoming emails for groups & categories 2016-02-24 19:47:58 +01:00
no_body.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
no_body_with_image.eml FIX: replace 'discourse_email_parser' with 'email_reply_trimmer' to better trim replies from plain text emails 2016-01-30 01:29:31 +01:00
no_date.eml FIX: delete staged users when the incoming email is rejected 2017-10-11 16:17:01 +02:00
no_from.eml FIX: Handle incoming emails without email address in From header (#5177) 2017-09-12 22:35:24 +02:00
no_subject.eml FEATURE: add support for multiple incoming emails for groups & categories 2016-02-24 19:47:58 +01:00
null_byte_in_subject.eml FIX: Strip null bytes in mail subjects. 2018-10-11 09:46:32 +08:00
old_destination.eml DEV: Remove old TODOs for message-id formats (#27196) 2024-05-28 13:57:09 +10:00
on_date_contact_wrote.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
original_message.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
paragraphs.eml DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
previous_replies.eml this period bothered me and it had to go 2016-02-08 15:37:49 -08:00
previous_replies_de.eml FIX: Remove markers from all translated languages (#14081) 2021-08-18 19:42:04 +03:00
quirks_exchange_xars.eml FIX: email receiver should ignore x-auto-response-suppress 2023-05-03 12:20:00 -04:00
readonly.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
removed_attachments.eml FIX: Email attachments with a size of 0 bytes caused error 2020-02-04 12:30:43 +01:00
reply_above.eml FIX: Remove 'reply above line' marker (#13927) 2021-08-03 20:08:19 +03:00
reply_above_de.eml FIX: Remove markers from all translated languages (#14081) 2021-08-18 19:42:04 +03:00
reply_and_forwarded.eml FIX: Don't create staged users when processing forwarded email fails 2019-05-09 23:47:47 +02:00
reply_to_category_address.eml FIX: email to a category should not require enabling reply-by-email (#37227) 2026-02-03 13:01:16 -05:00
reply_to_different_to_from.eml FIX: Use reply-to address for incoming emails if present (#13896) 2021-08-03 08:01:17 +10:00
reply_to_different_to_from_no_x_original.eml FIX: Use reply-to address for incoming emails if present (#13896) 2021-08-03 08:01:17 +10:00
reply_to_different_to_from_quoted_display_name.eml FIX: improve mailman email parsing (#21627) 2023-05-19 10:33:48 +02:00
reply_to_different_to_from_x_original_different.eml FIX: Use reply-to address for incoming emails if present (#13896) 2021-08-03 08:01:17 +10:00
reply_to_whitespaces.eml FIX: Use addresses to compare email header (#14509) 2021-10-05 12:42:19 +03:00
reply_user_matching.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
reply_user_matching_alternativereplyaddr.eml FIX: email to a category should not require enabling reply-by-email (#37227) 2026-02-03 13:01:16 -05:00
reply_user_not_matching.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
reply_user_not_matching_but_known.eml FEATURE: accept incoming email with reply_key mismatch when original email was forwarded 2017-11-12 23:44:22 +01:00
reply_with_8bit_encoding.eml Use proper encoding for email fixtures. 2018-02-21 17:06:35 +08:00
reply_with_weird_encoding.eml FIX: support emails in with weird encoding 2016-03-11 18:51:53 +01:00
screened_email.eml FIX: improve support for handling emails coming from screened email addresses 2016-04-18 23:01:54 +02:00
silenced_sender.eml FIX: Missing yml file 2017-11-10 14:29:36 -05:00
soft_bounce_via_verp.eml FEATURE: handle bounced emails 2016-05-02 23:15:32 +02:00
spam_x_ses_spam_verdict.eml FEATURE: add SES spam header to recognised spam headers (#8254) 2019-10-28 12:46:53 -04:00
spam_x_spam_flag.eml FEATURE: Create hidden posts for received spam emails (#6010) 2018-07-05 11:07:46 +02:00
spam_x_spam_status.eml FEATURE: Create hidden posts for received spam emails (#6010) 2018-07-05 11:07:46 +02:00
staged_reply_restricted.eml FIX: staged users weren't able to reply in restricted categories 2016-06-26 19:25:45 +02:00
staged_sender.eml Reenable skipped Email::Receiver spec. 2017-07-24 22:27:24 +09:00
text_and_html_reply.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
text_reply.eml FIX: update mail gem to fix UTF-8 parsing issue 2018-04-25 21:53:37 +02:00
tl3_user.eml improve receiver specs to account for posts approval 2016-04-11 18:20:26 +02:00
tl4_user.eml improve receiver specs to account for posts approval 2016-04-11 18:20:26 +02:00
too_many_mentions.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
too_small.eml FEATURE: better email in support 2016-01-19 00:57:55 +01:00
track.eml FEATURE: allow users to easily track/watch/mute topics via email 2019-03-06 18:38:49 +11:00
unparsable_email_addresses.eml FIX: Try fixing unparsable email addresses 2018-03-27 18:28:54 +02:00
unsorted_parts.eml FIX: Email::Cleaner must tell Mail to not sort body parts on serialisation 2026-01-15 13:05:25 -05:00
unsubscribe_body.eml Unsubscribe via email 2016-01-20 22:25:25 +13:00
unsubscribe_new_user.eml FIX: don't create staged users when incoming email is rejected 2017-10-03 16:36:08 +02:00
unsubscribe_subject.eml Unsubscribe via email 2016-01-20 22:25:25 +13:00
user_not_found.eml new 'enable_staged_users' site setting 2016-03-23 18:56:03 +01:00
verp_bounce_different_final_recipient.eml FIX: Prioritize VERP key over final_recipient header in bounced email 2019-05-03 12:12:44 +01:00
watch.eml FEATURE: allow users to easily track/watch/mute topics via email 2019-03-06 18:38:49 +11:00