kontron / redmine_oauth

Redmine authentication through OAuth.
GNU General Public License v2.0
61 stars 27 forks source link

Oauth2 for SMTP? #7

Closed DolezalDavid closed 1 year ago

DolezalDavid commented 1 year ago

Hi Karel, I've problem with sending notification via Offce365 SMTP server. Is your plugin also for SMTP authentification (sending) or only for IMAP (downloading)?

David

picman commented 1 year ago

IMAP only. Concerning SMTP, in Azure, we implemented SMTP Relay. There is nothing to be done on the client's side, just change the smart host to the SMTP relay created in the previous step.

DolezalDavid commented 1 year ago

"... in previous step." I don't understand what do you mean with it .. :-( Can you explain me please?

DolezalDavid commented 1 year ago

"... in previous step." I don't understand what do you mean with it .. :-( Can you explain me please?

If I'm correct, SMTP relay send emails only inside the organisation, no outside. That can be problem us... Am I correct?

picman commented 1 year ago

No, SMTP Relay works for external emails too. From the guide: "You can't use direct send (Option 2) because you must send email to external recipients." => Option 3.

So:

  1. Configure SMTP Relay in Azure AD => yourdomain.mail.protection.outlook.com
  2. Configure Redmine to use this smarthost in config/configuration.yml:
    production:
    email_delivery:
     delivery_method: :smtp
     smtp_settings:
       address: yourdomain.mail.protection.outlook.com
       port: 25
DolezalDavid commented 1 year ago

Thank you, Karel. I tested it and it send me back an error. 550 5.7.606 Access denied, banned sending IP. To request removal from this list please visit https://sender.office.com/ and follow the directions.

Do I need to setup in configuration.yml an e-mail or just what you sent in last post?

picman commented 1 year ago

Just what is set in the last post. The sending email address is set in Redmine administration.

Thank you, Karel. I tested it and it send me back an error. 550 5.7.606 Access denied, banned sending IP. To request removal from this list please visit https://sender.office.com/ and follow the directions.

It seems, that IP of your server is on a black list...