Curl not sending last lines of SMTP connection to stderr file
Date: Wed, 22 May 2019 02:07:32 +0000
I am sending an email using curl SMTP. I have set options for verbose output and redirecting stderr to a file. Here is my command line:
Most of the verbose output gets captured to msg_23.log. However, the QUIT and 221 response are printed out on the console. So I see this:
It's like it stops redirecting stderr before it prints the last 2 headers.
In contrast, a system-level redirection of stderr captures all output including the last 2 lines:
# curl smtp://10.4.0.204:25 --mail-from test_at_example.com --mail-rcp test_at_message.com -s --upload-file msg_23.txt -v 2>msg_23.log
Is this a bug? The system-level redirection provides a work-around, though the --stderr flag is preferable for my application.
Jon Harris, Sr. Design Engineer, Symetrix, Inc.