Benjamin Tomhave wrote:
Hello,
Would it be possible for someone to, in a nutshell, explain what, if
any, debug features exist in maildrop and how I might be able to use
them? Right now all my testing is based off of watching my qmail
logs. If possible, I would like to get logs directly from maildrop.
I've seen posts about using log commands, but have not been able to
gather enough info to get something working correctly (such as where
the file should located, who it should be owned by, permissions, etc).
In your .mailfilter or maildroprc file put:
logfile "nameofyourlogfile"
Create the log file in the same place as your .mailfilter/maildroprc file.
Mine has the following permissions: -rw-r--r--
And from the manual:
For each delivery (the to and cc statements, and default deliveries)
maildrop records the From: and the Subject: fields, together with the
current time, in the log file. The log statement adds additional logging
text to the log file. The log statement works exactly like the echo
statement, except that the text is written to the logfile, instead of
standard output.
You can use the log statement like the below:
if ( /^Return-Path: <courier-maildrop-admin/ )
{
log "-------------------------------------------------------------
Mail-Courier-Maildrop "
to "Maildir/.Mailing Lists.Maildrop"
}
In future though I'd suggest a serious RTFM before asking.
Regards