Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a couple of CentOS 5.3 systems and I have the same problem on all of those systems. When I send an email to 'root' (without specifying a domain) the email is rejected by the email provider. The funny thing is that the email I get back from my mail system is sent to effectively the same user and that email I do get.

This makes that both emails from my cron and asterisk are first rejected and then I get them as an attachment in the mail from my mailerdeamon.

As far as I can tell this is because of the 'From' that is classified as 'Does not exist'. I do not understand how the 'firewall.basjes.nl' hostname (= the system hooked to my cable modem) gets into the email verification.

My question is: What generic setting must I change to make this work for all programms (not just cron and asterisk) in one go?

I've placed as much relevant info below.

(I replaced all @ with #$# to avoid additional spam)

Notes:

  • My ISP is Ziggo and must relay via their outgoging smtp relay.
  • My mail is hosted via google apps.
  • I have a local /root/.forward that contains LogFilesHobby#$#basjes.nl

Command to create this email:

# mail -s TEST root
asdfasdfa

.
Cc:

Relevant section of /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 reply email I received:

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
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I found the real cause of the problem.

This setting makes all users to be mapped to the domain I specified with

MASQUERADE_AS(`basjes.nl')dnl

EXCEPT the ones specified with

EXPOSED_USER(`root')dnl

Because all cron jobs and such run under root they all retain the full hostname en run into the checks at the email provider. They probably have these checks to reduce the spam load.

Solution: Remove the EXPOSED_USER(`root')dnl

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.