* [gentoo-user] vixie-cron and ssmtp
@ 2006-09-14 21:43 David Grant
2006-09-14 22:51 ` Neil Bothwick
0 siblings, 1 reply; 6+ messages in thread
From: David Grant @ 2006-09-14 21:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
Cron is sending out an email for jobs run as user root, but not for cron
jobs run as my normal user? Yet the funny thing is, when cron runs jobs as
normal user, it still actually sends the mail to root (see /etc/crontab).
And on the command line, I see the same thing either way:
Sep 14 14:43:01 sonata cron[16727]: (david) CMD
(/home/david/scripts/encryptPass.pl)
Sep 14 14:43:01 sonata cron[16725]: (root) CMD
(/home/david/scripts/encryptPass.pl)
Sep 14 14:43:02 sonata sSMTP[16728]: Sent mail for
root@smtp.vc.shawcable.net (221 2.3.0 Bye received. Goodbye.)
Sep 14 14:43:02 sonata sSMTP[16729]: Sent mail for
root@smtp.vc.shawcable.net (221 2.3.0 Bye received. Goodbye.)
Can anyone else repeat this behaviour?
--
David Grant
http://www.davidgrant.ca
[-- Attachment #2: Type: text/html, Size: 941 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] vixie-cron and ssmtp
2006-09-14 21:43 [gentoo-user] vixie-cron and ssmtp David Grant
@ 2006-09-14 22:51 ` Neil Bothwick
2006-09-14 23:02 ` David Grant
0 siblings, 1 reply; 6+ messages in thread
From: Neil Bothwick @ 2006-09-14 22:51 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 668 bytes --]
On Thu, 14 Sep 2006 14:43:30 -0700, David Grant wrote:
> Cron is sending out an email for jobs run as user root, but not for cron
> jobs run as my normal user? Yet the funny thing is, when cron runs jobs
> as normal user, it still actually sends the mail to root
> (see /etc/crontab).
You seem to be contradicting yourself here; first you say user cron jobs
don't send mail, then you say they send mail to root. Which is it?
Either way, the solution may be to set MAILTO in your user's crontab.
--
Neil Bothwick
There was a young man from the border
Who had an attention disorder.
When he reached the last line
He would run out of time
And
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] vixie-cron and ssmtp
2006-09-14 22:51 ` Neil Bothwick
@ 2006-09-14 23:02 ` David Grant
2006-09-14 23:16 ` David Grant
0 siblings, 1 reply; 6+ messages in thread
From: David Grant @ 2006-09-14 23:02 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
On 9/14/06, Neil Bothwick <neil@digimed.co.uk> wrote:
>
> On Thu, 14 Sep 2006 14:43:30 -0700, David Grant wrote:
>
> > Cron is sending out an email for jobs run as user root, but not for cron
> > jobs run as my normal user? Yet the funny thing is, when cron runs jobs
> > as normal user, it still actually sends the mail to root
> > (see /etc/crontab).
>
> You seem to be contradicting yourself here; first you say user cron jobs
> don't send mail, then you say they send mail to root. Which is it?
Well I'm not contradicting myself intentionally... I should have been more
clear. I'll do a better job this time:
Cron is trying to send out an email for jobs run as user root to and
succeeding. Cron is also trying to send out an email for jobs run as a
normal user but it seems to fail at this. Both cron jobs (whether run as
user root or normal user) are both trying to send the email to the root
user.
Either way, the solution may be to set MAILTO in your user's crontab.
I could try this, although I as I said it seems like both jobs run as root
and normal user are both being sent to user root (according to the MAILTO)
--
David Grant
http://www.davidgrant.ca
[-- Attachment #2: Type: text/html, Size: 1708 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] vixie-cron and ssmtp
2006-09-14 23:02 ` David Grant
@ 2006-09-14 23:16 ` David Grant
2006-09-15 1:33 ` David Grant
0 siblings, 1 reply; 6+ messages in thread
From: David Grant @ 2006-09-14 23:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]
On 9/14/06, David Grant <davidgrant@gmail.com> wrote:
>
>
>
> On 9/14/06, Neil Bothwick <neil@digimed.co.uk> wrote:
> >
> > On Thu, 14 Sep 2006 14:43:30 -0700, David Grant wrote:
> >
> > > Cron is sending out an email for jobs run as user root, but not for
> > cron
> > > jobs run as my normal user? Yet the funny thing is, when cron runs
> > jobs
> > > as normal user, it still actually sends the mail to root
> > > (see /etc/crontab).
> >
> > You seem to be contradicting yourself here; first you say user cron jobs
> > don't send mail, then you say they send mail to root. Which is it?
>
>
> Well I'm not contradicting myself intentionally... I should have been more
> clear. I'll do a better job this time:
>
> Cron is trying to send out an email for jobs run as user root to and
> succeeding. Cron is also trying to send out an email for jobs run as a
> normal user but it seems to fail at this. Both cron jobs (whether run as
> user root or normal user) are both trying to send the email to the root
> user.
>
> Either way, the solution may be to set MAILTO in your user's crontab.
>
>
> I could try this, although I as I said it seems like both jobs run as root
> and normal user are both being sent to user root (according to the MAILTO)
>
Hmm, it turns out that setting MAILTO=root in my own user's crontab makes it
send mail. MAILTO=root is already in /etc/cron/crontab by the way so this is
all very strange.
--
David Grant
http://www.davidgrant.ca
[-- Attachment #2: Type: text/html, Size: 2406 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] vixie-cron and ssmtp
2006-09-14 23:16 ` David Grant
@ 2006-09-15 1:33 ` David Grant
[not found] ` <d18977190609142247i61232a3ekf11064b9483bb4e5@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: David Grant @ 2006-09-15 1:33 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]
On 9/14/06, David Grant <davidgrant@gmail.com> wrote:
>
>
>
>
> Hmm, it turns out that setting MAILTO=root in my own user's crontab makes
> it send mail. MAILTO=root is already in /etc/cron/crontab by the way so this
> is all very strange.
>
I tried setting MAILTO=david and that didn't work. I decided ssmtp might be
the problem, so I isolated it and tried this:
1. echo test |mail -s "testing ssmtp to external" davidgrant@gmail.com
2. echo test |mail -s "testing ssmtp mail to root" root
3. echo test |mail -s "testing ssmtp mail to david" david
4. echo test |mail -s "testing ssmtp mail to sarah" sarah
1. The first one worked. So ssmtp can send to external addresses fine.
2. The second one worked. So ssmtp can look at the "root=" command (which
tells it where to send mail to user ids < 1000) properly and send to
whatever root= is set to.
3. The third one didn't work. So for some reason I can't send mail to a
normal user. But maybe something is weird with that user. I used to run a
mail server on this machine with that user (postfix/procmail/blah/blah/blah)
so maybe some leftover thing was screwing things up.
4. Sending mail to this user didn't work either. The users in 3. and 4. are
both in /etc/ssmtp/revaliases. User 3 is in the 'mail' group (does that even
matter) and I tried user 4. with and without that user in the revaliases
file.
It looks like maybe ssmtp isn't seeing my revaliases file? Or maybe I'm not
using is properly?
david:someuserNOSPAM@gmail.com:smtp.vc.shawcable.net
sarah:someuserNOSPAM@gmail.com:smtp.vc.shawcable.net
--
David Grant
http://www.davidgrant.ca
[-- Attachment #2: Type: text/html, Size: 2450 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] vixie-cron and ssmtp
[not found] ` <d18977190609142247i61232a3ekf11064b9483bb4e5@mail.gmail.com>
@ 2006-09-16 4:30 ` Troy Curtis Jr
0 siblings, 0 replies; 6+ messages in thread
From: Troy Curtis Jr @ 2006-09-16 4:30 UTC (permalink / raw
To: gentoo-user
On 9/15/06, David Grant <davidgrant@gmail.com> wrote:
> Forget it, I gave up on ssmtp as it is the problem. I've now gone to postfix
> and it is so much easier. Setting up postfix involed 3 simple steps. Setting
> relayhost in /etc/postfix/main.cf and creating .forward files in root and
> normal user directories. ssmtp should be tree-cleaned. It's not even
> maintained upstream and it sucks wind.
>
> David
>
>
> On 9/14/06, David Grant <davidgrant@gmail.com> wrote:
> >
> >
> >
> >
> >
> > On 9/14/06, David Grant < davidgrant@gmail.com > wrote:
> >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hmm, it turns out that setting MAILTO=root in my own user's crontab
> makes it send mail. MAILTO=root is already in /etc/cron/crontab by the way
> so this is all very strange.
> >
> >
> >
> > I tried setting MAILTO=david and that didn't work. I decided ssmtp might
> be the problem, so I isolated it and tried this:
> >
> > 1. echo test |mail -s "testing ssmtp to external" davidgrant@gmail.com
> > 2. echo test |mail -s "testing ssmtp mail to root" root
> > 3. echo test |mail -s "testing ssmtp mail to david" david
> > 4. echo test |mail -s "testing ssmtp mail to sarah" sarah
> >
> > 1. The first one worked. So ssmtp can send to external addresses fine.
> >
> > 2. The second one worked. So ssmtp can look at the "root=" command (which
> tells it where to send mail to user ids < 1000) properly and send to
> whatever root= is set to.
> >
> > 3. The third one didn't work. So for some reason I can't send mail to a
> normal user. But maybe something is weird with that user. I used to run a
> mail server on this machine with that user
> (postfix/procmail/blah/blah/blah) so maybe some leftover
> thing was screwing things up.
> >
> > 4. Sending mail to this user didn't work either. The users in 3. and 4.
> are both in /etc/ssmtp/revaliases. User 3 is in the 'mail' group (does that
> even matter) and I tried user 4. with and without that user in the
> revaliases file.
> >
> > It looks like maybe ssmtp isn't seeing my revaliases file? Or maybe I'm
> not using is properly?
> >
> > david:someuserNOSPAM@gmail.com:smtp.vc.shawcable.net
> > sarah:someuserNOSPAM@gmail.com :smtp.vc.shawcable.net
> >
> >
> >
> > --
> > David Grant
> > http://www.davidgrant.ca
>
>
>
> --
> David Grant
> http://www.davidgrant.ca
I totally agree. I have never even been able to get it to compile
cleanly. It was the first failed emerge that I had to troubleshoot
when I started using Gentoo. Later, it prompted me to drop to good
'ol CLI install when I was doing the 2006.0 install. Postfix has
always been good to me. I am glad to see that someone else is as fed
up with it as I am, why is it still around??
Troy
--
"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-09-16 4:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-14 21:43 [gentoo-user] vixie-cron and ssmtp David Grant
2006-09-14 22:51 ` Neil Bothwick
2006-09-14 23:02 ` David Grant
2006-09-14 23:16 ` David Grant
2006-09-15 1:33 ` David Grant
[not found] ` <d18977190609142247i61232a3ekf11064b9483bb4e5@mail.gmail.com>
2006-09-16 4:30 ` Troy Curtis Jr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox