| Can you have per domain quotas and DATABYTES settings? |
 |
 |
 |
You can either implement size limits for each mailboxin the domain by using the details at:
marc.theaimsgroup.com or install the QMAILQUEUE patch, qmail-qfilter and createa filter:
#!/usr/bin/perl
my %databytes = (
"example.net" => 5 * 1024 * 1024,
"example.com" => 10 * 1024 * 1024,
);
if (FD, ";
close(FD);
}
foreach my $rcpt (split(/\n/, $ENV{QMAILRCPTS})) {
my $domain = lc $rcpt;
$domain =~ s/.*@//;
if ($databytes{$domain} && $databytes{$domain} < (stat STDIN)[7]) {
exit 31;
}
}
print or exit 53 while(<>)
;close(STDOUT) or exit 53;
The drawback of this last approach is that the client will always receive the not so informative reject message:
554 mail server permanently rejected message (#5.3.0)
Note that DATABYTES must always be larger than any values used on a per domain basis, and a single mail to multiple different domains will be constrained to the smallest databytes value of the destination domains.

|