atom feed16 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Re: no mail from ...
FromSent OnAttachments
Tim LynchAug 1, 2003 6:02 pm 
Sam VarshavchikAug 1, 2003 6:54 pm 
Tim LynchAug 4, 2003 11:57 am 
Jeff JansenAug 4, 2003 12:21 pm 
Sam VarshavchikAug 4, 2003 12:41 pm 
Tim LynchAug 4, 2003 2:04 pm 
Tim LynchAug 6, 2003 11:27 am 
Tim LynchAug 8, 2003 10:48 am 
Gordon MessmerAug 8, 2003 1:03 pm 
Gordon MessmerAug 8, 2003 2:37 pm 
Sam VarshavchikAug 8, 2003 5:50 pm 
Gordon MessmerAug 9, 2003 7:29 pm 
Sam VarshavchikAug 9, 2003 9:16 pm 
Tim LynchAug 11, 2003 12:38 pm 
Sam VarshavchikAug 11, 2003 2:09 pm 
Jon NelsonAug 11, 2003 2:13 pm 
Subject:Re: [courier-users] Re: no mail from root's at jobs (at jobs, not cron jobs)
From:Gordon Messmer (yiny@eburg.com)
Date:Aug 8, 2003 1:03:44 pm
List:net.sourceforge.lists.courier-users

I think you're wrong:

[root@wanderlust root]# at now + 5 minutes warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh at> date | sendmail gmes@real.com at> <EOT> job 1 at 2003-08-08 12:44 [root@wanderlust root]# atq 1 2003-08-08 12:44 a root [root@wanderlust root]# atq [root@wanderlust root]#

atd expects sendmail to be located at /usr/sbin/sendmail. What do you have at that location?

Tim Lynch wrote:

I challenge anyone to _not_ duplicate this behavior.

courier sendmail fails and _without_logging_ when called by atd to mail output from a root at job.

Tim Lynch wrote: : Sam Varshavchik wrote: : >> > Try putting the following nonsense before the command: : >> > : >> > exec >/dev/null; exec 2>/dev/null; exec 1</dev/null; : ... : > You're not sinking anything to /dev/null. The above should be followed : > by whatever you want to run, with its output piped to Courier's sendmail. : ^^^^^^^^^^^^^^^^^^^^^ : ah, you mean like this: : # batch <<eof : exec >/dev/null; exec 2>/dev/null; exec 1</dev/null; : ( echo 'the date is:'; date ; ls /tmp/ENOENT ) 2>&1 | sendmail root : eof : : yes, piping output to sendmail works. but such piping obviates : rearranging the fd's with exec, although 2>&1 for the subshell before : the pipe catches the stderr about ENOENT. i would pipe to ``mail -s : output root'' instead of directly to sendmail. having the job send : output instead of letting atd send the output is a useful workaround. : : however the courier sendmail replacement appears to fail when called by : atd to send the output of a root batch job. actual sendmail does not : fail. anyone else see this behavior?