Exim problem

mindspin

Verified User
Joined
Oct 19, 2004
Messages
7
I just a short while ago got a Fedora core 2 server with
DirectAdmin. I got everything setup just fine so far.
What I am having problem with is I setup the root login
code in .bash_profile to email for login of shell, and
I did same for logwatch, root hunter, etc in daily.cron

but noting never gets sent to my pop3 server (off box account)

Any ideas? any one else have a problem like this?
POP3's on the server work just fine, it seems to not
want to send things out from shell.
 
Did you check the Exim log files?
/var/log/exim

Also, have you made an alias for root in /etc/passwd ? This is because Exim won't deliver mails for users in the never_user list and root happens to be in the list for security reasons.

The /etc/passwd is pretty self-explainatory.

Regards,
Ben
 
mindspin said:
I just a short while ago got a Fedora core 2 server with DirectAdmin. I got everything setup just fine so far. What I am having problem with is I setup the root login code in .bash_profile to email for login of shell, and I did same for logwatch, root hunter, etc in daily.cron
What do you mean? I can't follow what you mean about setting email in .bash_profile.
but noting never gets sent to my pop3 server (off box account)
Are you trying to send all mail for the domain to another server? Or are you trying to forward certain user emails to another server? If the former you must make sure that exim doesn't think your domain is local (there are lots of posts on these forums on the subject already). If the latter then I've posted on this issue previously as well.

Jeff
 
anewbie2 said:
Also, have you made an alias for root in /etc/passwd ? This is because Exim won't deliver mails for users in the never_user list and root happens to be in the list for security reasons.

The /etc/passwd is pretty self-explainatory.
Mail aliases do not go in /etc/passwd. I'm not sure why you'd ever want to touch /etc/passwd manually. Messing with it can easily destroy your ability to log in to the server.

Jeff
 
jlasman said:
Mail aliases do not go in /etc/passwd. I'm not sure why you'd ever want to touch /etc/passwd manually. Messing with it can easily destroy your ability to log in to the server.

Jeff

Maybe I misunderstood him but I thought he wants to be alerted when a user logs in the shell and stuff. In this case mails would be sent from the root user, correct?
 
From the root user, sure (if that's what he meant); to the root user... well mail to the root user will not be delivered without an alias.

All that said you still don't put aliases in /etc/passwd.

Putting things into /etc/passwd without being sure of what you're doing could cause major problems, ranging from opening security holes to making your server impossible to log in to.

Jeff
 
Re: Re: Exim problem

Originally posted by jlasman
What do you mean? I can't follow what you mean about setting email in .bash_profile.

In the .bash_profile, I added a code that would
email me on shell login, using a howto I founded.
I've used that same code on other redhat boxs and
know it works, but on this one, it does not email
for shell login.


Are you trying to send all mail for the domain to another server? Or are you trying to forward certain user emails to another server? If the former you must make sure that exim doesn't think your domain is local (there are lots of posts on these forums on the subject already). If the latter then I've posted on this issue previously as well.
Jeff

What I am trying to do is get root emails to send to
an off server address, because not only shell logins, but
logwatch, rootkit hunter, etc send daily reports and right
now, they are not sending anything.
 
I setup a .forward file in /root/ for root emails
but it seems it is not working so far.

I did check logs, but it is not showing me anything I
can see as a problem.
 
jlasman said:
From the root user, sure (if that's what he meant); to the root user... well mail to the root user will not be delivered without an alias.

All that said you still don't put aliases in /etc/passwd.

Putting things into /etc/passwd without being sure of what you're doing could cause major problems, ranging from opening security holes to making your server impossible to log in to.

Jeff

OOOPS, I'm sorry. What I meant was /etc/aliases, not /etc/passwd.

I truly apologize for that. I'll be more carefully next time I post.:o
 
mindspin said:
I setup a .forward file in /root/ for root emails
but it seems it is not working so far.
We create a file:

/etc/virtual/host.example.com/aliases

where host.example.com is replaced by your hostname

and where /etc/virtual/host.example.com is owned by mail:mail, and permissions are 711

and where /etc/virtual/host.example.com/aliases is owned by mail:mail, and permissions are 600.

and the contents of the file is:
abuse: admin
hostmaster: admin
postmaster: admin
webmaster: admin
root: admin
bin: admin
daemon: admin
nobody: admin
ftp: admin
operator: admin
uucp: admin
admin: [email protected]
where [email protected] is replaced by the email address you want to use.
The /etc/aliases file may work as well.

Jeff
 
Re: Re: Exim problem

jlasman said:
What do you mean? I can't follow what you mean about setting email in .bash_profile.

Are you trying to send all mail for the domain to another server? Or are you trying to forward certain user emails to another server? If the former you must make sure that exim doesn't think your domain is local (there are lots of posts on these forums on the subject already). If the latter then I've posted on this issue previously as well.

Jeff

Mindspin probably meant .bashrc instead of .bash_profile.
 
Jeff, after creating this file, while it is sending me bounces
which are shell logins, I get

Unrouteable address as error message, with
the login message that was being sent.

So what might cause it to be Unrouteable address?
If I had too, this would work I guess, since it is
bouncing the messages back to me on shell login, but
would perfer it fixed :)

in .bash_profile, I see

PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"

maybe if I change "root" to "addy@domain" think
that might help? right now it still trys to send to
[email protected] and it bounces msgs back
to me at the place it should send without bounce notice.



jlasman said:
We create a file:
/etc/virtual/host.example.com/aliases
Jeff
 
I try hard not to guess, and I'm still not sure what you're trying to do.

If you can explain in great detail exactly what it is you're trying to do perhaps I can duplicate the issue here and give you a reasonable response, as time permits.

Jeff
 
Hey,

I may not be understanding the problems you're seeing but...

There was a problem with the DA's exim.pl a while back that was causing some issues.

It had to do with root and aliases... Make sure you are using the latest exim.pl file.

John (DA John) posted this in another thread:

Code:
wget -O /etc/exim.pl [url]http://files.directadmin.com/services/exim.pl[/url]
chmod 755 /etc/exim.pl
service exim restart

The other thing we did along those lines was to create a symlink in this directory:

/etc/virtual/your_server_host_name

back to /etc/aliases.

I haven't gone back to troubleshoot to see if that is really necessary, so I can't say for sure... But, the /etc/aliases is where we define our aliases...(for the server)

David
 
many thanks skruf

i've been having the same problem for my new server, and it's solved by getting the new exim.pl file.

thanks! :D
 
Back
Top