May I suggest to modify the exim.pl to include the highlighted code?
It is because in a rare circumstances, user may simply use DirectAdmin main account to login the webmail, then the email sent out will become username@hostname , and finally it cannot count correctly in /etc/virtual/usage/
Note: Webmail runs under webapps identity.
----
Thank you very much for your kind attention.
Regards,
ccto.
It is because in a rare circumstances, user may simply use DirectAdmin main account to login the webmail, then the email sent out will become username@hostname , and finally it cannot count correctly in /etc/virtual/usage/
Note: Webmail runs under webapps identity.
----
Code:
sub find_uid_sender
{
my $sender_address = Exim::expand_string('$sender_address');
my ($user,$domain) = split(/\@/, $sender_address);
[COLOR="Red"] my $primary_hostname = Exim::expand_string('$primary_hostname');
if ( $domain eq $primary_hostname )
{
@pw = getpwnam($user);
return $pw[2];
}[/COLOR]
my $username = get_domain_owner($domain);
if ( (@pw = getpwnam($username)) )
{
return $pw[2];
}
return -1;
}
Thank you very much for your kind attention.
Regards,
ccto.