Unrouteable address?

xgeek

Verified User
Joined
Nov 20, 2004
Messages
20
Hi Guys,

I have an issue and it is driving me mad :)

I have been going through some of the security guides and I am trying to get the send email on root login to work.

I have added this piece of code to 2 accounts:-

Code:
echo 'ALERT - Root Shell Access (mydomain.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" [email][email protected][/email]

The first account is root and I added the code to /root/.bashrc
The 2nd is added to /home/stephen/.bashrc

Now if I ssh in with my stephen account the email gets sent to my offsite gmail account okay, but if I login as root or su - from my stephen account,
the email that is sent by the code in /root/.bashrc gets sent to root with this error "Mail delivery failed: returning message to sender"

Within this message is this:-
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

[email protected]
Unrouteable address

Now my question is this. Why can the route be found when the code is run by the stephen account but not by the root account?

Note:- I have removed my real gmail email address and replaced with [email protected] as an illustration.

Many thanks for any help.

Regards
Stephen
 
Many thanks that fixed it :)

I am a bit suprised though that I had out of date files. This is a new install (less than a week) and it is running DA 1.23.2.

I use YUM to keep non-DA dependant apps up to date, but how do I do that with DA dependent apps like the ones below?

I would have thought DA would update them at the same time as it does a DA update?.

Apache 1.3.33
Exim 4.43
MySQL 4.0.17
Named 9.2.3
ProFTPd 1.2.9
vm-pop3d 1.1.7e

Many thanks
Stephen
 
Back
Top