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 am currently using Debian Squeeze 6.0. The administrator of my work place receives every week messages from several processes of my system:

  • cron
  • smartd
  • ...

The messages are send to root@workdomain.com. I suspect that the mail should be send to root@localhost or something, but I think some redirection is done somewhere.

Thanks

EDIT:

echo "test" | mail root -s "this is a test"

cat /var/log/mail.log
Apr 30 14:23:38 yavapai nullmailer[3020]: Trigger pulled.
Apr 30 14:23:38 yavapai nullmailer[3020]: Rescanning queue.
Apr 30 14:23:38 yavapai nullmailer[3020]: Starting delivery: protocol: smtp host: mail.domain.fr file: 1241094218.13394
Apr 30 14:23:39 yavapai nullmailer[13395]: smtp: Succeeded: 250 2.0.0 n3UCNdZq025564 Message accepted for delivery
Apr 30 14:23:39 yavapai nullmailer[3020]: Sent file.
Apr 30 14:23:39 yavapai nullmailer[3020]: Delivery complete, 0 message(s) remain.
Apr 30 14:23:39 yavapai nullmailer[3020]: Trigger pulled.
Apr 30 14:23:39 yavapai nullmailer[3020]: Rescanning queue.
share|improve this question
add comment

3 Answers

Check /etc/aliases, look for the line

root: root@workdomain.com

edit: as a test, try this

echo "test" | mail root -s "this is a test"

then check /var/log/maillog, and the headers when it is received on your admins machine

share|improve this answer
add comment

I imagine that Dave is right and your issue is with /etc/aliases, but FWIW, you can set cron output to go to a specific address by putting a MAILTO line at the top. Run crontab -e and add something like MAILTO=jdoe@example.com as the first line. Note that this will go through the regular email system you have installed, which presumably includes any /etc/aliases changes.

share|improve this answer
    
I don't think those are coming for cron jobs as those look like the standard emails you get from a default install (logwatch, pflogsumm, etc). –  Dave Cheney Apr 30 '09 at 11:32
    
The problem seems to be general. I would prefer a global solution. I already fixed the problem for smartd and cron, changing the mail adress root to jdoe@tt.com. –  Jérôme Apr 30 '09 at 12:26
add comment

Did you set your hostname correctly?

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.