ssmtp error on trying to send emails

Oscar Vazquez asked:

I’m trying to send emails from command line because I need to create a shell script later to send an email.

this is my configuration:

# Config file for sSMTP sendmail
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
 [email protected]

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named
[email protected]
[email protected]

# Where will the mail seem to come from?

# The full hostname

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address

When I run :

ssmtp [email protected]

and add the email

To:[email protected]
From:[email protected]
Subject:This is an sSMTP from LINUX!
I am testing sSMTP.

I get the following error:

ssmtp: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:0A00AC80, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:BC1C0000, 1.36674:0E000000, 1.61250:00000000, 1.45378:C11C0000, 1.44866:E6010000, 16.55847:490E0000, 17.43559:0000000004020000000000000100000000000000, 20.52176:140F6D880000101043050000, 20.50032:140F6D887017000000000000, 0.35180:48050000, 255.23226:0A00B180, 255.27962:0A000000, 255.27962:0E000000, 255.31418:0A00B280, 0.35250:0A000000, 1.36674:32000000, 1.61250:00000000, 1.45378:02000000, 1.44866:01000000, 16.55847:69000000, 17.43559:00000000E8020000000000000800000000000000, 20.52176:140F6D880000101061050000, 20.50032:140F6D887017000003000136, 0.35180:66050000, 255.23226:0A00B780, 255.27962:32000000, 255.17082:DC040000, 0.27745:0A00B880, 4.21921:DC040000, 255.27962:FA000000, 255.1494:0A00B980, 0.38698:0F010480, 0.37692:02000000, 0.37948:0F010480, 5.33852:00000000534D545000324300, 7.36354:010000000000010932324238, 4.56248:DC040000, 7.40748:010000000000010B36343638, 7.57132:000000000000000000000000, 1.63016:32000000, 4.39640:DC040000, 8.45434:ABB7F36F91A190499DCB54E2757EC97A00000000, 5.10786:0000000031352E32302E323135372E3030303A4D57485052323230314D42313432323A33636362643762342D643664342D343939352D623731302D6638633438356465626537380000000000, 255.1750:03000236, 255.31418:A2050000, 0.22753:0A00C280, 255.21817:DC040000, 4.60547:DC040000, 0.21966:0A00C380, 4.30158:DC040000 []

My answer:

This is not a problem with your ssmtp configuration.

The recipient’s email address has been disabled in Office 365. The recipient needs to contact their O365 administrator.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.