I think you're wrong:

[EMAIL PROTECTED] root]# at now + 5 minutes
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
at> date | sendmail [EMAIL PROTECTED]
at> <EOT>
job 1 at 2003-08-08 12:44
[EMAIL PROTECTED] root]# atq
1 2003-08-08 12:44 a root
[EMAIL PROTECTED] root]# atq
[EMAIL PROTECTED] 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?



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to