尝试发送电子邮件时出现 ssmtp 错误

尝试发送电子邮件时出现 ssmtp 错误

我正在尝试从命令行发送电子邮件,因为我稍后需要创建一个 shell 脚本来发送电子邮件。

这是我的配置:

#
# 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 mail.domain.com
mailhub=smtp.office365.com:587
[email protected]
AuthPass=Welcome@1
UseTLS=YES
UseSTARTTLS=YES

# Where will the mail seem to come from?
rewriteDomain=domain.org

# The full hostname
hostname=VMDevTG.domain.com.mx

# 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
FromLineOverride=YES

当我跑步时:

ssmtp [email protected]

并添加电子邮件

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

我收到以下错误:

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 [Hostname=MWHPR2201MB1422.namprd22.prod.outlook.com]

答案1

这不是您的 ssmtp 配置的问题。

收件人的电子邮件地址已在 Office 365 中禁用。收件人需要联系其 O365 管理员。

相关内容