tpitale / mail_room

Forward mail from gmail IMAP to a callback URL or job worker, simply.
MIT License
195 stars 51 forks source link

Add docs/support for ActionMailbox #83

Closed tpitale closed 5 years ago

tpitale commented 5 years ago

https://edgeguides.rubyonrails.org/action_mailbox_basics.html#sendgrid (for example)

tpitale commented 5 years ago

Possible to use the Mailgun ingress? https://edgeguides.rubyonrails.org/action_mailbox_basics.html#mailgun

tpitale commented 5 years ago

Check out ingress here: https://github.com/rails/rails/tree/master/actionmailbox. Appears to be any valid rfc822 message if we use the relay controller. Auth for relay (exim/qmail/postfix) is basic auth with username actionmailbox and password configured as per docs.

tpitale commented 5 years ago

From rails docs, we only have to do the first 2 steps:

  # 1. Tell Action Mailbox to accept emails from an SMTP relay:
  #
  #        # config/environments/production.rb
  #        config.action_mailbox.ingress = :relay
  #
  # 2. Generate a strong password that Action Mailbox can use to authenticate requests to the ingress.
  #
  #    Use <tt>rails credentials:edit</tt> to add the password to your application's encrypted credentials under
  #    +action_mailbox.ingress_password+, where Action Mailbox will automatically find it:
  #
  #        action_mailbox:
  #          ingress_password: ...
  #
  #    Alternatively, provide the password in the +RAILS_INBOUND_EMAIL_PASSWORD+ environment variable.
eknowlton commented 5 years ago

I was following this issue to see if we could use it with ActionMailbox for IMAP accounts.

I hope it ends up being implemented. Untill then there is https://github.com/kimmelsg/actionmailbox-imap which works with IMAP and ActionMailbox.

tpitale commented 5 years ago

@eknowlton This should be doable, I just haven't had a need. PRs welcome! 😄

tpitale commented 5 years ago

Previously was looking at https://robots.thoughtbot.com/griddler-is-better-than-ever