header bugfixes
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@45 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
be25aa03e6
commit
0e638f4537
@ -334,14 +334,15 @@ sub data {
|
||||
}
|
||||
|
||||
if ($in_header) {
|
||||
#. ..
|
||||
$buffer .= $_;
|
||||
}
|
||||
else {
|
||||
$self->transaction->body_write($_);
|
||||
}
|
||||
|
||||
$self->transaction->body_write($_);
|
||||
|
||||
$size += length $_;
|
||||
}
|
||||
$self->log(5, "size is at $size\n") unless ($i % 300);
|
||||
#$self->log(5, "size is at $size\n") unless ($i % 300);
|
||||
|
||||
alarm $timeout;
|
||||
}
|
||||
@ -350,6 +351,12 @@ sub data {
|
||||
|
||||
$self->transaction->header($header);
|
||||
|
||||
$header->add("Received", "from ".$self->connection->remote_info
|
||||
." (HELO ".$self->connection->hello_host . ") (".$self->connection->remote_ip
|
||||
. ") by ".$self->config('me')." (qpsmtpd/".$self->version
|
||||
.") with SMTP; ". (strftime('%Y-%m-%d %TZ', gmtime)),
|
||||
0);
|
||||
|
||||
# if we get here without seeing a terminator, the connection is
|
||||
# probably dead.
|
||||
$self->respond(451, "Incomplete DATA"), return 1 unless $complete;
|
||||
@ -384,11 +391,7 @@ sub queue {
|
||||
close MESSAGE_READER or fault("close msg reader fault"),exit;
|
||||
close ENVELOPE_READER or fault("close envelope reader fault"), exit;
|
||||
|
||||
print MESSAGE_WRITER "Received: from ".$self->connection->remote_info
|
||||
." (HELO ".$self->connection->hello_host . ") (".$self->connection->remote_ip
|
||||
. ")\n by ".$self->config('me')." (qpsmtpd/".$self->version
|
||||
.") with SMTP; ". (strftime('%Y-%m-%d %TZ', gmtime)) . "\n";
|
||||
print MESSAGE_WRITER "X-smtpd: qpsmtpd/",$self->version,", http://develooper.com/code/qpsmtpd/\n";
|
||||
$transaction->header->add("X-SMTPD", "qpsmtpd/".$self->version.", http://develooper.com/code/qpsmtpd/");
|
||||
|
||||
$transaction->header->print(\*MESSAGE_WRITER);
|
||||
$transaction->body_resetpos;
|
||||
|
@ -43,6 +43,9 @@ sub check_spam {
|
||||
print SPAMD "YAREPORT SPAMC/1.0" . CRLF;
|
||||
# or CHECK or REPORT or SYMBOLS
|
||||
|
||||
print SPAMD join CRLF, split /\n/, $transaction->header->as_string;
|
||||
print SPAMD CRLF;
|
||||
|
||||
while (my $line = $transaction->body_getline) {
|
||||
chomp $line;
|
||||
print SPAMD $line, CRLF;
|
||||
|
Loading…
Reference in New Issue
Block a user