public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Willie Wong <wwong@Princeton.EDU>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] weird cron mail problem
Date: Tue, 6 Jan 2009 11:56:55 -0500	[thread overview]
Message-ID: <20090106165655.GA19012@princeton.edu> (raw)
In-Reply-To: <20090105222841.GA4578@ca.inter.net>

On Mon, Jan 05, 2009 at 05:28:41PM -0500, Penguin Lover Philip Webb squawked:
> 090105 Willie Wong wrote:
> > On Mon, Jan 05, 2009 at 01:04:45PM -0500, Penguin Lover Philip Webb squawked:
> > have you checked your outgoing mail logs
> > to see if cron attempts to send mail when fetchmail is called? 
> 
> Thanks for the suggestion: the last few lines of  /var/log/syslog  are :
> 
>   Jan  5 17:10:01 localhost cron[4753]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
>   Jan  5 17:10:01 localhost cron[4754]: (purslow) CMD (/usr/bin/fetchmail)
>   Jan  5 17:10:11 localhost sSMTP[4765]: Sent mail for root@ca.inter.net (221 smtp-relay1.uniserve.ca closing connection) uid=1000 username=purslow outbytes=1049
>   Jan  5 17:15:01 localhost cron[4908]: (purslow) CMD (/usr/bin/fetchmail)
>   Jan  5 17:15:09 localhost sSMTP[4909]: Sent mail for root@ca.inter.net (221 smtp-relay2.uniserve.ca closing connection) uid=1000 username=purslow outbytes=952

Okay, this suggests that either cron or your mailer is misconfigured.
From the logs, you are running ssmtp. Check the config files for it to
see why mail intended for root@localhost is delivered to
root@ca.inter.net. And check /etc/crontab to see whether the MAILTO
field is set properly to where you want the mail to be delivered. 

Also, I don't know which implementation of cron you are using, but if
your crontab is under <userid>, then usually cron will demand
notification e-mails sent to <userid>... unless, hum, do a 

  ls -l /var/spool/cron/crontabs/

Is your user's crontab owned by root for some reason?

> > Actually, what is your cron recipe anyway? 
> 
>  /var/log/spool/cron/crontabs/<userid>  is :
> 
>   # DO NOT EDIT THIS FILE - edit the master and reinstall.
>   # (/tmp/crontab.XXXXwsshN7 installed on Sun Nov  4 23:46:22 2007)
>   # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
>   */5 * * * * /usr/bin/fetchmail
> 
> I considered trying 'fetchmail -s', but I'm not sure
> how to add a flag in a cron file (perhaps by using a script).

for what it's worth, I have my fetchmail line as 
  /usr/bin/fetchmail > /dev/null
so I only get e-mails when fetchmail writes to stderr (so when there's
an error). 

Writing "fetchmail -s" instead of what you have really shouldn't be a
problem. Why do you think it needs a script? 

> > Also, have you updated either cron or fetchmail recently?
> 
> The problem originated 090104 c0520 ,
> when I edited  ~/.fetchmailrc  to delete the reference to a logfile.
> However, attempts to restore the STATVS QVO ANTE have failed:
> I've restored the previous version of  .fetchmailrc  without success
> & I've remerged Fetchmail, rebooted & then run  fetchmailconf ,
> but the crazy mails continue to appear every  5 min  in my inbox.

Okay, running fetchmail -s (or redirecting fetchmail output to
/dev/null) will probably cure the problem of the deluge. But I still
think you MDA is misconfigured for local mail. 

W
-- 
Q: What's grey and proves the nondenumerability of the Reals? 
A: Cantor's Diagonal Elephant
Sortir en Pantoufles: up 760 days, 15:25



  parent reply	other threads:[~2009-01-06 16:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-05 16:42 [gentoo-user] weird cron mail problem Philip Webb
2009-01-05 17:06 ` Willie Wong
2009-01-05 18:04   ` Philip Webb
2009-01-05 18:18     ` Willie Wong
2009-01-05 22:28       ` Philip Webb
2009-01-06  0:22         ` [gentoo-user] " Harry Putnam
2009-01-06 10:26           ` Philip Webb
2009-01-06 16:56         ` Willie Wong [this message]
2009-01-06 17:05           ` [gentoo-user] " Willie Wong
2009-01-06 18:22           ` Philip Webb
2009-01-06 19:31             ` Willie Wong
2009-01-06 20:36               ` Philip Webb
2009-01-06 21:39                 ` [gentoo-user] " Harry Putnam
2009-01-07 18:20                   ` [gentoo-user] Re: weird cron mail problem: basically solved Philip Webb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090106165655.GA19012@princeton.edu \
    --to=wwong@princeton.edu \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox