我目前收到以下错误:
2019-06-28 14:45:41 no host name found for IP address 192.168.X.X
2019-06-28 14:45:41 H=(cabc5b9f0d80) [192.168.X.X] F=<[email protected]> rejected RCPT <[email protected]>: relay not permitted
我的update-exim4.conf.conf看起来如下:
dc_eximconfig_configtype='smarthost'
dc_other_hostnames='example.com; localhost.localdomain; localhost'
dc_local_interfaces='127.0.0.1 ; ::1'
dc_readhost='example.com'
dc_relay_domains='*'
dc_minimaldns='false'
dc_relay_nets='smtpserver.url'
dc_smarthost='example.com'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'
[当我运行echo "Subject: sendmail test" | sendmail -v [email protected]
时,我收到一封电子邮件,使我相信配置很好,但是,当我尝试通过托管在同一台服务器上的django应用发送电子邮件时,出现上述错误。我的应用程序配置如下:
EMAIL_HOST = "example.com"
EMAIL_PORT = 25
EMAIL_NAME = "exmaple"
EMAIL_ALIAS = "[email protected]"
EMAIL_HOST_USER = ""
EMAIL_HOST_PASSWORD = ""
EMAIL_USE_TLS = False
EMAIL_BATCH_SIZE = 50
EMAIL_BATCH_PAUSE = 300
应用程序日志中的错误如下:
Task scheduler.tasks.workflow_send_email[740b2e55-896e-4a75-9e19-4fa5562783e2] raised unexpected: SMTPRecipientsRefused({'[email protected]': (550, b'relay not permitted')},)
...
smtplib.SMTPRecipientsRefused: {'[email protected]': (550, b'relay not permitted')}
我的应用程序也正被docker化!
我的django应用程序中有相同的错误。它也可以在docker容器中运行。您解决了这个问题吗?请分享您的解决方案吗?
感谢和问候,法比安