Re: [gentoo-user] cron and ssmtp

2008-01-22 Thread Neil Bothwick
On Tue, 22 Jan 2008 07:36:46 -0800, Michael Higgins wrote:

 Is anyone using cron (vixie-cron) without a real MTA and getting
 emails? The test is simple, just echo hello world. I expect this
 to come as an email to the address I put in MAILTO=. But it doesn't.

It works on several boxes here. Is ssmtp working correctly? Try

echo -e To: Me\nSubject: ssmtp test\n\nssmtp test | /usr/sbin/ssmtp 
youraddress 

If it fails, check /etc/ssmtp/ssmtp.conf, particularly the mailhub
setting.


-- 
Neil Bothwick

Windows Error #10: Insufficient money spent in hardware.


signature.asc
Description: PGP signature


[gentoo-user] cron and ssmtp

2008-01-22 Thread Michael Higgins
Hello, folks --

Is anyone using cron (vixie-cron) without a real MTA and getting
emails? The test is simple, just echo hello world. I expect this
to come as an email to the address I put in MAILTO=. But it doesn't.
No dead.letter to be found either.

Not having found any examples of folks using ssmtp to mail cron errors,
does anyone have an experience to share, or advice (short of installing
an MTA)?

Or, if this is totally possible, can I get help to eliminate possible
config errors by some method?

Cheers,

-- 
 |\  /||   |  ~ ~  
 | \/ ||---|  `|` ?
 ||ichael  |   |iggins\^ /
 michael.higgins[at]evolone[dot]org
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] cron and ssmtp

2008-01-22 Thread Ricardo Saffi Marques
I also have mailx installed. Try that.

On 1/22/08, Neil Bothwick [EMAIL PROTECTED] wrote:

 On Tue, 22 Jan 2008 07:36:46 -0800, Michael Higgins wrote:

  Is anyone using cron (vixie-cron) without a real MTA and getting
  emails? The test is simple, just echo hello world. I expect this
  to come as an email to the address I put in MAILTO=. But it doesn't.

 It works on several boxes here. Is ssmtp working correctly? Try

 echo -e To: Me\nSubject: ssmtp test\n\nssmtp test | /usr/sbin/ssmtp
 youraddress

 If it fails, check /etc/ssmtp/ssmtp.conf, particularly the mailhub
 setting.


 --
 Neil Bothwick

 Windows Error #10: Insufficient money spent in hardware.




-- 
Ricardo Saffi Marques
Laboratório de Administração e Segurança de Sistemas (LAS/IC)
Universidade Estadual de Campinas (UNICAMP)
Cell: +55 (19) 8128-0435
Skype: ricardo_saffi_marques
Website: http://www.rsaffi.com


Re: [gentoo-user] cron and ssmtp

2008-01-22 Thread Ricardo Saffi Marques
Oh, forgot to mention: and it works beautifully. ;)

On 1/22/08, Ricardo Saffi Marques [EMAIL PROTECTED] wrote:

 I also have mailx installed. Try that.

 On 1/22/08, Neil Bothwick [EMAIL PROTECTED] wrote:
 
  On Tue, 22 Jan 2008 07:36:46 -0800, Michael Higgins wrote:
 
   Is anyone using cron (vixie-cron) without a real MTA and getting
   emails? The test is simple, just echo hello world. I expect this
   to come as an email to the address I put in MAILTO=. But it doesn't.
 
  It works on several boxes here. Is ssmtp working correctly? Try
 
  echo -e To: Me\nSubject: ssmtp test\n\nssmtp test | /usr/sbin/ssmtp
  youraddress
 
  If it fails, check /etc/ssmtp/ssmtp.conf, particularly the mailhub
  setting.
 
 
  --
  Neil Bothwick
 
  Windows Error #10: Insufficient money spent in hardware.
 
 


 --
 Ricardo Saffi Marques
 Laboratório de Administração e Segurança de Sistemas (LAS/IC)
 Universidade Estadual de Campinas (UNICAMP)
 Cell: +55 (19) 8128-0435
 Skype: ricardo_saffi_marques
 Website: http://www.rsaffi.com




-- 
Ricardo Saffi Marques
Laboratório de Administração e Segurança de Sistemas (LAS/IC)
Universidade Estadual de Campinas (UNICAMP)
Cell: +55 (19) 8128-0435
Skype: ricardo_saffi_marques
Website: http://www.rsaffi.com


Re: [gentoo-user] cron and ssmtp

2008-01-22 Thread Michael Higgins
On Tue, 22 Jan 2008 15:48:05 +
Neil Bothwick [EMAIL PROTECTED] wrote:

 On Tue, 22 Jan 2008 07:36:46 -0800, Michael Higgins wrote:
 
  Is anyone using cron (vixie-cron) without a real MTA and getting
  emails? The test is simple, just echo hello world. I expect this
  to come as an email to the address I put in MAILTO=. But it
  doesn't.
 
 It works on several boxes here. Is ssmtp working correctly? Try
 
 echo -e To: Me\nSubject: ssmtp test\n\nssmtp test | /usr/sbin/ssmtp
 youraddress 
 
 If it fails, check /etc/ssmtp/ssmtp.conf, particularly the mailhub
 setting.

No fail. Worked like a charm...

I edit my crontab like sudo crontab -u mykhyggz -e

At the top, is MAILTO=[EMAIL PROTECTED]

My user belongs to cron group: groups
wheel cron users mykhyggz

Cron is running: top bn1|grep cron
 5068 root  18   0  3072  692  552 S  0.0  0.7   0:00.00 cron

1508  *  *   *echo hello world

should have sent me an email with 'hello world' in the body at 8:15, or
so I believe, but didn't.

What else can I check?

Cheers,

-- 
 |\  /||   |  ~ ~  
 | \/ ||---|  `|` ?
 ||ichael  |   |iggins\^ /
 michael.higgins[at]evolone[dot]org
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] cron and ssmtp

2008-01-22 Thread Ricardo Saffi Marques
I think it's not a group issue. I put myself at cron and crontab groups,
just in case. If it was a group thing, you wouldn't even be able to crontab
-e.
I edit my cron table using: crontab -e (no extra parameters needed). Check
it out by crontab -l. For root, I do the same.

Regards,

Saffi

On 1/22/08, Michael Higgins [EMAIL PROTECTED] wrote:

 On Tue, 22 Jan 2008 15:48:05 +
 Neil Bothwick [EMAIL PROTECTED] wrote:

  On Tue, 22 Jan 2008 07:36:46 -0800, Michael Higgins wrote:
 
   Is anyone using cron (vixie-cron) without a real MTA and getting
   emails? The test is simple, just echo hello world. I expect this
   to come as an email to the address I put in MAILTO=. But it
   doesn't.
 
  It works on several boxes here. Is ssmtp working correctly? Try
 
  echo -e To: Me\nSubject: ssmtp test\n\nssmtp test | /usr/sbin/ssmtp
  youraddress
 
  If it fails, check /etc/ssmtp/ssmtp.conf, particularly the mailhub
  setting.

 No fail. Worked like a charm...

 I edit my crontab like sudo crontab -u mykhyggz -e

 At the top, is MAILTO=[EMAIL PROTECTED]

 My user belongs to cron group: groups
 wheel cron users mykhyggz

 Cron is running: top bn1|grep cron
 5068 root  18   0  3072  692  552 S  0.0  0.7   0:00.00 cron

 1508  *  *   *echo hello world

 should have sent me an email with 'hello world' in the body at 8:15, or
 so I believe, but didn't.

 What else can I check?

 Cheers,

 --
 |\  /||   |  ~ ~
 | \/ ||---|  `|` ?
 ||ichael  |   |iggins\^ /
 michael.higgins[at]evolone[dot]org
 --
 gentoo-user@lists.gentoo.org mailing list




-- 
Ricardo Saffi Marques
Laboratório de Administração e Segurança de Sistemas (LAS/IC)
Universidade Estadual de Campinas (UNICAMP)
Cell: +55 (19) 8128-0435
Skype: ricardo_saffi_marques
Website: http://www.rsaffi.com


Re: [gentoo-user] cron and ssmtp

2008-01-22 Thread Greg Bowser
I'm using ssmtp to send mail on several boxes. One of the boxes is running a
real MTA and acts as the hub for the other boxes.

Check /var/log/mail*.

I'm assuming you set mailhub=foo in your ssmtp.conf, which means you're
using the box foo to relay your mail. It's possible that the hub is refusing
to send the mail. That would look something like:

Jan 17 15:44:59 starscream postfix/smtp[8356]: 24E2D4AC9: to=
[EMAIL PROTECTED], relay=:25, delay=15, delays=0.1/0.01/15/0.1,
dsn=5.7.1, status=bounced (host xxx said: 550 5.7.1 
[EMAIL PROTECTED]... Relaying denied (in reply to RCPT TO command))

At any rate, if there's an error anywhere along the way, it should show up
in one of the mail logs.

On Jan 22, 2008 11:19 AM, Michael Higgins [EMAIL PROTECTED] wrote:

 On Tue, 22 Jan 2008 15:48:05 +
 Neil Bothwick [EMAIL PROTECTED] wrote:

  On Tue, 22 Jan 2008 07:36:46 -0800, Michael Higgins wrote:
 
   Is anyone using cron (vixie-cron) without a real MTA and getting
   emails? The test is simple, just echo hello world. I expect this
   to come as an email to the address I put in MAILTO=. But it
   doesn't.
 
  It works on several boxes here. Is ssmtp working correctly? Try
 
  echo -e To: Me\nSubject: ssmtp test\n\nssmtp test | /usr/sbin/ssmtp
  youraddress
 
  If it fails, check /etc/ssmtp/ssmtp.conf, particularly the mailhub
  setting.

 No fail. Worked like a charm...

 I edit my crontab like sudo crontab -u mykhyggz -e

 At the top, is MAILTO=[EMAIL PROTECTED]

 My user belongs to cron group: groups
 wheel cron users mykhyggz

 Cron is running: top bn1|grep cron
  5068 root  18   0  3072  692  552 S  0.0  0.7   0:00.00 cron

 1508  *  *   *echo hello world

 should have sent me an email with 'hello world' in the body at 8:15, or
 so I believe, but didn't.

 What else can I check?

 Cheers,

 --
  |\  /||   |  ~ ~
  | \/ ||---|  `|` ?
  ||ichael  |   |iggins\^ /
  michael.higgins[at]evolone[dot]org
 --
 gentoo-user@lists.gentoo.org mailing list




Re: [gentoo-user] cron and ssmtp

2008-01-22 Thread Jan Seeger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 22. Jan, Ricardo Saffi Marques spammed my inbox with 
 I think it's not a group issue. I put myself at cron and crontab groups,
 just in case. If it was a group thing, you wouldn't even be able to crontab
 -e.
 I edit my cron table using: crontab -e (no extra parameters needed). Check
 it out by crontab -l. For root, I do the same.
 
 Regards,
 
 Saffi
 
 On 1/22/08, Michael Higgins [EMAIL PROTECTED] wrote:
 
  On Tue, 22 Jan 2008 15:48:05 +
  Neil Bothwick [EMAIL PROTECTED] wrote:
 
   On Tue, 22 Jan 2008 07:36:46 -0800, Michael Higgins wrote:
  
Is anyone using cron (vixie-cron) without a real MTA and getting
emails? The test is simple, just echo hello world. I expect this
to come as an email to the address I put in MAILTO=. But it
doesn't.
snip

I am also getting mails from cron with ssmtp. However, I had to twiddle my mail 
server setup:
Since ssmtp does not specify a complete From: (or envelope from) adress, the 
server refused the
mail. I needed to allow messages without a from: adress to receive any mail 
from cron.
Regards
Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHlmIbMmLQdC6jvocRAnjPAKCdx9DNojusXXRtL2+EFfHsDpJfDgCcCn4I
ZhZho5DxnGju1nRxy7k6TDk=
=bzp3
-END PGP SIGNATURE-
--
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] cron and ssmtp

2008-01-22 Thread Michael Higgins
On Tue, 22 Jan 2008 22:37:32 +0100
Jan Seeger [EMAIL PROTECTED] wrote:

On Tue, 22 Jan 2008 07:36:46 -0800, Michael Higgins wrote:
   
 Is anyone using cron (vixie-cron) without a real MTA and
 getting emails? The test is simple, just echo hello world.
 I expect this to come as an email to the address I put in
 MAILTO=. But it doesn't.
 snip
 
 I am also getting mails from cron with ssmtp. However, I had to
 twiddle my mail server setup: Since ssmtp does not specify a complete
 From: (or envelope from) adress, the server refused the mail. I
 needed to allow messages without a from: adress to receive any mail
 from cron. Regards Jan

Well, to f/u with all of this.

I re-emerged vixie-cron and cronbase too...

 * Portage doesn't enforce proper permissions on already existing
 * directories (bug 141619). Appropriate permissions are now being set
 * on //etc/cron.{hourly,daily,weekly,monthly},
 * //var/spool/cron/ and //var/spool/cron/lastrun/
 * (see bug 182998)

IDK if that mattered. Again, I have no problem sending mail from a
shell. Looking at world, ssmtp isn't listed. I installed that too, for
kicks. But, I've been able to send and receive mail, so that shouldn't
matter...

In fact, I believe now what I do have is a problem getting cron to do
it's thing. At this point, I'm baffled. I started finding this in the
logs, however, so something changed:

Jan 22 16:04:01 devserv cron[22211]: Cannot make/remove an entry for the 
specified session
Jan 22 16:05:01 devserv cron[22215]: Cannot make/remove an entry for the 
specified session
Jan 22 16:06:01 devserv cron[22216]: Cannot make/remove an entry for the 
specified session
Jan 22 16:07:01 devserv cron[22217]: Cannot make/remove an entry for the 
specified session

Well, I guess now I know it's trying...

I'll remove 'pam' from my use flags for this? Re-emerge vixie-cron...

... oh, hello, now it's working??? WTF

Important: After upgrading PAM, from any version to any version, you
have to restart those services that are using it to avoid internal ABI
mismatches. This includes sshd, vixie-cron (and probably any other cron
service), mail servers, and in general almost every service that
accepts users.

Oh, REALLY? So there's a connection... hmm. I recall an upgrade howto
and check

 qfile -o /etc/pam.d/*
/etc/pam.d/cron

... but it seems fine... Referring to  a working config, I uncommented
the following line:

session optionalpam_limits.so

Re-emerged with pam useflag enabled again. Joy.

Thanks for all of your input, everyone... I'll be damned if I can
figure out what exactly fixed it, though.

Cheers,

-- 
 |\  /||   |  ~ ~  
 | \/ ||---|  `|` ?
 ||ichael  |   |iggins\^ /
 michael.higgins[at]evolone[dot]org
-- 
gentoo-user@lists.gentoo.org mailing list