[Exim] accounting problem

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Mehnert
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] accounting problem
Hello exim-users,


we are using mail traffic accounting based on the exim acl patch and
we have a problem. When a mail cannot be delivered and it has to be
retried it is accounted again. So some big mails not being delivered
immediately sometimes give us wrong values in our accounting.
Has anyone solved this similar problem, our accounting afford with
that problem can be see below.
Is there a simple solution to that? May maintaining a table with all
message IDs and checking which one is first-time or retried be a
solution?


H.-J. Mehnert
Power-Netz

====================================================================

Exim version 4.24 #2 built 28-Oct-2003 21:56:34
Copyright (c) University of Cambridge 2003
Berkeley DB: Sleepycat Software: Berkeley DB 3.1.17: (July 31, 2000)
Support for: iconv() PAM OpenSSL
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mbx autoreply pipe smtp
Contains exiscan-acl patch revision 12 (c) Tom Kistner
[http://duncanthrax.net/exiscan/]
Configuration file is /etc/exim4.conf

====================================================================

acl_smtp_data = acl_account_traffic

acl_account_traffic:

  warn  message   = X-Spam-Score: $spam_score ($spam_bar)
        condition = ${if <{$message_size}{1000k}{1}{0}}
        spam      =  ${if eq {$h_X-Do-Spam-Scan:}{1} {nobody:true}{false} }


# activate demime for antivirus, else scanners run into problems

  warn  condition = ${if eq {$h_X-Do-Virus-Scan:}{1} {1}{0} }
        condition = ${if <{$message_size}{1000k}{1}{0}}
        demime    = *


# do antivirus scan if antivirus is activated for this domain

  warn  message   = X-Infected: $malware_name
        condition = ${if <{$message_size}{1000k}{1}{0}}
        malware   = ${if eq {$h_X-Do-Virus-Scan:}{1} {1}{0} }


# mark local generated mails or mails coming from 127.0.0.1 ->
dnslookup-router has to see it as relay

  warn          hosts          = 127.0.0.1
                sender_domains = +local_domains
                message        = X-Relay: 1


  warn          sender_domains = +local_domains
                message        = X-Relay: 1


# accounting of mails coming from known local domains and that are auth or
in relayhosts -> this are incoming relay mails

  warn          authenticated = *
                condition     = ${lookup mysql {insert into exim SET
size='$message_size',action='relay mail (auth) -
data-acl',test='$sender_address_domain'}{1}fail}
                message       = X-Relay: 1


  warn          hosts          = +relay_from_hosts
                authenticated  = !*
                sender_domains = +local_domains
                condition      = ${lookup mysql {insert into exim SET
size='$message_size',action='relay mail (host) - data-acl
$sender_address_domain',test='$sender_address_domain'}{1}f$
                message        = X-Relay: 1


# accounting of mails coming from unknown domains and that are auth or in
relayhosts -> this are incoming relay mails -> unrecognized

  warn          authenticated  = *
                sender_domains = ! +local_domains
                condition      = ${lookup mysql {insert into exim SET
size='$message_size',action='relay mail (auth) -
data-acl',test='unrecognized'}{1}fail}
                message        = X-Relay: 1


  warn          hosts          = +relay_from_hosts
                sender_domains = ! +local_domains
                condition      = ${lookup mysql {insert into exim SET
size='$message_size',action='relay mail (host) - data-acl
$sender_address_domain',test='unrecognized'}{1}fail}
                message        = X-Relay: 1


# accept all mails

accept

# acl_account_traffic END