Answer the question
In order to leave comments, you need to log in
How to set up iptables to send mail from a rails application?
There is an application written in Ruby on Rails, through which emails are sent when a user registers.
Help, pliz, set up rules for iptables so that these messages are sent and reach the addressee.
Settings in config/environments/production.rb
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
user_name: '[email protected]',
password: 'mypass123',
domain: 'mydomain.ru',
authentication: :plain,
#:openssl_verify_mode => 'none',
enable_starttls_auto: true
}
iptables -P OUTPUT ACCEPT
iptables -P INPUT ACCEPT
iptables -A OUTPUT -p tcp --sport 587 -j ACCEPT
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question