Cyber Sentry
Qmail Help Section
Perl Tutorial
Linux Command Line Help
Computer Resources

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.

 



Installation Questions
Post Install Questions:
Config Questions
General Qmail Questions
Bounced Email Questions
Spam / Virus prevention
Log Files
Qmail Error Messages
Problems with the Queue
Server Moves (hardware or IP changes)
Qmail Addons
Posting Questions to the Qmail Mailing List
General Email Questions


Copyright 2005 + 2006, Cyber Sentry Ltd, All Rights Reserved.
 

Cyber Sentry -- Application Development Sitemap 1 2 3