After some search on google I can't find a solution to my pb.
Explanation : I have sevaral servers on which several users use crontab jobs. On these servers, there are postfix installed and configured only to send email (no local mailbox).
On almost all these server, there is failed cronjob, which generate a mail from cron (postfix) to the local user to say "your job don't work".....
So on my system the deferred mailqueu grow and grow.....
I know that MAILTO is not supported in solaris ( pipe mail instead).
As there is a lot of crontab and user, it should be very great if I can avoid to edit all the crontab
My wish should be to find a way to tell crontab that any mail like this have to be send to a specific mail address (existing address).
Is it a magic way to do this?
Another thing : I have a test server, which have normally exactly the same configuration than the previous mentionned servers (I use puppet).
So I tried to generate the same pb on my test server (add a cronjob which will not work = execute a script which don't exist), and I expected to see a lot of mail in the deferred or deffer folder of my queue_directory of postfix (or in "mailq").
But I see nothing, no mail seems to be send. The only thing : I can see this in /var/cron/log:
/etc/mail/sendmail.cf: line 0: cannot open: No such file or directory
I precise that I don't have sendmail installed (svcs -a | grep mail or ps -edf | grep mail show nothing).
This file /etc/mail/sendmail.cf doesn't exist neither on my test server or in my production servers.
I itred to create a empty etc/mail/sendmail.cf, but now in the log I can see :
No local mailer defined
QueueDirectory (Q) option must be set
So it seems that on one server cron try to use sendmail, and on the other he uses postfix (as I can see the mailqueue grow).
So 2 questions :
- is it a way to configure crontab to send all his email to a single email address?
- why my other system try to use /etc/mail/sendmail.cf and how to tell him to use postfix instead?
Thx a lot for you help
Edited by: 823507 on 20 sept. 2012 07:49