当hostname.domain.nl位于“From:”电子邮件地址中时,电子邮件被拒绝

我有几个CentOS 5.3系统,我在所有这些系统上都有同样的问题。 当我发送电子邮件到“根”(没有指定域名)时,电子邮件被电子邮件提供商拒绝。 有趣的是,我从邮件系统中得到的电子邮件被有效地发送给同一个用户,而且我得到的电子邮件。

这使得从我的cron和星号这两个电子邮件都被拒绝,然后我把它们作为邮件从我的邮件窃取附件。

据我所知,这是因为被归类为“不存在”的“发件人”。 我不明白'firewall.basjes.nl'主机名(=连接到我的电缆调制解调器的系统)如何进入电子邮件validation。

我的问题是:为了使所有程序(不仅仅是cron和星号)一起工作,必须改变什么样的通用设置?

我已经在下面放置了相关的信息。

(我用#$#replace了所有的@以避免额外的垃圾邮件)

笔记:

  • 我的互联网服务提供商是Ziggo,必须通过他们的超越smtp中继继电器。
  • 我的邮件通过谷歌应用程序托pipe。
  • 我有一个包含LogFilesHobby#$#basjes.nl的本地/root/.forward

创build此电子邮件的命令:

# mail -s TEST root asdfasdfa . Cc: 

/ var / log / maillog的相关部分

 Jun 22 09:54:51 hobby sendmail[3055]: n5M7sooT003055: from=root, size=35, class=0, nrcpts=1, msgid=<200906220754.n5M7sooT003055#$#hobby.basjes.nl>, relay=root#$#localhost Jun 22 09:54:51 hobby sendmail[3056]: n5M7spZh003056: from=<root#$#hobby.basjes.nl>, size=317, class=0, nrcpts=1, msgid=<200906220754.n5M7sooT003055#$#hobby.basjes.nl>, proto=ESMTP, daemon=MTA, relay=hobby.basjes.nl [127.0.0.1] Jun 22 09:54:51 hobby sendmail[3055]: n5M7sooT003055: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30035, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n5M7spZh003056 Message accepted for delivery) Jun 22 09:54:54 hobby sendmail[3057]: n5M7spZh003056: to=LogFilesHobby#$#basjes.nl, ctladdr=<root#$#hobby.basjes.nl> (0/0), delay=00:00:03, xdelay=00:00:03, mailer=relay, pri=30530, relay=smtp.ziggo.nl [212.54.34.9], dsn=5.0.0, stat=Service unavailable Jun 22 09:54:54 hobby sendmail[3057]: n5M7spZh003056: n5M7ssZh003057: DSN: Service unavailable Jun 22 09:54:54 hobby sendmail[3057]: n5M7ssZh003057: to=LogFilesHobby#$#basjes.nl, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31554, relay=smtp.ziggo.nl, dsn=2.0.0, stat=Sent (OK id=1MIeMf-0002Z6-UP) 

我收到的回复邮件:

 The original message was received at Mon, 22 Jun 2009 09:54:51 +0200 from hobby.basjes.nl [127.0.0.1] ----- The following addresses had permanent fatal errors ----- LogFilesHobby#$#basjes.nl (reason: 550-Verification failed for <root#$#firewall.basjes.nl>) (expanded from: <root#$#hobby.basjes.nl>) ----- Transcript of session follows ----- ... while talking to smtp.ziggo.nl: >>> MAIL From:<root#$#hobby.basjes.nl> SIZE=530 <<< 550-Verification failed for <root#$#firewall.basjes.nl> <<< 550-Called: 209.85.219.47 <<< 550-Sent: RCPT TO:<root#$#firewall.basjes.nl> <<< 550-Response: 550-5.1.1 The email account that you tried to reach does not exist. Please try <<< 550-550-5.1.1 double-checking the recipient's email address for typos or <<< 550-550-5.1.1 unnecessary spaces. Learn more at <<< 550-550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 27si11493246ewy.99 <<< 550 B002 Sender e-mail address invalid / Afzender e-mail adres bestaat niet 554 5.0.0 Service unavailable Final-Recipient: RFC822; root#$#hobby.basjes.nl X-Actual-Recipient: RFC822; LogFilesHobby#$#basjes.nl Action: failed Status: 5.0.0 Diagnostic-Code: SMTP; 550-Verification failed for <root#$#firewall.basjes.nl> Last-Attempt-Date: Mon, 22 Jun 2009 09:54:54 +0200 ---------- Doorgestuurd bericht ---------- From: root <root#$#hobby.basjes.nl> To: root#$#hobby.basjes.nl Date: Mon, 22 Jun 2009 09:54:50 +0200 Subject: TEST asdfasdfa 

[root @ hobby / etc / mail]#cat sendmail.mc | grep -v'^ dnl'

 divert(-1)dnl include(`/usr/share/sendmail-cf/m4/cf.m4')dnl VERSIONID(`setup for linux')dnl OSTYPE(`linux')dnl define(`SMART_HOST', `smtp.ziggo.nl')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 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 MASQUERADE_AS(`basjes.nl')dnl FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl MASQUERADE_DOMAIN(localhost)dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl MAILER(smtp)dnl MAILER(procmail)dnl 

我find了问题的真正原因。

此设置使所有用户都映射到我指定的域

 MASQUERADE_AS(`basjes.nl')dnl 

除了指定的

 EXPOSED_USER(`root')dnl 

因为所有的cron作业都是以root身份运行的,所有cron作业都保留了完整的主机名,并且运行在电子邮件提供程序的检查中。 他们可能有这些检查,以减less垃圾邮件的负载。

解决scheme:删除EXPOSED_USER(`root')dnl