Hi,

because the web archive (http://nntp.perl.org/group/perl.qpsmtpd) is
currently down I couldn't check if this was discussed before or how to
submit patches/feature requests..

My "problem": I want to see in the headers whether a mail was received
with TLS.
Please notice that I'm not a perl-guru before looking over my patch ;)

btw: why isn't qsmtpd using \t for the Received-header?


--- tls 2006-02-26 13:22:16.000000000 +0100
+++ /tmp/tls    2007-02-01 22:40:44.000000000 +0100
@@ -110,6 +110,8 @@
         $self->qp->reset_transaction;
         *STDIN = *STDOUT = $self->connection->notes('tls_socket',
$tlssocket);
         $self->connection->notes('tls_enabled', 1);
+       my $receivednotes = $self->connection->notes('Received') ?
$self->connection->notes('Received') : "";
+       $self->connection->notes('Received', $receivednotes .
"\n\t(using secured channel)");
     };
     if ($@) {
         # SSL setup failed. Now we must respond to every command with 5XX


--- SMTP.pm     2006-02-26 13:22:16.000000000 +0100
+++ /tmp/SMTP.pm        2007-02-01 22:40:07.000000000 +0100
@@ -534,11 +534,11 @@
   my $authheader = (defined $self->{_auth} and $self->{_auth} == OK) ?
     "(smtp-auth username $self->{_auth_user}, mechanism
$self->{_auth_mechanism})\n" : "";

+  my $receivednotes = $self->connection->notes('Received') ?
$self->connection->notes('Received') : "";
   $header->add("Received", "from ".$self->connection->remote_info
                ." (HELO ".$self->connection->hello_host . ")
(".$self->connection->remote_ip
-               . ")\n  $authheader  by ".$self->config('me')."
(qpsmtpd/".$self->version
-               .") with $smtp; ". (strftime('%a, %d %b %Y %H:%M:%S %z',
localtime)),
-               0);
+               . ")". $receivednotes ."\n  $authheader  by
".$self->config('me')." (qpsmtpd/".$self->version
+               .") with $smtp; ". (strftime('%a, %d %b %Y %H:%M:%S %z',
localtime)), 0);

   # if we get here without seeing a terminator, the connection is
   # probably dead.


-- 
Jens


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to