1829596 Members
1995 Online
109992 Solutions
New Discussion

email is not forwarding

 
Jeff Hoevenaar
Frequent Advisor

email is not forwarding

I have a .forward configured for the root user but it does not seem to work. I can send mail directly to an external account but when I issue the command "sendmail -v root" it ignores the .forward and sends it to root.

It is being relayed to our relay server but it is sending it to the address root@server.name.

I have this working on my other linux servers but this one is a vendor configured OS. What is missing to allow forwarding?

OS=ReHat ES3update4

Thanks.
7 REPLIES 7
Sung Oh
Respected Contributor

Re: email is not forwarding

Hi Jeff,

Have you check the file Permission for /root/.forward?

Regards,
Sung
Jeff Hoevenaar
Frequent Advisor

Re: email is not forwarding

Yep, file permissions are ok.
Vitaly Karasik_1
Honored Contributor

Re: email is not forwarding

-what do you see in /var/log/maillog?


- and I agree with previous post - you should re-check /root/.forward permission - it shouldn't be writable for group/other.
Kasper Haitsma
Trusted Contributor

Re: email is not forwarding

Jeff, can you tell a little more?

when you send directly, as what unix user? root, or a "regular" user?

where is the .forward file, in the / dir, or in the $HOME of user root (on RH AFAIK this would be /root)

again, the properties should be 400 [or 600] (-r-------- or -rw------- (chmod(1)))

root is a special user with regards to email. default it is not masqueraded. is that what you mean with "root@server.name." or is it a literal

you might also check the aliases file (/etc/aliases or /etc/mail/aliases), and check if mail for root is re-directed elsewhere, before it would be delivered locally (i.e. the .forward file would have any effect)

HTH
It depends
Bill Thorsteinson
Honored Contributor

Re: email is not forwarding

check MAILDIR for root. Normally mail
for root should be aliased to another user.
If MAILDIR is set correctly root can read
this mail. In this case .forward in the
root home directory will not work.

Try running tail -f on your mail log when
you send a message to root. It should
show the message arriving, and where and
how it was delivered.

.forward must be not be group or world
writeable. If any directory on the path
is world writable .forward will be ignored.
Depending on the version group writeable
directories on the path will also cause
.forward to be ignored.
Jeff Hoevenaar
Frequent Advisor

Re: email is not forwarding

Everything seems ok. My other 20 servers seem to work without problems. It is like the .forward is just being ignored. No errors or anything. It is being relayed to our relay server.

ll -a /root/.forward
-r-------- 1 root root 32 Jun 7 13:09 /root/.forward


sendmail -v root
this is a test email
.
root... Connecting to [127.0.0.1] via relay...
220 m1000030.health-partners.org ESMTP Sendmail 8.12.11/8.12.11; Wed, 7 Jun 2006 13:14:19 -0400
>>> EHLO m1000030.health-partners.org
250-m1000030.health-partners.org Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI
250-DELIVERBY
250 HELP
>>> MAIL From: SIZE=21 AUTH=hoev178@m1000030.health-partners.org
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 k57HEJ1m006919 Message accepted for delivery
root... Sent (k57HEJ1m006919 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 m1000030.health-partners.org closing connection


/var/log/maillog
Jun 7 13:14:19 m1000030 sendmail[6917]: k57HEC8t006917: from=hoev178, size=21, class=0, nrcpts=1, msgid=<200606071714.k57HEC8t006917@m1000030.health-partners.org>, relay=root@localhost
Jun 7 13:14:19 m1000030 sendmail[6919]: k57HEJ1m006919: from=, size=340, class=0, nrcpts=1, msgid=<200606071714.k57HEC8t006917@m1000030.health-partners.org>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jun 7 13:14:19 m1000030 sendmail[6917]: k57HEC8t006917: to=root, ctladdr=hoev178 (17004/112), delay=00:00:07, xdelay=00:00:00, mailer=relay, pri=30021, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k57HEJ1m006919 Message accepted for delivery)
Jun 7 13:14:23 m1000030 sendmail[6921]: k57HEJ1m006919: to=, delay=00:00:04, xdelay=00:00:04, mailer=relay, pri=30340, relay=chpsametime.health-partners.org. [10.233.1.156], dsn=2.0.0, stat=Sent (Message accepted for delivery)


Vitaly Karasik_1
Honored Contributor

Re: email is not forwarding

chpsametime.health-partners.org is you smartrelay host? can you check its logs?