Found it in /etc/exim.pl
Code:
#logsmtpbw here
my $now = time();
$domain =~ s/[^\w\.\-]//g;
#we just can't trust user input
my $message_size = Exim::expand_string('$message_size');
if ($domain ne "") {
my $maxmails = 0;
open(CF,"/var/cpanel/cpanel.config");
while(<CF>) {
next if (/^#/);
s/\n//g;
my($var,$value) = split(/=/, $_);
if ($var eq "maxemailsperhour") {
$maxmails = int($value);
}
}
close(CF);
open(CPM,"/var/cpanel/maxemails");
while(<CPM>) {
s/\n//g;
my($mdomain,$mmax) = split(/=/);
if ($mdomain eq $domain) {
$maxmails = int($mmax);
}
}
close(CPM);
if ($maxmails > 0) {
my $nummailsinhour = readbacktodate("/usr/local/apache/domlogs/$domain-smtpbytes_log");
if ($nummailsinhour > $maxmails) {
die "You have exceeded the max emails per hour, your message has been discarded.\n";
}
}
open(DLOG,">>/usr/local/apache/domlogs/$domain-smtpbytes_log");
print DLOG "$now $message_size .\n";
close(DLOG);
chmod(0640,"/usr/local/apache/domlogs/$domain-smtpbytes_log");
}
#end logsmtpbw
It should be fairly straightforward to modify that to your own requirements. You will have to be careful of /scripts/upcp replacing exim.pl when upgrading.