Re: [exim] separate log file for deliveries

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Ted Cooper
Date:  
À: exim-users
Sujet: Re: [exim] separate log file for deliveries
Stanislaw Halik wrote:
> Heya,
>
> I'd like to make the log file a bit more comprehensible. In mainlog,
> all contents of rejectlog are printed, along with all successful
> deliveries. I'd like to have all successful deliveries, lines like
> these:
>
> 2006-11-20 12:58:54 1Gm7nX-0002Wz-EP <= [cut for brevity]
> 2006-11-20 12:58:54 1Gm7nX-0002Wz-EP => sthalik [same here]
>
> in a separate log file.
>
> While reading the spec file, I haven't found any mention of creating
> custom log files, as opposed to mainlog, rejectlog and paniclog. Is such
> a thing possible right now?
>
> /sh
>


Just run an exigrep over the log file.. my personal favourite:

#exigrep "<=" /var/log/exim/main

2006-11-20 19:47:03 1Gm4nv-0001bE-0x <= zul@???
H=(cbhomehunters.com) [201.240.240.19] P=smtp S=2718
id=000001c70c88$c04aed90$38d2a8c0@lkzu
2006-11-20 19:47:04 1Gm4nv-0001bE-0x => eximx1805
<eximx1805@???> R=spamtraps T=spamtrap
2006-11-20 19:47:04 1Gm4nv-0001bE-0x Completed

2006-11-20 19:48:56 1Gm4pj-0001bg-H1 <= lysandery@???
H=zj067039.ppp.dion.ne.jp (fujisawa.com) [222.4.67.39] P=smtp S=2781
id=000001c70c88$c6933450$abc3a8c0@jidiusf
2006-11-20 19:48:56 1Gm4pj-0001bg-H1 => exim <exim@???>
R=spamtraps T=spamtrap
2006-11-20 19:48:56 1Gm4pj-0001bg-H1 Completed

(ahhh.. spam traps.. notice how they are addresses that get scraped off
this list!!)

.. will give you a list of every single mail that came in for that log
file along with all actions associated with it. Not exactly
chronological but it gets the useful information out.
There's no change needed to the logging at all, this just changes how
you read them.

There are also utilities out there to turn them into pretty looking
coloured web pages.. and then there's also eximstats.

Ted.