Re: [exim] Logging to mainlog from system filter

Top Page
Delete this message
Reply to this message
Author: Paul Miles - Pitch
Date:  
To: Exim-users
Subject: Re: [exim] Logging to mainlog from system filter
Hello,

This is an extract from my mainlog when the below part of my system
filter is executed.

2007-07-24 10:58:49 1IDH9Z-000376-3u <= psbt@??? H=(xzquos)
[212.85.1.17] P=smtp S=10181 id=46A5CD2F.4050708@???
2007-07-24 10:58:49 1IDHAH-00038O-Lr <= psbt@??? U=exim P=bogodone
S=10444 id=46A5CD2F.4050708@???
2007-07-24 10:58:49 1IDHAH-00038O-Lr =>
/var/spool/mail/spam-detected-by-bogofilter <system-filter>
T=address_file
2007-07-24 10:58:49 1IDHAH-00038O-Lr => hotdognn@???
R=backup_mailsvr T=remote_smtp H=ldnexch1.ldn01.local [192.168.0.7]
2007-07-24 10:58:49 1IDHAH-00038O-Lr Completed
2007-07-24 10:58:49 1IDH9Z-000376-3u => hotdognn <hotdognn@???>
R=bogo_router T=bogo_transport
2007-07-24 10:58:49 1IDH9Z-000376-3u Completed

As you can see, no 'logwrite' entry.

Any thoughts ?

Thanks,

Paul
-----Original Message-----
From: Paul Miles - Pitch
Sent: 24 July 2007 09:20
To: Exim-users@???
Subject: RE: [exim] Logging to mainlog from system filter

Hi Ted,

Thanks for your reply, I looked at logfile and logwrite, but for some
reason, didn't see anything appear in the main log.

This is an extract of my system filter :

  # If bogofilter detects some spam, save it to the spam mailbox
  if $h_X-Bogosity: MATCH "Spam" then
    headers remove Pitch-Spam-Score


    headers add "Pitch-Spam-score: +++++++++++++++ - Detected by
Bogofilter"
    logfile /var/spool/exim/mainlog 0644
    logwrite "$tod_log $message_id F=<$h_sender> rejected by bogofilter
Pitch-Spam-Score: N/A"
    unseen save /var/spool/mail/spam-detected-by-bogofilter
    finish
  endif


Thanks,

Paul

-----Original Message-----
From: exim-users-bounces@??? [mailto:exim-users-bounces@exim.org]
On Behalf Of Ted Cooper
Sent: 24 July 2007 01:37
To: Exim-users@???
Subject: Re: [exim] Logging to mainlog from system filter

Paul Miles - Pitch wrote:
> Hello,
>
> Is it possible to write to the exim mainlog from a system filter ?
>
> If possible, I would like to do something like : warn text "Some
> message"
>
> I'm trying to achieve exactly the same as :
> http://lists.exim.org/lurker/message/20060619.102901.e58c865c.en.html
> - but I didn't find any solutions to this request.
>
> Many thanks in advance,
>
> Paul
>


http://www.exim.org/exim-html-current/doc/html/filter.html#SECTlog

--
The Exim Manual
http://www.exim.org/docs.html
http://www.exim.org/exim-html-current/doc/html/spec_html/index.html

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/