gpt4 book ai didi

php - Centos sendmail配置失败-用户未知

转载 作者:太空宇宙 更新时间:2023-11-04 05:11:28 24 4
gpt4 key购买 nike

我试图在Centos 7操作系统上安装和配置sendmail。

以下命令测试sendmail是否正常工作将提供以下/ var / log / maillog的输出:

echo 'test' | sendmail office@alexander-pabinger.at


Feb 22 22:53:18 alexander-pabinger sendmail[4901]: starting daemon (8.14.7): SMTP+queueing@01:00:00
Feb 22 22:53:18 alexander-pabinger sm-msp-queue[4912]: starting daemon (8.14.7): queueing@01:00:00
Feb 22 22:53:30 alexander-pabinger sendmail[4918]: x1MLrUAC004918: from=k004403, size=5, class=0, nrcpts=1, msgid=<201902222153.x1MLrUAC004918@alexander-pabinger.at>, relay=root@localhost
Feb 22 22:53:30 alexander-pabinger sendmail[4919]: x1MLrUd9004919: <office@alexander-pabinger.at>... User unknown
Feb 22 22:53:30 alexander-pabinger sendmail[4918]: x1MLrUAC004918: to=office@alexander-pabinger.at, ctladdr=k004403 (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30005, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Feb 22 22:53:30 alexander-pabinger sendmail[4919]: x1MLrUd9004919: from=<k004403@alexander-pabinger.at>, size=5, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Feb 22 22:53:30 alexander-pabinger sendmail[4918]: x1MLrUAC004918: x1MLrUAD004918: DSN: User unknown
Feb 22 22:53:30 alexander-pabinger sendmail[4919]: x1MLrUdB004919: from=<>, size=2090, class=0, nrcpts=1, msgid=<201902222153.x1MLrUAD004918@alexander-pabinger.at>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Feb 22 22:53:30 alexander-pabinger sendmail[4918]: x1MLrUAD004918: to=k004403, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31029, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x1MLrUdB004919 Message accepted for delivery)
Feb 22 22:53:30 alexander-pabinger sendmail[4920]: x1MLrUdB004919: to=<k004403@alexander-pabinger.at>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32311, dsn=2.0.0, stat=Sent


很抱歉,我已经在寻找解决方案3天了,所有提供的建议都无法解决我的问题!

最初,我无法使用服务,现在将其更改为“未知用户”。

我的/etc/mail/sendmail.mc看起来像这样:

include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo/1und1-auth.db')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl


提前致谢

最佳答案

您sendmail将alexander-pabinger.at视为本地电子邮件域(将传递到本地邮箱)。
最有可能的是,它本身并未像您期望的那样“自动配置”。


检查域是否在/etc/mail/local-host-names文件中列出
[这是“手动”列出本地电子邮件域的默认文件]
检查已配置和自动配置的本地电子邮件域
以root身份执行echo '$=w' | sendmail -bt
关闭本地域自动配置
sendmail.mc文件中添加以下行,重新生成sendmail.cf并重新启动/重新加载sendmail守护程序
[您做到了,但是我写给不认真的读者]



  define(`confDONT_PROBE_INTERFACES',`True')dnl



如果它不起作用,则报告由12收集的数据并检查并报告“此主机电子邮件名称”
以root身份执行echo '$j' | sendmail -bt
[解释有一些丑陋的特殊情况]

关于php - Centos sendmail配置失败-用户未知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54836023/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com