Ad Widget

Collapse

Ayone managed to get email to relay via Office365?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • queeg505
    Junior Member
    • Aug 2020
    • 4

    #1

    Ayone managed to get email to relay via Office365?

    Hi

    Has anyone managed to successfully configure Zabbix to relay email via Office 365? I have tried combinations including using smtp.office365.com , outlook.office365.com and my MX endpoint address ending in mail.protection.outlook.com as will as trying port 25 or 587 and various combos of TLS. Still cant get it to function!

    Anyone got a magic solution?

    Thanks

    Mark
  • queeg505
    Junior Member
    • Aug 2020
    • 4

    #2
    That will be a no then!

    Comment

    • whit3h0rse
      Junior Member
      • Aug 2014
      • 18

      #3
      Zabbix can send an email via Office 365 without problems, check out this guide:
      Learn how to setup Zabbix alerts via Gmail, Office 365, or any mail server! Configure advance Zabbix email notifications & escalations and more!

      Comment

      • BlueBull
        Junior Member
        • Sep 2020
        • 25

        #4
        I have no experience with O365 sending. However I can tell you that for Gmail, google says their SMTP relay is freely usable, however after some digging it appears that this only works when you create an application password and use that in stead of your normal gmail login password as authentication (so, username + generated application-specific password) and I see that Office 365 has something similar, perhaps it's the same as with gmail? You could try it at least

        See: https://support.microsoft.com/en-us/...8-b53953ee1183

        Comment

        • queeg505
          Junior Member
          • Aug 2020
          • 4

          #5
          Originally posted by whit3h0rse
          Zabbix can send an email via Office 365 without problems, check out this guide:
          https://bestmonitoringtools.com/zabb...s-escalations/
          Thanks whit3h0rse the guide helped a lot. One thing that does cause an issue is if the O365 user has multi factor authentication enabled. I havent been able to work out if this is supported in Zabbox so have tested with MFA off for the email user and that works fine.

          Comment

          • BlueBull
            Junior Member
            • Sep 2020
            • 25

            #6
            Originally posted by queeg505

            Thanks whit3h0rse the guide helped a lot. One thing that does cause an issue is if the O365 user has multi factor authentication enabled. I havent been able to work out if this is supported in Zabbox so have tested with MFA off for the email user and that works fine.
            The MFA can be left on (at least with Gmail) if you use an application password in stead of the user password to authenticate with that user account, that is why those application passwords were implemented in Gmail, and I assume it is the same in O365. I have MFA enabled in my account and if I use the generated application password for my services, I can use my mail with a service that does not support MFA as well

            Comment

            • queeg505
              Junior Member
              • Aug 2020
              • 4

              #7
              Originally posted by BlueBull

              The MFA can be left on (at least with Gmail) if you use an application password in stead of the user password to authenticate with that user account, that is why those application passwords were implemented in Gmail, and I assume it is the same in O365. I have MFA enabled in my account and if I use the generated application password for my services, I can use my mail with a service that does not support MFA as well
              BlueBull thanks for that, yes I can confirm that now works with O365 MFA after creating an app password

              Comment

              • Rudlafik
                Senior Member
                • Nov 2018
                • 144

                #8
                Install to ZBX srv https://linuxhowtoguide.blogspot.com...tp-client.html

                PrefixYourCompanyInO365.mail.protection.outlook.co m = definition you find in admin portal your company o365

                write this script.
                chmod +x /usr/lib/zabbix/alertscripts/html_email.sh

                html_email.sh
                e-mail
                export smtpemailfrom=NonExistClientEmailAddress@Yourcompa nyDomain.Prefix
                export zabbixemailto="$1"
                export zabbixsubject="$2"
                export zabbixbody="$3"
                export smtpserver=PrefixYourCompanyInO365.mail.protection .outlook.com
                /usr/local/bin/sendEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zabbixbody -s $smtpserver:25 -o tls=no \-o message-content-type=html
                Attached Files

                Comment

                • BoZi
                  Junior Member
                  • Nov 2022
                  • 1

                  #9
                  Option 1: SMTP AUTH (user / password).
                  MS 365: ...there are no plans to disable Basic Authentication for SMTP AUTH clients at this time.
                  Option 2: Direct send (port 25 without auth).
                  Option 3: Microsoft 365 Connector aka SMTP relay.

                  The traditional SMTP AUTH (user / password) seems to remain in use for a long time. So we can keep using it.
                  If you'd like to configure a local SMTP relay, use the following approaches:

                  - https://aventistech.com/configure-po...ia-office-365/
                  - https://superuser.com/questions/7761...nt365865_77619
                  - https://www.linuxbabe.com/redhat/run...ix-smtp-server
                  - https://serverfault.com/a/712990/460967
                  - https://think.unblog.ch/en/how-to-us...uthentication/
                  - https://techglimpse.com/mailx-comman...erver-example/
                  - https://unix.stackexchange.com/a/700188
                  - https://www.middlewareinventory.com/...ix_mail_server .​

                  Comment

                  Working...