sendmail:缺少 smtp 邮件程序sendmail.mc

sendmail:缺少 smtp 邮件程序sendmail.mc
Unrecognized host name gmail.com.
503 5.0.0 Need RCPT (recipient)

如果我向任何电子邮件 *@gmail.com 发送邮件则出现此错误

如何启用向所有地址发送邮件?

news@ovz1:~$ nslookup gmail.com
Server:         10.100.10.2
Address:        10.100.10.2#53

Non-authoritative answer:
Name:   gmail.com
Address: 173.194.32.182
Name:   gmail.com
Address: 173.194.32.181

root@ovz1:~# echo 3,0 [email protected] | sendmail -d8.20 -bt
_res.options = 812c3, HasWildcardMX = 0
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> canonify           input: x @ gmail . com
Canonify2          input: x < @ gmail . com >
dns_getcanonname(gmail.com, trymx=1)
dns_getcanonname: trying gmail.com. (AAAA)
        YES
dns_getcanonname: gmail.com
Canonify2        returns: x < @ gmail . com . >
canonify         returns: x < @ gmail . com . >
parse              input: x < @ gmail . com . >
Parse0             input: x < @ gmail . com . >
Parse0           returns: x < @ gmail . com . >
Parse1             input: x < @ gmail . com . >
MailerToTriple     input: < > x < @ gmail . com . >
MailerToTriple   returns: x < @ gmail . com . >
Parse1           returns: $# error $@ 5 . 1 . 2 $: "553 Unrecognized host name " gmail . com .
parse            returns: $# error $@ 5 . 1 . 2 $: "553 Unrecognized host name " gmail . com .

答案1

sendmail:缺少 smtp 邮件程序sendmail.mc

您的文件中似乎MAILER(smtp)缺少。Sendmail 想要使用 smtp 发送到 gmail.com,但缺少邮件程序。 [用于生成]sendmail.mc

sendmail.mc/etc/mail/sendmail.cf

缺少的一行sendmail.mc

MAILER(`smtp')

技术细节过度

proto.m4文件:

# deal with other remote names
ifdef(`_MAILER_smtp_',
`R$* < @$* > $*         $#_SMTP_ $@ $2 $: $1 < @ $2 > $3        [email protected]',
`R$* < @$* > $*         $#error $@ 5.1.2 $: "_CODE553 Unrecognized host name " $2')

相关内容