From: Philip Webb <purslow@ca.inter.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] weird cron mail problem
Date: Tue, 6 Jan 2009 13:22:28 -0500 [thread overview]
Message-ID: <20090106182228.GE4567@ca.inter.net> (raw)
In-Reply-To: <20090106165655.GA19012@princeton.edu>
090106 Willie Wong wrote:
> 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.
/etc/ssmtp/ssmtp.conf has the lines (the last refers to my ISP):
...
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster
...
# The full hostname
hostname=ca.inter.net
...
It looks as if this combination causes it to send to root@ca.inter.net .
I can't find a man file for ssmtp.conf , only for ssmtp ,
tho' the latter says the former should exist,
so I can't check in any more detail just how the lines above work,
eg what "rewriting" refers to or how the hostname is used.
> And check /etc/crontab to see whether the MAILTO field is set properly
> to where you want the mail to be delivered.
MAILTO=root
this is for system cron jobs, which are run by & for root.
> Also, I don't know which implementation of cron you are using,
> but if your crontab is under <userid>, ...
Yes, with mail that's necessary for security.
> ... then usually cron will demand notification e-mails sent to <userid>:
> Try 'ls -l /var/spool/cron/crontabs/' :
> is your user's crontab owned by root for some reason?
No :
root:550 crontabs> ls -l
-rw------- 1 purslow crontab 234 2007-11-04 23:46 purslow
> I have my fetchmail line as
> /usr/bin/fetchmail > /dev/null
> so I only get e-mails when it writes to stderr (when there's an error).
That looks like the quick fix.
> Writing "fetchmail -s" instead shouldn't be a problem.
> Why do you think it needs a script?
I didn't know if cron will ignore stuff after the space otherwise,
but obviously it does, if your line above works.
> I still think you MTA is misconfigured for local mail.
Like you, I'ld like to understand the real cause of the problem:
Gentoo is for people like us ... (smile)
Rewriting .fetchmailrc using fetchmailconf thro'out didn't help,
so that's one set of possibilities ruled out
& I will try the suggestions above (thanks) next.
Your or others' further comments are very welcome.
--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
next prev parent reply other threads:[~2009-01-06 18:22 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 ` [gentoo-user] " Willie Wong
2009-01-06 17:05 ` Willie Wong
2009-01-06 18:22 ` Philip Webb [this message]
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=20090106182228.GE4567@ca.inter.net \
--to=purslow@ca.inter.net \
--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