Re: Feature: add custom notes to received-header

2007-02-02 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Isn't TLS shown as "Received: ... with ESMTPS", as in the patch which 
> Michael Toren contributed recently after I asked for SMTPA: 
> http://beta.nntp.perl.org/group/perl.qpsmtpd/2007/01/msg6065.html
> though unfortunately the list archives don't include attachments :-(
> 
> Did it make it into svn yet ?  I confess I've not had time to try the SMTPA 
> bit of it out as I said I would.  Will install it later on and check.

It made it in - r703 of the 0.3x branch.

Regards

James Turnbull

- --
James Turnbull <[EMAIL PROTECTED]>
- ---
Author of Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)

Hardening Linux
(http://www.amazon.com/gp/product/159059/)
- ---
PGP Key (http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x0C42DF40)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFw7pn9hTGvAxC30ARAoV5AJ97enKQd1Sf63u9ZvbTYImolk280ACgwNH+
yfQz4vOvwb8KMIeI2L3GMKQ=
=c7CV
-END PGP SIGNATURE-


Re: Feature: add custom notes to received-header

2007-02-02 Thread John Peacock

Jens Weibler wrote:

tls was last updated last year - over 12 months ago
(http://svn.perl.org/viewcvs/qpsmtpd/trunk/plugins/tls?view=log)


Don't look at trunk; most recent development is on branches/0.3x:

http://svn.perl.org/viewcvs/qpsmtpd/branches/0.3x/plugins/tls?view=log

But the place that the header actually gets generated is in 
Qpsmtpd::SMTP, where we already add a header with the appropriate info:


http://svn.perl.org/viewcvs/qpsmtpd/branches/0.3x/lib/Qpsmtpd/SMTP.pm?rev=704


  if (defined $self->connection->notes('tls_enabled')
  and $self->connection->notes('tls_enabled')) {
$smtp .= "S" if $esmtp; # RFC3848
$sslheader = "(".$self->connection->notes('tls_socket')->get_cipher()." 
encrypted) ";
  }

  if (defined $self->{_auth} and $self->{_auth} == OK) {
$smtp .= "A" if $esmtp; # RFC3848
$authheader = "(smtp-auth username $self->{_auth_user}, mechanism 
$self->{_auth_mechanism})\n";
  }

  $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 $sslheader$smtp; ". (strftime('%a, %d %b %Y %H:%M:%S 
%z', localtime)),
   0);



John


Re: Feature: add custom notes to received-header

2007-02-02 Thread Jens Weibler
Nick Leverton wrote:
> On Friday 02 February 2007 07:02, Robert Spier wrote:
>   
>> Tabs are evil.  Sure, they're valid, but lets avoid spreading them.
>>
>> If we're going to add TLS information to the header then lets do it in
>> a way that's compatible with other mailers.  (i.e. do what sendmail or
>> postfix does)
>> 
>
> Isn't TLS shown as "Received: ... with ESMTPS", as in the patch which 
> Michael Toren contributed recently after I asked for SMTPA: 
> http://beta.nntp.perl.org/group/perl.qpsmtpd/2007/01/msg6065.html
> though unfortunately the list archives don't include attachments :-(
>
> Did it make it into svn yet ?  I confess I've not had time to try the SMTPA 
> bit of it out as I said I would.  Will install it later on and check.
>   
tls was last updated last year - over 12 months ago
(http://svn.perl.org/viewcvs/qpsmtpd/trunk/plugins/tls?view=log)
But ok - I wasn't aware of rfc3848.

Postfix TLS headers:

Received: from abc.def.domain.de (abc.def.tu-darmstadt.de [130.83.164.XXX])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by xyz.domain.de (Postfix) with ESMTP id 
for <[EMAIL PROTECTED]>; Fri, 26 Jan 2007 11:25:20 +0100 (CET)


I don't know how to get the cipher for a connection - anyone got a clue
how to do this?

-- 
Jens




signature.asc
Description: OpenPGP digital signature


Re: Feature: add custom notes to received-header

2007-02-02 Thread Nick Leverton
On Friday 02 February 2007 07:02, Robert Spier wrote:
> Tabs are evil.  Sure, they're valid, but lets avoid spreading them.
>
> If we're going to add TLS information to the header then lets do it in
> a way that's compatible with other mailers.  (i.e. do what sendmail or
> postfix does)

Isn't TLS shown as "Received: ... with ESMTPS", as in the patch which 
Michael Toren contributed recently after I asked for SMTPA: 
http://beta.nntp.perl.org/group/perl.qpsmtpd/2007/01/msg6065.html
though unfortunately the list archives don't include attachments :-(

Did it make it into svn yet ?  I confess I've not had time to try the SMTPA 
bit of it out as I said I would.  Will install it later on and check.

Nick


Re: Feature: add custom notes to received-header

2007-02-01 Thread Robert Spier

Tabs are evil.  Sure, they're valid, but lets avoid spreading them.

If we're going to add TLS information to the header then lets do it in
a way that's compatible with other mailers.  (i.e. do what sendmail or
postfix does)

-R

At Thu, 01 Feb 2007 22:49:02 +0100,
Jens Weibler wrote:
> 
> [1  ]
> 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.0 +0100
> +++ /tmp/tls2007-02-01 22:40:44.0 +0100
> @@ -110,6 +110,8 @@
>  $self->qp->reset_transaction;
>  *STDIN = *STDOUT = $self->connection->notes('tls_socket',
h> $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.0 +0100
> +++ /tmp/SMTP.pm2007-02-01 22:40:07.0 +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
> 
> 
> [2 OpenPGP digital signature ]
> 


Re: Feature: add custom notes to received-header

2007-02-01 Thread Ask Bjørn Hansen


On Feb 1, 2007, at 13:49, Jens Weibler wrote:


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..


Hi Jens,

Yeah - it seems like that particular server finally went kaboom (it's  
had a bad disk for years).
http://beta.nntp.perl.org/group/perl.qpsmtpd will soon be  
www.nntp.perl.org.


To submit bug reports etc: http://code.google.com/p/smtpd/issues/list

I'll defer your actual question to John.  :-)


 - ask

--
http://develooper.com/ - http://askask.com/




Feature: add custom notes to received-header

2007-02-01 Thread Jens Weibler
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.0 +0100
+++ /tmp/tls2007-02-01 22:40:44.0 +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.0 +0100
+++ /tmp/SMTP.pm2007-02-01 22:40:07.0 +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




signature.asc
Description: OpenPGP digital signature