Commit Graph

28 Commits

Author SHA1 Message Date
David Jones
c6c53a02a5 Permit attachments in mailbox conductor params
Prior to this commit, when adding attachments to an inbound email
through the conductor, the log would warn of an unpermitted parameter
with the message:

> Unpermitted parameter: :attachments. Context: { }

Also, if an application had the setting:

  config.action_controller.action_on_unpermitted_parameters = :raise

it would raise an error, because the attachments are not a permitted
parameter.

This commit also sets `action_on_unpermitted_parameters` to `:raise`
for the action mailbox test suite, so that tests are run in most
restrictive setting available, to prevent future unpermitted parameters
from being passed by conductor actions.

Co-authored-by: Dana Henke <danapalazzo1@gmail.com>
2021-07-02 16:56:16 -04:00
Santiago Bartesaghi
75e6ea4756 Implement ActionMailbox incinerate in conductor 2021-06-24 15:35:56 -03:00
Rafael Mendonça França
1b455e2e9d
Rails 6.2 is now Rails 7.0
We have big plans for the next version of Rails and that
require big versions.
2021-02-04 16:47:16 +00:00
Yasuo Honda
51931f0bde Address Rails 7.0 will return Content-Type header without modification
This pull request addresses these warnings.

```ruby
$ cd actionmailbox
$ bin/test test/controllers/ingresses/relay/inbound_emails_controller_test.rb
Run options: --seed 32561

DEPRECATION WARNING: Rails 7.0 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead. (called from call at /home/yahonda/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15)
...DEPRECATION WARNING: Rails 7.0 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead. (called from call at /home/yahonda/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15)
..

Finished in 0.114883s, 43.5224 runs/s, 87.0447 assertions/s.
5 runs, 10 assertions, 0 failures, 0 errors, 0 skips
$
```

Follow-up https://github.com/rails/rails/commit/84055130713
related to https://github.com/rails/rails/pull/41251
2021-02-02 20:18:03 +09:00
Mark Haussmann
71c8a89edd
Sendgrid: prepend X-Original-To header with envelope recipients
Sendgrid, like Mailgun, only passes BCC recipients as a parameter in the original JSON payload.

This PR adds code to prepend the recipients from the Sendgrid payload to the raw_email under the X-Original-To header.

References #38738.
2020-07-21 19:38:38 -04:00
David Heinemeier Hansson
666947089d Add option to set X-Original-To for systems that route on envelope addressing 2020-04-13 15:14:53 -07:00
Bill Cromie
fce29be335 Add a route to handle Mandrill's webhook URL check
Mandrill's Inbound API checks to see if a URL exists before it creates
the webhook. It sends a HEAD request, to which we now return a 200 OK
response to indicate that the route exists.

Now we can generate inbound API calls with ease on Mandrill, without
having to shuffle around tokens in production.

Fixes #37609.
2020-04-07 13:22:36 +01:00
David Heinemeier Hansson
d56d2e7406
Add a way to deliver inbound emails by source (#38849)
* Add a way to deliver inbound emails by source

Great for testing when you get an eml file and can just paste it in.

* Test updates

* Fix tests

* Fix spacing
2020-03-31 16:46:13 -07:00
Rikki Pitt
667d69cc5b
Add X-Original-To to mail using Mailgun recipient (#38738)
Expose the Mailgun SMTP recipient to Action Mailbox as X-Original-To, like Postfix.

Allows handling BCCed recipients who aren't listed in To/CC fields.
2020-03-23 18:10:48 -07:00
Matthijs Vos
8dca5162f9
Replace Mailgun API key with signing key
Mailgun now needs the signing key instead of the API key for validating incoming mails.
2020-02-21 11:33:04 -05:00
Haroon Ahmed
db1ae8cbb4 remove reference to global rails command and replace with bin/rails 2019-12-27 19:32:37 +00:00
Kyle Keesling
ce88f6bd25
Fix filenames of attachments created via the inbound email conductor
controller passed along attachment file paths instead of their filenames
2019-07-25 21:11:29 -04:00
yuuji.yaginuma
aab9f6734d Include BCC in the mail that sent from the development page
The BCC should be included as we show input field for BCC in view.
bf625f7fec/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/new.html.erb (L21-L24)
2019-06-20 14:09:01 +09:00
George Claghorn
f480cfabcd
Remove the Amazon SES ingress
It's unusable and not ready to ship in Rails 6.0. We'll rewrite it for 6.1.
2019-04-14 12:15:54 -04:00
yuuji.yaginuma
1b2f1735e7 Fix loading ActionMailbox::BaseController when CSRF protection is disabled
When `default_protect_from_forgery` is false, `verify_authenticity_token`
callback does not define and `skip_forgery_protection` raise exception.

Fixes #34837.
2019-04-11 18:25:09 +09:00
Yuichi Takeuchi
88453093d5 Fix that adding attachments lose a body 2019-01-19 23:28:41 +09:00
Pratik Naik
57cb8d7924 Use create_and_extract_message_id! to create an inbound email.
This makes sure the created email has checksum and message id columns set.
2019-01-17 14:19:37 -06:00
colorbox
620ba4c12a Fix document formatting on ActionMailbox [ci skip]
Use `+` instead of backquote.
2019-01-17 01:10:21 +09:00
George Claghorn
512b5316dd
Add Exim and Qmail support to Action Mailbox 2019-01-12 21:38:26 -05:00
George Claghorn
7aaf9b8076 Tweak Postmark ingress docs [ci skip] 2019-01-09 22:23:51 -05:00
George Claghorn
3c10edcfaf
Merge pull request #34908 from robzolkos/fix-actionmailbox-json
Bring in all of aws-sdk-sns if using Amazon ingress
2019-01-09 19:20:57 -05:00
Tomek Maszkowski
b77d2d9a03 Added Postmark ingress support 2019-01-09 18:00:27 -05:00
Rob Zolkos
fb5c07525f Bring in all of aws-sdk-sns if using Amazon ingress
Requiring _just_ the `Aws::SNS::MessageVerifier` does not work as it
references other classes in the AWS SDK that are not in this one class.

Bringing in the entire SNS SDK verifies the authenticity correctly.
2019-01-09 17:16:08 -05:00
Lachlan Sylvester
0419bc3504 add attachments to the new inbound mail 2019-01-07 10:56:41 +11:00
George Claghorn
d9630c4815 s/Active Mailbox/Action Mailbox/ [ci skip] 2019-01-01 16:43:07 -05:00
George Claghorn
5bb8f3ae67 Fix links in ingress docs [ci skip] 2019-01-01 08:16:38 -05:00
George Claghorn
6c168aaffb Nest Action Mailbox classes in the API docs 2018-12-26 16:18:42 -05:00
George Claghorn
a5b2fff64c Import Action Mailbox 2018-12-25 21:32:35 -05:00