cvs commit: qpsmtpd/lib/Qpsmtpd SMTP.pm
[email protected] (Ask "Bj?rn" Hansen)
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 03/09/04 22:10:40
Modified: . Changes
lib/Qpsmtpd SMTP.pm
Log:
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.
Revision Changes Path
1.49 +8 -0 qpsmtpd/Changes
Index: Changes
===================================================================
RCS file: /cvs/public/qpsmtpd/Changes,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -w -r1.48 -r1.49
--- Changes 30 Aug 2003 15:14:39 -0000 1.48
+++ Changes 5 Sep 2003 05:10:40 -0000 1.49
@@ -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.
1.16 +4 -2 qpsmtpd/lib/Qpsmtpd/SMTP.pm
Index: SMTP.pm
===================================================================
RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/SMTP.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -r1.15 -r1.16
--- SMTP.pm 24 Jul 2003 12:43:02 -0000 1.15
+++ SMTP.pm 5 Sep 2003 05:10:40 -0000 1.16
@@ -353,7 +353,7 @@
# 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 @@
$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