Re: "postfix check" output to non-tty stdout?

From: Rahul Dhesi (no email)
Date: Wed Nov 27 2002 - 00:47:51 EST

On Tue, Nov 26, 2002 at 07:32:58PM -1000, Baron Fujimoto wrote:
> However it seems that, aside from the logfile, the check option
> only writes warnings and errors to a tty type of device, so
> contructs like 2>&1 don't work if the command is invoked from
> within a sh script.

I did not expect this but I checked and you are right -- when its output
is a file, 'postfix check' does not print the warnings.

The following seems to work:

#! /bin/sh
cat <<EOF | expect > Log 2>&1
set timeout -1
spawn postfix check
expect eof


Hosted Email Solutions

Invaluement Anti-Spam DNSBLs

Powered By FreeBSD   Powered By FreeBSD