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?


These are the routers I've setup for the traffic logging.

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 D=\\$domain U=\\$local_part 
F=\\$sender_address S=\\$message_size\"
  no_verify
  allow_filter
  allow_freeze

trafficlog_out:
  user = mail
  driver = redirect
  domains = ! +local_domains
  data = "# Exim filter\n\
    logfile \"/var/log/exim/traffic.log\"\n\
    logwrite \"\\$tod_log OUTGOING ID=\\$message_id D=\\$sender_address_domain 
U=\\$sender_address_local_part t=\\$local_p...@\\$domain S=\\$message_size\"
  no_verify
  allow_filter
  allow_freeze


Thank you in advance for your help!

--------------------------------------
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 
-- 
## 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/

Reply via email to