Hanno Hecker wrote on 15.09.2007 08:00:
On Fri, 14 Sep 2007 15:43:24 +0200
Ernesto <[EMAIL PROTECTED]> wrote:
*check_basicheaders_rfc*
"check_basicheaders_rfc - checks headers From and Date, assures
non-empty body"
Check your logs for lines like
"WARNING: body_size() is depreceated, use data_size() instead"
Currently body_size() does not give the size of the body, but the size
of what was sent after the DATA command. The body size is
$transaction->body_length()
(including the empty line between header and body).
Xanx, Hanno! I'm running the debian etch package providing qpsmtpd 0.32
only.
Here is the patch to make the plugin work with qpsmtpd 0.40:
--- snip ---
@@ -103,8 +103,10 @@
{
my ( $self, $transaction ) = @_;
+ my $data_size = $transaction->can ( 'data_size' ) ?
$transaction->data_size() : $transaction->body_size();
+
return ( DENY, "You have to send some data first" )
- if $transaction->body_size == 0;
+ if $data_size == 0;
return ( DENY, "Mail with no From header not accepted here" )
unless $transaction->header->get ( 'From' );
--- snip ---
I've uploaded it to my website. Please test.
Ernesto