[pkg-fetchmail-maint] Bug#272289: marked as done (fetchmail sends a double @ to the SMTP server on MAIL FROM)

Debian Bug Tracking System owner at bugs.debian.org
Fri Jan 13 14:03:15 UTC 2006


Your message dated Fri, 13 Jan 2006 14:47:51 +0100
with message-id <43C7AF87.mail4OB11VC7V at merlin.emma.line.org>
and subject line close fixed bug.
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 19 Sep 2004 02:00:59 +0000
>From cesarb at nitnet.com.br Sat Sep 18 19:00:59 2004
Return-path: <cesarb at nitnet.com.br>
Received: from salzburg.nitnet.com.br (nat.cesarb.net) [200.157.204.105] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1C8r0c-0003SX-00; Sat, 18 Sep 2004 19:00:59 -0700
Received: from cesarb by flower.home.cesarb.net with local (Exim 4.34)
	id 1C8qwB-0003rM-7M; Sat, 18 Sep 2004 22:56:23 -0300
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Cesar Eduardo Barros <cesarb at nitnet.com.br>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: fetchmail sends a double @ to the SMTP server on MAIL FROM
X-Mailer: reportbug 2.63
Date: Sat, 18 Sep 2004 22:56:23 -0300
Message-Id: <E1C8qwB-0003rM-7M at flower.home.cesarb.net>
Sender: Cesar Eduardo Barros <cesarb at nitnet.com.br>
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: fetchmail
Version: 6.2.5-10
Severity: normal
Tags: patch

When you have a username with an @ on it and fetchmail is unable to
determine the envelope sender, it generates a bogus envelope sender with
two @, which exim4 rejects (and then fetchmail happily goes on and
delete the original message).

poll server with proto IMAP
        user 'foo at bar' there with password '*' is 'foo' here fetchall

would generate a bogus MAIL FROM:<foo at bar@server> whenever a email with
an empty From: is found.

I looked at the code and produced a patch to fix it. I think the patch
follows the intention of the original code (to produce something the MTA
would accept if the original couldn't be found). The patch simply avoids
appending the server name if the username already looks like a valid
email address (the if was copied from a few lines below, and originally
was used to check if the server name should be appended to the return
path).

 sink.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

--- fetchmail-6.2.5.orig/sink.c	2004-09-18 21:53:33.000000000 -0300
+++ fetchmail-6.2.5/sink.c	2004-09-18 22:24:26.000000000 -0300
@@ -870,7 +870,16 @@
      */
     if (!msg->return_path[0] || (msg->return_path[0] == '@'))
     {
-      if (is_dottedquad(ctl->server.truename))
+      if (strchr(ctl->remotename,'@') || strchr(ctl->remotename,'!'))
+      {
+#ifdef HAVE_SNPRINTF
+	snprintf(addr, sizeof(addr),
+#else
+	sprintf(addr,
+#endif /* HAVE_SNPRINTF */
+	      "%s", ctl->remotename);
+      }
+      else if (is_dottedquad(ctl->server.truename))
       {
 #ifdef HAVE_SNPRINTF
 	snprintf(addr, sizeof(addr),

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.1-flower
Locale: LANG=C, LC_CTYPE=en_US.UTF-8

Versions of packages fetchmail depends on:
ii  adduser                     3.59         Add and remove users and groups
ii  base-files                  3.1          Debian base system miscellaneous f
ii  debconf                     1.4.30.5     Debian configuration management sy
ii  debianutils                 2.8.4        Miscellaneous utilities specific t
ii  libc6                       2.3.2.ds1-16 GNU C Library: Shared libraries an
ii  libssl0.9.7                 0.9.7d-4     SSL shared libraries

-- debconf information excluded

---------------------------------------
Received: (at 272289-done) by bugs.debian.org; 13 Jan 2006 13:48:26 +0000
>From matthias.andree at gmx.de Fri Jan 13 05:48:26 2006
Return-path: <matthias.andree at gmx.de>
Received: from mail.gmx.de ([213.165.64.21] helo=mail.gmx.net)
	by spohr.debian.org with smtp (Exim 4.50)
	id 1ExPI1-0006ch-Qg
	for 272289-done at bugs.debian.org; Fri, 13 Jan 2006 05:48:26 -0800
Received: (qmail invoked by alias); 13 Jan 2006 13:47:54 -0000
Received: from p509143BD.dip0.t-ipconnect.de (EHLO m2a2.dyndns.org) [80.145.67.189]
  by mail.gmx.net (mp010) with SMTP; 13 Jan 2006 14:47:54 +0100
X-Authenticated: #428038
Received: from localhost (localhost [127.0.0.1])
	by merlin.emma.line.org (Postfix) with ESMTP id ACA6A200A91;
	Fri, 13 Jan 2006 14:47:53 +0100 (CET)
Received: from m2a2.dyndns.org ([127.0.0.1])
 by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 31793-17; Fri, 13 Jan 2006 14:47:51 +0100 (CET)
Received: by merlin.emma.line.org (Postfix, from userid 500)
	id 64E03200A98; Fri, 13 Jan 2006 14:47:51 +0100 (CET)
Date: Fri, 13 Jan 2006 14:47:51 +0100
To: 272289-done at bugs.debian.org, control at bugs.debian.org
Subject: close fixed bug.
Message-ID: <43C7AF87.mail4OB11VC7V at merlin.emma.line.org>
User-Agent: nail 11.4 8/29/04
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: matthias.andree at gmx.de (Matthias Andree)
X-Virus-Scanned: amavisd-new at emma.line.org
X-Y-GMX-Trusted: 0
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-4.0 required=4.0 tests=BAYES_00,RCVD_IN_SORBS,
	VALID_BTS_CONTROL autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 2

tags 272278 fixed-upstream
thanks

Fixed in 6.3.1-1.



More information about the pkg-fetchmail-maint mailing list