Sylor-huang
Joined
Activity
Hi, I am currently testing and setting up an email service system.
I just need to be able to receive emails , but no need to send email.
my dns
mail.xxx.com
is ping successful, it can get bytes from IP address.My online-server had open port: 443,22, 109,110, 993,995
I used docker to deploy my rails server.
Dockers proxy ports is: 443, 109,110,993,995 and rails server port is 3005
- My
ApplicationMailbox
andcomments_mailbox
like this:
class ApplicationMailbox < ActionMailbox::Base
routing /@xxx.com/i => :comments
routing :all => :comments
end
class CommentsMailbox < ApplicationMailbox
def process
p mail.decoded
rescue => e
p e
end
end
- My nginx configuration is like this:
user xxx;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
}
mail {
server_name mail.xxx.com;
ssl on;
ssl_certificate xxx.pem;
ssl_certificate_key xxx.key;
ssl_session_timeout 5m;
ssl_protocols ...;
ssl_ciphers ....;
ssl_prefer_server_ciphers on;
}
http {
...
}
When I send email from gmail account to ydddd@xxx.com (my custom emails), I can't receive email in production.
I had see this video : https://gorails.com/episodes/action-mailbox-rails-6, but it seems can not help me.
If I just want to receive emails in rails, What should I to do ? Was I need to use third party api such as sendgrid or Mailgun
?
Thanks so much~~