[milters] Archive

Lists Index Date Thread Search

Article: 621
From: Anthony Howe
Date: 2005-06-26 08:02:41 -0400
Subject: Re: milter-sender: log line for rejects

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Jeff Powell wrote:
> Would it be possible to add an option to write a single line to the
> maillog whenever milter-sender rejects a message?  I'm looking for a
> better ways to track milter-sender's activity.  Currently I have logging
> in milter-sender set to debug, and then I grep the maillog  for

Any interesting activeity is reported with:

	MailLogDetail=info

The debug class will not provide any more specific information 
pertaining to rejects.

The manual.html has the regex for all SMTP responses returned by 
milter-sender, so even if you disable milter-sender logging, you can 
grep for sendmail log messages related to milter-sender.

> milter-sender:
>  
> grep milter-sender | grep -c "reject 5"
>  
> This (I hope) pulls in all the lines that indicate milter-sender
> rejected a message so MRTG can graph it, but I'm not very good at
> writing queries like that.

There is a debug line from my milters related to rejects:

	/milter-NAME.* reply /

You could change the message's class in:

	com/snert/src/lib/mail/smf.c

Look for:

	smfLog(SMF_LOG_DEBUG, TAG_FORMAT "reply %s %s %s", TAG_ARGS, rcode, 
ecode, work->replyLine);

change:

	SMF_LOG_DEBUG
to:
	SMF_LOG_INFO

Then:

	cd com/snert/src/lib
	make
	cd ../milter-sender
	make clean install

And restart milter-sender. Then you should be able to grep for the one 
specifically interesting message related to rejects or special replies.

> It would be much easier if there was a config file option I could enable
> that would add something like "Rejected by milter-sender" or something
> similar.
> Then I could turn down the log level a bit.
>  
> Any chance of that?

Since its control by an smf library function, I might added it as one of 
the special undocumented options or change it permanently to SMF_LOG_INFO.

-- 
Anthony C Howe                                 +33 6 11 89 73 78
http://www.snert.com/       ICQ:
7116561         AIM: Sir Wumpus

Sendmail Anti-Spam Solutions           http://www.snertsoft.com/
                                             We Serve Your Server

Lists Index Date Thread Search