Qmail allows you to override the databytes control file (which
sets the maximum message size accepted) with an environment
variable:
http://www.qmail.org/man/man8/qmail-smtpd.html
Qpsmtpd should do the same (and it would allow us to reset
$ENV{DATABYTES} in plugins to allow larger messages to or from
certain addresses).
Attached is a patch to SMTP.pm.
--
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC
Index: lib/Qpsmtpd/SMTP.pm
===================================================================
RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/SMTP.pm,v
retrieving revision 1.19
diff -u -r1.19 SMTP.pm
--- lib/Qpsmtpd/SMTP.pm 4 Nov 2003 22:52:49 -0000 1.19
+++ lib/Qpsmtpd/SMTP.pm 8 Nov 2003 02:50:29 -0000
@@ -166,11 +166,13 @@
? @{ $self->transaction->notes('capabilities') }
: ();
+ my $databytes = defined($ENV{DATABYTES}) ? $ENV{DATABYTES} :
+ ($self->config('databytes'))[0];
$self->respond(250,
$self->config("me") . " Hi " . $conn->remote_info . " [" .
$conn->remote_ip ."]",
"PIPELINING",
"8BITMIME",
- ($self->config('databytes') ? "SIZE ".
($self->config('databytes'))[0] : ()),
+ ($databytes ? "SIZE $databytes" : ()),
@capabilities,
);
}
@@ -318,7 +320,8 @@
my $buffer = '';
my $size = 0;
my $i = 0;
- my $max_size = ($self->config('databytes'))[0] || 0; # this should work in scalar
context
+ my $max_size = defined($ENV{DATABYTES}) ? $ENV{DATABYTES} :
+ ($self->config('databytes'))[0] || 0; # this should work in scalar context
my $blocked = "";
my %matches;
my $in_header = 1;