On Tue, May 15, 2001 at 10:51:54AM -0400, Christopher Tarricone wrote:
> I am can recieve errors displayed on the console from qmail-smtpd that look like
>
> qmail-smtpd: pid 29533 from 207.69.200.246 Invalid SENDER address: MAIL from:
><[EMAIL PROTECTED]@pop.mindspring.com>, RCPT To:<[EMAIL PROTECTED]>
>
> I would like to log all of that information to a file.
> This is what I put in my qmail startup script. But the information is still printed
>to the console. Is there way to make qmail-smtpd write to a log file?
>
>
> env - PATH="/var/qmail/bin:/usr/local/bin" \
> tcpserver -H -R -c100 -u503 -g501 0 smtp \
> /var/qmail/bin/qmail-smtpd 2> $1 > /var/log/qmail/smtpd.log
>
Don't know what that '$1' is supposed to be for, and even if it was
correct, '2>&1' before '>/file' puts STDERR on your tty*. Try:
env - PATH="/var/qmail/bin:/usr/local/bin" \
tcpserver -H -R -c100 -u503 -g501 0 smtp \
/var/qmail/bin/qmail-smtpd >/var/log/qmail/smtpd.log 2>&1
This puts STDOUT and STDERR into /var/log/qmail/smtpd.log.
I would really recommend looking into using multilog instead.
http://www.lifewithqmail.org/
has some great stuff on how to set up
qmail+tcpserver+daemontools/multilog.
* I know that seems counter-intuitive, it did to me as well starting
out. Just be aware that it processes the arguments in order.
HTH,
--
Greg White
Those who make peaceful revolution impossible will make violent
revolution inevitable.
-- John F. Kennedy