cron question

Thomas Stivers stivers_t at tomass.dyndns.org
Sun Sep 5 01:21:03 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Sep 04 2004 at 10:11:09PM -0400, Scott Howell wrote:
> Folks,
> 
> I've setup a cron job for my wife that polls for her mail. The problem 
> is that cron sends her a message everytime fetchmail is run. I have a 
> similar setup, but I don't get these messages unless something is wrong 
> with my setup, but doesn't appear to be the case. She is getting mail, 
> but just tuns of these messages from Cron.
> I know there is a way to stop these messages bening sent to her, but I 
> can't think of what that is. Has anyone a suggestion?

One suggestion is to redirect the stdout and stderr of your call to
fetchmail in the crontab to /dev/null. Something like

fetchmail 2>&1 >/dev/null

would do the trick.

Another IMHO better suggestion is to have fetchmail run as a daemon
polling for mail at regular intervals. You can set up a /etc/fetchmailrc
to get any mail you need and put it in any user's mailbox. I think that
the Debian version of fetchmail automatically starts as a daemon when
you have a /etc/fetchmailrc. This automatic starting only takes place at
boot time however so you would need to run "/etc/init.d/fetchmail start"
and you should be set. The fetchmail man page has all the details on
fetchmailrc files and they are pretty easy to set up.

HTH

- -- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

Thomas Stivers	e-mail: stivers_t at tomass.dyndns.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBOqI/5JK61UXLur0RAqbKAJsHnR/o0B5kWW/TLVDQ/l0r0AX7IACfYeI4
XA5xz75JuSLMA7MKzpXAhRE=
=TmS1
-----END PGP SIGNATURE-----




More information about the Speakup mailing list