From 891778b1759d8f671318434d7f32cbbe53feb406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Fri, 5 Sep 2003 05:10:40 +0000 Subject: [PATCH] Say Received: ... via ESMTP instead of via SMTP when the client speaks ESMTP. (Hoping this can be a useful SpamAssassin rule). Take out the X-SMTPD header. git-svn-id: https://svn.perl.org/qpsmtpd/trunk@171 958fd67b-6ff1-0310-b445-bb7760255be9 --- Changes | 8 ++++++++ lib/Qpsmtpd/SMTP.pm | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 7911cd9..5cf4372 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,13 @@ 0.27 + Say Received: ... via ESMTP instead of via SMTP when the client + speaks ESMTP. (Hoping this can be a useful SpamAssassin rule). + + Take out the X-SMTPD header. + + Add pod documentation and sanity checking of the config to + check_badmailfrom + Use $ENV{QMAIL} to override /var/qmail for where to find the control/ directory. diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 869b75e..977b076 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -353,7 +353,7 @@ sub data { # way a Received: line that is already in the header. $header->extract(\@header); - $header->add("X-SMTPD", "qpsmtpd/".$self->version.", http://develooper.com/code/qpsmtpd/"); + #$header->add("X-SMTPD", "qpsmtpd/".$self->version.", http://develooper.com/code/qpsmtpd/"); $buffer = ""; @@ -380,10 +380,12 @@ sub data { $self->transaction->header($header); + my $smtp = $self->connection->hello eq "ehlo" ? "ESMTP" : "SMTP"; + $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('%a, %d %b %Y %H:%M:%S %z', localtime)), + .") with $smtp; ". (strftime('%a, %d %b %Y %H:%M:%S %z', localtime)), 0); # if we get here without seeing a terminator, the connection is