Re: [exim] Condition on router to check if the destination o…

Góra strony
Delete this message
Reply to this message
Autor: Vaggelis Koutroumpas
Data:  
Dla: exim users
Temat: Re: [exim] Condition on router to check if the destination of a message is to the same server (is in local_domains)
Thank you Peter!

Actually I figured it out yesterday a little after I posted this :)

I have one more issue though.
While on the outgoing router with " domains = ! +local_domains " ti works
great logging only emails that are destined to a domain outside the server
if I send an email that is destined to an account/domain on the same server,
the router that logs the incoming traffic, logs this email as if it was
originated outside the server.

Here is the incoming traffic router

trafficlog_in:
  user = mail
  driver = redirect
  domains = +local_domains
  data = "# Exim filter\n\
    logfile \"/var/log/exim/traffic.log\"\n\
    logwrite \"\\$tod_log INCOMING ID=\\$message_id DOMAIN_TO=\\$domain 
USER_TO=\\$local_part DOMAIN_FROM=\\$sender_address_domain 
USER_FROM=\\$sender_address_local_part SIZE=\\$message_size\"
  no_verify
  allow_filter
  allow_freeze


(I've changed a bit the log format since my yesterday's post)

How can I ignore emails that originate from the same server so it won't log
internal traffic?

I tried a condition with match_domain checking the $sender_address_domain
against +local_domains with no luck...


Any help would be greatly appreciated :)


--------------------------------------
Regards,
Evans Koutroumpas
Systems Administrator
--------------------------------------
DataHost
Internet Services - Web development

THESSALIAS 6 STR. ALIMOS, ΑTHENS
17456 GREECE

Τel: +30.210-9922402
Fax: +30.210-9951108


----- Original Message -----
From: "Peter Bowyer" <peter@???>
To: "exim users" <exim-users@???>
Sent: Thursday, September 09, 2010 10:22 AM
Subject: Re: [exim] Condition on router to check if the destination of a
message is to the same server (is in local_domains)


> 2010/9/8 Vaggelis Koutroumpas <evans@???>:
>> Hello,
>>
>> I've created two routers with exim filters to log all incoming and
>> outgoing sizes of emails so with a php parser I parse the log and create
>> stats per user and per domain for the traffic they do.
>>
>> I want to set up a condition on the routers so that they will ignore any
>> email if it originates and is destined to the same server.
>>
>>
>> How can I check that? I suppose I have to create a condition that checks
>> the $domain or $sender_address_domain respectively if it is in
>> local_domains, right?
>>
>>
>> Any ideas how to proceed?
>
> Re-use whatever condition you have on the router that deals with local
> deliveries. If that's simply 'domains = +local_domains' then you're
> good to go....
>
> Peter
>
> --
> ## 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/