0

We're using successfully iRedMail in 4 email servers (8 domains) for our own email accounts.

We develop web apps based on RoR. We would like to know what is the iRedMail configuration for sending to users, via rails and devise gem, https://github.com/plataformatec/devise, the password reminds, emails confirmations, etc.. What is the difference between address and domain? How to test?

After Googling and posting in iRedMail forum unsuccessful, we only find smt gmail config, please find below.

Thanks in advance!

==== DEVISE config/environments/development.rb ====

SMTP GMAIL CONFIG:

config.action_mailer.raise_delivery_errors = true

config.action_mailer.delivery_method = :smtp

config.action_mailer.perform_deliveries = true

config.action_mailer.default_url_options = { :host => 'localhost:3000' }

config.action_mailer.smtp_settings = {

:address => "smtp.gmail.com",

:port => 587,

:domain => "mail.google.com",

:user_name => "my@gmail.com",

:password => "mypassword",

:authentication => :plain,

:enable_starttls_auto => true

}

==== BACK-END ====

  1. iRedMail 0.9.7 MARIADB edition.
  2. Debian GNU/Linux 9 (stretch) in a fresh OVZ-6GB
  3. Mysql/MariaDB w/adminer
  4. Apache/2.4.25 (Debian)
  5. PHP 7.0.19-1
  6. Ruby 2.5.0, Rails 5.1.5 and Phusion Passenger 5.2.1
  7. No errors: /var/log/iredapd/iredapd.log

=============================

1 Answers1

0

Editing DEVISE config/environments/development.rb

config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.smtp_settings = {
:address => "mx.coopeu.com",
:port => 587,
:domain => "mx.cooopeu.com",
:user_name => "coopeu@coopeu.com",
:password => "password",
:authentication => :plain,
:enable_starttls_auto => true
}

Also raising error: Net::SMTPFatalError in ConfirmationsController#create

554 5.7.1 : Recipient address rejected: Sender is not same as SMTP authenticate username


It means you use user "coopeu@coopeu.com" for SMTP authentication, but specify user "someone-else@somedomain.com" as the sender address. If you need to allow the sender address mismatch for this smtp user, you can add one setting in /opt/iredapd/settings.py to allow it, like below: ALLOWED_LOGIN_MISMATCH_SENDERS = ['coopeu@coopeu.com']

Restarting iredapd after modified "settings.py".


and it's working right