Postfix error while sending through MS Office 365

The error message says:

Client was not authenticated to send anonymous mail during MAIL FROM

This means that the receiving mail host (office365) does not allow the "Mail From" address to use the relay server. Check first that the SASL username and password is correct.
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password Check the other requirements stated in

https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4

  • Username/email address and password Enter the sign in credentials of the hosted mailbox being used For
  • Authentication: You must be able to configure a user name and password to send email on the device.
  • Mailbox: You must have a licensed Office 365 mailbox to send email from.