Guest hawkeyeIX Posted October 4, 2004 Report Share Posted October 4, 2004 I search a solution for logging console messages to a log files? On my server I run qmail MTA. After patching qmail-smtpd with the specific goodrcptto patch some specific messages from qmail-smtpd appears on console only. No matter what I tried, I can't send this console output to a file. This is the relevant command from the tcpserver launcher: env - PATH="/var/qmail/bin:/usr/local/bin" \ /usr/local/bin/tcpserver -p -x /etc/tcp.smtp.cdb -c20 -u399 -g399 0 smtp \ /var/qmail/bin/qmail-smtpd /home/vpopmail/bin/vchkpw MYIPADDR \ /bin/true & 2>&1 > /var/log/mail/badmaillog How can I send the console output from qmail-smtpd to a file? Thanxs, Thomas Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted October 7, 2004 Report Share Posted October 7, 2004 There's a command called "script" which will log everything you type or that is outputted in the terminal to a log file. See this thread where I asked about the same thing and johnnyv's answer: http://mandrakeusers.org/index.php?showtop...803&hl=terminal Quote Link to comment Share on other sites More sharing options...
bvc Posted October 7, 2004 Report Share Posted October 7, 2004 (edited) name_of_app 2>&1 | tee name_of.log and maybe take out the & after /bin/true? tee is what allows you to still see it in the console. Oh, just read the thread....tee is there Edited October 7, 2004 by bvc Quote Link to comment Share on other sites More sharing options...
Guest hawkeyeIX Posted October 7, 2004 Report Share Posted October 7, 2004 Hi, name_of_app 2>&1 | tee name_of.log tee, of course. Thanks, that's the solution I was searching. and maybe take out the & after /bin/true? it shall be a background process so the & should be correct, isn't it? Thomas Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.