Jump to content

how log messages from console?


Guest hawkeyeIX
 Share

Recommended Posts

Guest hawkeyeIX

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

Link to comment
Share on other sites

Guest hawkeyeIX

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...