3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] how to use logging, s...
FromSent OnAttachments
Benjamin TomhaveApr 23, 2003 12:08 pm 
James TurnbullApr 23, 2003 4:55 pm 
James TurnbullApr 23, 2003 8:24 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] how to use logging, syslog?Actions...
From:James Turnbull (jam@lovedthanlost.net)
Date:Apr 23, 2003 4:55:44 pm
List:net.sourceforge.lists.courier-maildrop

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