1833755 Members
2993 Online
110063 Solutions
New Discussion

Mail from Cron-Jobs

 
michi79
Frequent Advisor

Mail from Cron-Jobs

Hello,

as you probably know I had troubles to set up sendmail to reach my NT-Box. Now
it works. If a user logs in and mails to
root this message is rerouted to the NT-Box
smtp mail-server. This is solved with an alias root: user@mydomain The result of
the cron jobs however is routed as root@hostname.domain What is different
if the mail is sent from cron ?
regards
L. Wahl
Ludwig Wahl
4 REPLIES 4
Andreas Voss
Honored Contributor

Re: Mail from Cron-Jobs

Hi,

create the file /.forward and put a line with
user@mydomain in it.
This will forward all root (including cron) mail to the specified user mail address.
John Palmer
Honored Contributor

Re: Mail from Cron-Jobs

A test that I have done on an 11.00 server with a similar configuration works ok. An alias called root pointing to someone@somewhere.com is redirected for mail both from users and cron.

What version of HP-UX are you using?
Have you had a look at '/var/adm/syslog/mail.log'? it might give you some clues.
CHRIS_ANORUO
Honored Contributor

Re: Mail from Cron-Jobs

It is either you use .forward in the users home directory or you setup a line in /etc/mail/aliases files as follows:
sysadm: ":include:/usr/local/lib/sysadm.list".
Aliases would read /usr/local/lib/sysadm.list file for the list of address making up the group.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
CHRIS_ANORUO
Honored Contributor

Re: Mail from Cron-Jobs

Read online manual (man aliases) from your unix box
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.