我收到这个错误:
raise SMTPRecipientsRefused(senderrs) smtplib.SMTPRecipientsRefused:
{‘[email protected]’: (550, ‘5.1.1 : Recipient
address rejected: hotmail.com’)}
当我试图运行我的python脚本时.
无论我输入什么收件人地址,它仍然会给我同样的错误.我将postfix的配置安装为本地,它正确识别’localhost’但不识别任何发件人地址.这是我的代码:
import smtplib
def sendEmail(addressFrom, addressTo, msg):
server = smtplib.SMTP('localhost')
server.set_debuglevel(1)
server.sendmail(addressFrom, addressTo, msg)
server.quit()
msg = "This is the content of the email"
addressFrom = ""
addressTo = "[email protected]"
sendEmail(addressFrom, addressTo, msg)
这是postfix的main.cf文件.现在看一下,mydestination只设置为本地地址,这可能是问题吗?
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specif