I think we discussed this before but I can't see it in the archives at the 
moment.

Can qpsmtpd change its Received header from "with ESMTP" to "with ESMTPA" 
when SMTP auth is in use please ?  This will let SpamAssassin recognise 
the auth header without any other changes.

I've attached a tested patch against SVN and I'd be very pleased to see 
something similar included.  You should see the result in the headers of 
this message :)

Nick
=== lib/Qpsmtpd/SMTP.pm
==================================================================
--- lib/Qpsmtpd/SMTP.pm	(revision 2820)
+++ lib/Qpsmtpd/SMTP.pm	(local)
@@ -658,10 +658,14 @@
   $self->transaction->header($header);
 
   my $smtp = $self->connection->hello eq "ehlo" ? "ESMTP" : "SMTP";
+  my $authheader = "";
+  if (defined $self->{_auth} and $self->{_auth} == OK) {
+    $smtp .= "A";
+    $authheader = "(smtp-auth username $self->{_auth_user}, mechanism $self->{_auth_mechanism})\n";
+  }
+
   my $sslheader = (defined $self->connection->notes('tls_enabled') and $self->connection->notes('tls_enabled')) ? 
     "(".$self->connection->notes('tls_socket')->get_cipher()." encrypted) " : "";
-  my $authheader = (defined $self->{_auth} and $self->{_auth} == OK) ?
-    "(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

Reply via email to