fetchmail-friends
[Top] [All Lists]

[fetchmail]Bug (and fix): invalid return path from MTA

2001-07-07 21:49:40
Hi, I want to report a possible bugm and suggest a fix which is working for me.

Problem:
  If an upstream MTA generates a return-path equal to "@", fetchmail uses it
  as the SMTP from value, causing an erroneous downstream MTA rejection.
  I've seen this on our system from commercial sites such as Amazon.com
  and Motorola.

  I'm no expert here, but in reading RFC821 I see no way that this is 
  a valid return path.  Nevertheless, some MTAs are generating it?
  I've done a google search and could not find any more explanation,
  so I am, um, leaving it in your capable hands...

Fix:
  Handle a return-path of "@" as an empty path:

*** sink.c      Sun Jul  1 20:19:17 2001
--- sink.c.new  Sat Jul  7 23:41:36 2001
***************
*** 619,626 ****
         * This is a potential problem if the MTAs further upstream
         * didn't pass canonicalized From/Return-Path lines, *and* the
         * local SMTP listener insists on them. 
         */
!       if (!msg->return_path[0])
        {
  #ifdef HAVE_SNPRINTF
            snprintf(addr, sizeof(addr),
--- 619,629 ----
         * This is a potential problem if the MTAs further upstream
         * didn't pass canonicalized From/Return-Path lines, *and* the
         * local SMTP listener insists on them. 
+        *
+        * Handle the case where an upstream MTA is using a return
+        * path equal to "@", as a wildcard (?).
         */
!       if (!msg->return_path[0] || (0 == strcmp(msg->return_path, "@")))
        {
  #ifdef HAVE_SNPRINTF
            snprintf(addr, sizeof(addr),


Background info:
    OS: FreeBSD 4.2-RELEASE
    compiler: gcc 2.95.2 19991024 (release)
    POP3 server greeting:
      5.5.6 querying mail.execpc.com (protocol POP3) at Sat Jul  7 23:05:53 2001
      POP3< +OK POPROX (version 1.1) at pop4.nwbl.wi.voyager.net starting.
    Fetchmail version/config:
      This is fetchmail release 5.8.11+NLS
      FreeBSD tabby.charles 4.2-RELEASE FreeBSD 4.2-RELEASE #1: Sun Jan  7 
00:11:03 CS
      T 2001     root(_at_)tabby(_dot_)charles:/usr/src/sys/compile/TABBY  i386
      Taking options from command line and /home/deaven/.fetchmailrc
      Poll interval is 300 seconds
      Idfile is /home/deaven/.fetchids
      Fetchmail will forward misaddressed multidrop messages to deaven.
      Fetchmail will direct error mail to the postmaster.
      Options for retrieving from deaven(_at_)mail(_dot_)execpc(_dot_)com:
          True name of server is mail.execpc.com.
          Protocol is POP3.
          All available authentication methods will be tried.
          Server nonresponse timeout is 300 seconds (default).
          Default mailbox selected.
          Only new messages will be retrieved (--all off).
          Fetched messages will not be kept on the server (--keep off).
          Old messages will not be flushed before message retrieval (--flush 
off).
          Rewrite of server-local addresses is disabled (--norewrite on).
          Carriage-return stripping is disabled (stripcr off).
          Carriage-return forcing is disabled (forcecr off).
          Interpretation of Content-Transfer-Encoding is enabled (pass8bits 
off).
          MIME decoding is disabled (mimedecode off).
          Idle after poll is disabled (idle off).
          Nonempty Status lines will be kept (dropstatus off)
          Delivered-To lines will be kept (dropdelivered off)
          Messages will be SMTP-forwarded to: localhost (default)
          Recognized listener spam block responses are: 571 550 501 554
          Single-drop mode: 1 local name(s) recognized.
          No UIDs saved from this host.
  


<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]Bug (and fix): invalid return path from MTA, David Deaven <=