It seems, that my question was not understood correctly (maybe it's me, who does not understand the answers given).
We have the latest exim.conf and exim.pl. At the moment, we only want to count and limit users from sending too many emails with a general limit for the whole machine, which is defined in /etc/virtual/limit, nothing more. Furthermore, assume, that our machine is well enough protected, that rouge php/perl scripts are not running on it and therefore are not of interest.
So, we have a domain "pnv.si" (on account "account1"), which has DNS records hosted on the machine itself. The same goes for handling of emails (they are handled on the same machine that we want to enforce the limit on). If I send an email from
[email protected] to
[email protected] from an email client program running on a remote machine (for example, my workstation in the office) it does not show it in /etc/virtual/usage/account1.bytes and the counter in /etc/virtual/usage/account1 is not incremented. The connection to our mail server requires SSL connection and SMTP authentication.
If I send an email from
[email protected] from the same client mail program with the same connection parameters to a user on a domain that does not have emails hosted on the machine in question (for example to someone with an email address
[email protected]), than that is logged as expected in /etc/virtual/usage/account1.bytes and the counter in /etc/virtual/usage/account1 is incremented by one.
This behavior seem logical to me, I just want someone to confirm, that this is the correct (or incorrect) way that limits and counting of emails are done.