<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE lire:report-spec PUBLIC
  "-//LogReport.ORG//DTD Lire Report Specification Markup Language V2.0//EN"
  "http://www.logreport.org/LRSML/2.0/lrsml.dtd">
<lire:report-spec xmlns:lire="http://www.logreport.org/LRSML/"
 superservice="email" schema="email-email" id="top-to-email-by-domain">

 <lire:title>Most Deliveries To User By Domain Email Report</lire:title>
 <lire:description>
  <para>This report lists the user by domain to which we sent the most emails.</para>
 </lire:description>

 <lire:param-spec>
  <lire:param name="domain_to_show" type="int" default="30">
   <lire:description>
    <para>This parameter controls the number of domains to
     display in the report.
    </para>
   </lire:description>
  </lire:param>

  <lire:param name="user_to_show" type="int" default="5">
   <lire:description>
    <para>This parameter controls the number of user by domain to
     display in the report.
    </para>
   </lire:description>
  </lire:param>
 </lire:param-spec>

 <lire:display-spec>
  <lire:title>Most Deliveries To User By Domain, Top
  $domain_to_show, Top $user_to_show Users</lire:title>
 </lire:display-spec>

 <lire:filter-spec>
  <lire:eq arg1="$stat" arg2="sent"/>
 </lire:filter-spec>

 <lire:report-calc-spec>
  <lire:group sort="-deliveries_total" limit="$domain_to_show">
   <lire:field name="to_domain"/>

   <lire:group sort="-deliveries_total"
    limit="$user_to_show">
    <lire:field name="to_email"/>

    <lire:count name="deliveries_total" label="Deliveries"/>
    <lire:count name="deliveries_ratio" ratio="table" label="% Total"/>
    <lire:count name="deliveries_group_ratio" ratio="group" label="% Domain"/>
   </lire:group>
  </lire:group>

 </lire:report-calc-spec>

</lire:report-spec>

<!-- 
Keep this comment at the end of the file
Local variables:
mode: xml
-->
