* [gentoo-user] cron and ssmtp @ 2008-01-22 15:36 Michael Higgins 2008-01-22 15:48 ` Neil Bothwick 0 siblings, 1 reply; 12+ messages in thread From: Michael Higgins @ 2008-01-22 15:36 UTC (permalink / raw To: gentoo-user 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] cron and ssmtp 2008-01-22 15:36 [gentoo-user] cron and ssmtp Michael Higgins @ 2008-01-22 15:48 ` Neil Bothwick 2008-01-22 16:18 ` Ricardo Saffi Marques 2008-01-22 16:19 ` Michael Higgins 0 siblings, 2 replies; 12+ messages in thread From: Neil Bothwick @ 2008-01-22 15:48 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 591 bytes --] 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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] cron and ssmtp 2008-01-22 15:48 ` Neil Bothwick @ 2008-01-22 16:18 ` Ricardo Saffi Marques 2008-01-22 16:18 ` Ricardo Saffi Marques 2008-01-22 16:19 ` Michael Higgins 1 sibling, 1 reply; 12+ messages in thread From: Ricardo Saffi Marques @ 2008-01-22 16:18 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 925 bytes --] I also have mailx installed. Try that. On 1/22/08, Neil Bothwick <neil@digimed.co.uk> 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 [-- Attachment #2: Type: text/html, Size: 1339 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] cron and ssmtp 2008-01-22 16:18 ` Ricardo Saffi Marques @ 2008-01-22 16:18 ` Ricardo Saffi Marques 0 siblings, 0 replies; 12+ messages in thread From: Ricardo Saffi Marques @ 2008-01-22 16:18 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1336 bytes --] Oh, forgot to mention: and it works beautifully. ;) On 1/22/08, Ricardo Saffi Marques <saffi@las.ic.unicamp.br> wrote: > > I also have mailx installed. Try that. > > On 1/22/08, Neil Bothwick <neil@digimed.co.uk> 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 [-- Attachment #2: Type: text/html, Size: 2265 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] cron and ssmtp 2008-01-22 15:48 ` Neil Bothwick 2008-01-22 16:18 ` Ricardo Saffi Marques @ 2008-01-22 16:19 ` Michael Higgins 2008-01-22 16:32 ` Greg Bowser ` (2 more replies) 1 sibling, 3 replies; 12+ messages in thread From: Michael Higgins @ 2008-01-22 16:19 UTC (permalink / raw To: gentoo-user On Tue, 22 Jan 2008 15:48:05 +0000 Neil Bothwick <neil@digimed.co.uk> 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@isp.com" 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 15 08 * * * 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] cron and ssmtp 2008-01-22 16:19 ` Michael Higgins @ 2008-01-22 16:32 ` Greg Bowser 2008-01-22 16:34 ` [gentoo-user] " Guilherme Amadio 2008-01-22 16:37 ` [gentoo-user] " Ricardo Saffi Marques 2 siblings, 0 replies; 12+ messages in thread From: Greg Bowser @ 2008-01-22 16:32 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 2164 bytes --] 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=< topnotcher@gmail.com>, relay=xxxxxxxx:25, delay=15, delays=0.1/0.01/15/0.1, dsn=5.7.1, status=bounced (host xxxxxxxxxxx said: 550 5.7.1 < topnotcher@gmail.com>... 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 <linux@evolone.org> wrote: > On Tue, 22 Jan 2008 15:48:05 +0000 > Neil Bothwick <neil@digimed.co.uk> 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@isp.com" > > 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 > > 15 08 * * * 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 > > [-- Attachment #2: Type: text/html, Size: 3263 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-user] Re: cron and ssmtp 2008-01-22 16:19 ` Michael Higgins 2008-01-22 16:32 ` Greg Bowser @ 2008-01-22 16:34 ` Guilherme Amadio 2008-01-22 16:40 ` Ricardo Saffi Marques 2008-01-22 16:37 ` [gentoo-user] " Ricardo Saffi Marques 2 siblings, 1 reply; 12+ messages in thread From: Guilherme Amadio @ 2008-01-22 16:34 UTC (permalink / raw To: gentoo-user Hi, On Tue, Jan 22, 2008 at 08:19:15AM -0800, Michael Higgins wrote: > I edit my crontab like sudo crontab -u mykhyggz -e > > At the top, is MAILTO="email@isp.com" > > 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 > > 15 08 * * * 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? > I believe that the MAILTO variable mails output only when there are errors, so try putting 'ls /idontexist' as a command and see if you get anything. You may have to mail normal output by hand. Cheers, -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Re: cron and ssmtp 2008-01-22 16:34 ` [gentoo-user] " Guilherme Amadio @ 2008-01-22 16:40 ` Ricardo Saffi Marques 2008-01-22 16:50 ` Ricardo Saffi Marques 0 siblings, 1 reply; 12+ messages in thread From: Ricardo Saffi Marques @ 2008-01-22 16:40 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1279 bytes --] Not really, Guilherme. ANY output from any command executed under cron WILL be outputed to the mail set on MAILTO variable. On 1/22/08, Guilherme Amadio <guilherme.amadio@gmail.com> wrote: > > Hi, > > On Tue, Jan 22, 2008 at 08:19:15AM -0800, Michael Higgins wrote: > > I edit my crontab like sudo crontab -u mykhyggz -e > > > > At the top, is MAILTO="email@isp.com" > > > > 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 > > > > 15 08 * * * 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? > > > I believe that the MAILTO variable mails output only when there are > errors, so try putting 'ls /idontexist' as a command and see if you > get anything. You may have to mail normal output by hand. > > Cheers, > > -- > 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 [-- Attachment #2: Type: text/html, Size: 2215 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Re: cron and ssmtp 2008-01-22 16:40 ` Ricardo Saffi Marques @ 2008-01-22 16:50 ` Ricardo Saffi Marques 0 siblings, 0 replies; 12+ messages in thread From: Ricardo Saffi Marques @ 2008-01-22 16:50 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 446 bytes --] The mailhub seems to be a good place to think about. Leave a "tail -f /var/log/mail/current" running in a shell while you wait for a cron to be executed. When it runs, check out what happens in the logfile. Regards, Saffi -- 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 [-- Attachment #2: Type: text/html, Size: 533 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] cron and ssmtp 2008-01-22 16:19 ` Michael Higgins 2008-01-22 16:32 ` Greg Bowser 2008-01-22 16:34 ` [gentoo-user] " Guilherme Amadio @ 2008-01-22 16:37 ` Ricardo Saffi Marques 2008-01-22 21:37 ` Jan Seeger 2 siblings, 1 reply; 12+ messages in thread From: Ricardo Saffi Marques @ 2008-01-22 16:37 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1942 bytes --] 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 <linux@evolone.org> wrote: > > On Tue, 22 Jan 2008 15:48:05 +0000 > Neil Bothwick <neil@digimed.co.uk> 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@isp.com" > > 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 > > 15 08 * * * 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 [-- Attachment #2: Type: text/html, Size: 3240 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] cron and ssmtp 2008-01-22 16:37 ` [gentoo-user] " Ricardo Saffi Marques @ 2008-01-22 21:37 ` Jan Seeger 2008-01-23 0:52 ` Michael Higgins 0 siblings, 1 reply; 12+ messages in thread From: Jan Seeger @ 2008-01-22 21:37 UTC (permalink / raw To: gentoo-user -----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 <linux@evolone.org> wrote: > > > > On Tue, 22 Jan 2008 15:48:05 +0000 > > Neil Bothwick <neil@digimed.co.uk> 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] cron and ssmtp 2008-01-22 21:37 ` Jan Seeger @ 2008-01-23 0:52 ` Michael Higgins 0 siblings, 0 replies; 12+ messages in thread From: Michael Higgins @ 2008-01-23 0:52 UTC (permalink / raw To: gentoo-user On Tue, 22 Jan 2008 22:37:32 +0100 Jan Seeger <jan.seeger@thenybble.de> 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 optional pam_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 ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-01-23 0:53 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-01-22 15:36 [gentoo-user] cron and ssmtp Michael Higgins 2008-01-22 15:48 ` Neil Bothwick 2008-01-22 16:18 ` Ricardo Saffi Marques 2008-01-22 16:18 ` Ricardo Saffi Marques 2008-01-22 16:19 ` Michael Higgins 2008-01-22 16:32 ` Greg Bowser 2008-01-22 16:34 ` [gentoo-user] " Guilherme Amadio 2008-01-22 16:40 ` Ricardo Saffi Marques 2008-01-22 16:50 ` Ricardo Saffi Marques 2008-01-22 16:37 ` [gentoo-user] " Ricardo Saffi Marques 2008-01-22 21:37 ` Jan Seeger 2008-01-23 0:52 ` Michael Higgins
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox