Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
DSN:服务不可用sendmail linux_Linux_Email_Smtp_Sendmail - Fatal编程技术网

DSN:服务不可用sendmail linux

DSN:服务不可用sendmail linux,linux,email,smtp,sendmail,Linux,Email,Smtp,Sendmail,我刚刚在linux操作系统上安装了sendmail 我似乎无法接收电子邮件,这是我在日志中看到的: Aug 10 14:12:10 localhost sendmail[13316]: v7A9CAPC013316: from=root, size=238, class=0, nrcpts=1, msgid=<201708100912.v7A9CAPC013316@localhost.test>, relay=root@localhost Aug 10 14:12:10 lo

我刚刚在linux操作系统上安装了
sendmail

我似乎无法接收电子邮件,这是我在日志中看到的:

    Aug 10 14:12:10 localhost sendmail[13316]: v7A9CAPC013316: from=root, size=238, class=0, nrcpts=1, msgid=<201708100912.v7A9CAPC013316@localhost.test>, relay=root@localhost
Aug 10 14:12:10 localhost sendmail[13317]: v7A9CAwD013317: from=<root@localhost.test>, size=484, class=0, nrcpts=1, msgid=<201708100912.v7A9CAPC013316@localhost.test>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Aug 10 14:12:10 localhost sendmail[13316]: v7A9CAPC013316: to=sandeelo.danyal@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30238, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (v7A9CAwD013317 Message accepted for delivery)
Aug 10 14:12:12 localhost sendmail[13319]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Aug 10 14:12:13 localhost sendmail[13319]: v7A9CAwD013317: to=<sandeelo.danyal@gmail.com>, ctladdr=<root@localhost.test> (0/0), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120484, relay=gmail-smtp-in.l.google.com. [74.125.133.26], dsn=5.0.0, stat=Service unavailable
Aug 10 14:12:13 localhost sendmail[13319]: v7A9CAwD013317: v7A9CDwD013319: DSN: Service unavailable
Aug 10 14:12:13 localhost sendmail[13319]: v7A9CDwD013319: to=<root@localhost.test>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31714, dsn=2.0.0, stat=Sent
Aug 10 14:12:10 localhost sendmail[13316]:v7A9CAPC013316:from=root,size=238,class=0,nrcpts=1,msgid=,中继=root@localhost
8月10日14:12:10 localhost sendmail[13317]:v7A9CAwD013317:from=,size=484,class=0,nrcpts=1,msgid=,proto=ESMTP,daemon=MTA,relay=localhost[127.0.0.1]
八月十日14:12:10本地主机发送邮件[13316]:v7A9CAPC013316:to=Sandelo。danyal@gmail.com,ctladdr=root(0/0),delay=00:00:00,xdelay=00:00:00,mailer=relay,pri=30238,relay=[127.0.0.1][127.0.0.1],dsn=2.0.0,stat=Sent(v7A9CAwD013317消息接受传递)
8月10日14:12:12 localhost sendmail[13319]:STARTTLS=client,relay=gmail smtp in.l.google.com.,version=TLSv1/SSLv3,verify=FAIL,cipher=ECDHE-RSA-AES128-GCM-SHA256,bit=128/128
8月10日14:12:13本地主机发送邮件[13319]:v7A9CAwD013317:to=,ctladdr=(0/0),延迟=00:00:03,xdelay=00:00:03,mailer=esmtp,pri=120484,relay=gmail-smtp-in.l.google.com。[74.125.133.26],dsn=5.0.0,stat=服务不可用
八月十日14:12:13本地主机发送邮件[13319]:v7A9CAwD013317:v7A9CDwD013319:DSN:服务不可用
8月10日14:12:13本地主机发送邮件[13319]:v7A9CDwD013319:to=,延迟=00:00:00,xdelay=00:00:00,mailer=local,pri=31714,dsn=2.0.0,stat=Sent
  • 修复发件人域名(
    from=
    =>
    localhost.test

    将主机的名称(FQDN)更改为具有有效
    MX
    /
    A
    记录的名称
  • 作为root用户,使用下面的脚本获取SMTP会话的完整副本。
    这会让你更好地了解gmail不喜欢什么
  • 测试脚本(供root用户使用):

    #/垃圾箱/垃圾箱
    到=somebody@gmail.com
    #-i-不处理以“.”开头的特殊行
    #-v-使用详细模式(提供SMTP会话记录)
    #-Am-使用sendmail.cf(不要通过localhost:25发送)-需要root权限
    /usr/sbin/sendmail-i-v-Am--$TO
    
  • 修复发件人域名(
    from=
    =>
    localhost.test

    将主机的名称(FQDN)更改为具有有效
    MX
    /
    A
    记录的名称
  • 作为root用户,使用下面的脚本获取SMTP会话的完整副本。
    这会让你更好地了解gmail不喜欢什么
  • 测试脚本(供root用户使用):

    #/垃圾箱/垃圾箱
    到=somebody@gmail.com
    #-i-不处理以“.”开头的特殊行
    #-v-使用详细模式(提供SMTP会话记录)
    #-Am-使用sendmail.cf(不要通过localhost:25发送)-需要root权限
    
    /usr/sbin/sendmail-i-v-Am--$TO You这个问题似乎适合stackoverflow站点。您的sendmail似乎无法向gmail.com发送/传递邮件。你能包括发信人收到的回退邮件吗?你的问题似乎适合stackoverflow网站。您的sendmail似乎无法向gmail.com发送/传递邮件。你能包括发信人收到的回退邮件吗?在我的例子中,我发现我的用户名有一个输入错误,这是一个非常有用的脚本。配置后,上面的脚本会发送一封电子邮件,但这个脚本不会<代码>回显“主题:发送邮件测试”|发送邮件-vsomebody@gmaill.com
    我最终得到了
    STOREDRV.Submission.Exception:sendasdinedeexception.mapiexceptions sendasdernied;由于永久性异常,无法处理消息。消息无法提交消息。
    有什么想法吗?原因可能是我正在覆盖mian@localhost.localdomain在sendmail中使用适当的电子邮件,该电子邮件在您的脚本中生效,但在我的脚本中无效。这一项工作
    echo“主题:sendmail测试”| sendmail-i-v-Ammianasbat@gmail.com
    。在-i和-Am中有些可疑。在我使用安菲的脚本后,我能够在详细日志中看到我的“DSN:Service unavailable”实际上是“535-5.7.8用户名和密码未被接受”。我的解决方案是允许在我的gmail帐户设置中使用不太安全的应用程序。我通过中继使用smtp.gmail.com。非常感谢你的脚本。在我的例子中,我发现我的用户名有一个拼写错误,这是一个非常有用的脚本。配置后,上面的脚本会发送一封电子邮件,但这个脚本不会<代码>回显“主题:发送邮件测试”|发送邮件-vsomebody@gmaill.com
    我最终得到了
    STOREDRV.Submission.Exception:sendasdinedeexception.mapiexceptions sendasdernied;由于永久性异常,无法处理消息。消息无法提交消息。
    有什么想法吗?原因可能是我正在覆盖mian@localhost.localdomain在sendmail中使用适当的电子邮件,该电子邮件在您的脚本中生效,但在我的脚本中无效。这一项工作
    echo“主题:sendmail测试”| sendmail-i-v-Ammianasbat@gmail.com
    。在-i和-Am中有些可疑。在我使用安菲的脚本后,我能够在详细日志中看到我的“DSN:Service unavailable”实际上是“535-5.7.8用户名和密码未被接受”。我的解决方案是允许在我的gmail帐户设置中使用不太安全的应用程序。我通过中继使用smtp.gmail.com。非常感谢你的剧本。
    #!/bin/sh
    TO=somebody@gmail.com
    
    # -i  - do not treat special lines starting with "."
    # -v  - use verbose mode (provide SMTP session transcript)
    # -Am - use sendmail.cf (do not send via localhost:25) - requires root privileges
    /usr/sbin/sendmail -i -v -Am -- $TO <<END
    Subject: Delivery test
    To: $TO
    
    Delivery test.
    END