Mailinglist Archive: opensuse (1815 mails)

< Previous Next >
Re: [opensuse] mail from cron ?
  • From: Dave Howorth <dhoworth@xxxxxxxxxxxxxxxxx>
  • Date: Tue, 06 Jul 2010 11:43:40 +0100
  • Message-id: <4C3308DC.6060309@xxxxxxxxxxxxxxxxx>
Carlos E. R. wrote:

On 2010-07-06 11:36, Dave Howorth wrote:
Carlos E. R. wrote:
Check the mail log in any case to be sure.
Doh! I don't know why I hadn't already done that (and thanks to Per
for also suggesting it). It makes things a lot more clear! :)

cron is sending mail for every cron run to root, which is being
redirected to dhoworth on the same machine and is delivered to
his/my local mailbox on that machine (which I don't use). I
actually want mail to root redirected to my real mail address, so
I'll need to dig around in the configuration to discover what I did

Just put a forward rule on that user so that mail is forwarded where
you want it. For this to work for outside addresses your machine has
to have postfix correctly configured to be able to send system email
to outside, ie, have a real world name.

I don't fully understand that (I've never played with postscript
directly). But I went into Yast/Network Services/Mail server and there's
a box there that sets the root mail redirection, so I've changed that
from dhoworth to dhoworth@my-fqdn

The machine is able to deliver mail externally. It already does it
properly for 'normal' cronjobs with a MAILTO line. It's just
cron.daily.local that has a problem.

Otherwise, do somekind of cronjob that resends all that email with a
script, placing a realworld "from" in your mail, and configure
postfix appropriately, too.

Or edit the run-crons script, which is easier - till updated.

Yes I've just rediscovered that. Looking at an older machine I see that
that's what I did a few years ago. So I'll probably do that again.

The mail sent for the daily cron jobs includes the output from the
cron.daily.local so at least I've found that. I now just need to
arrange for that output to be produced even when I turn off the
email logging for every cron run.

Notice that there is a difference between mail sent from crun jobs,
and mails sent from those daily, monthly, etc, scripts. These are
sent by the run-cruns scripts instead.

Yes. Irritating, isn't it!

Cheers, Dave
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >