]> Pileus Git - ~andy/fetchmail/commitdiff
Preliminary UNTESTED workaround for SDPS null envfrom (Debian Bug#353575).
authorMatthias Andree <matthias.andree@gmx.de>
Wed, 22 Feb 2006 09:48:41 +0000 (09:48 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Wed, 22 Feb 2006 09:48:41 +0000 (09:48 -0000)
svn path=/branches/BRANCH_6-3/; revision=4694

pop3.c

diff --git a/pop3.c b/pop3.c
index d3bba8d53992f6a036c02fb044fd8f9c63aaa1b7..b7054de09561aacc4e460fdd14aee65bbfef2359 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -1129,8 +1129,9 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp)
 
 #ifdef SDPS_ENABLE
     /*
-     * See http://www.demon.net/services/mail/sdps-tech.html
+     * See http://www.demon.net/helpdesk/producthelp/mail/sdps-tech.html/
      * for a description of what we're parsing here.
+     * -- updated 2006-02-22
      */
     if (ctl->server.sdps)
     {
@@ -1148,6 +1149,11 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp)
            switch (linecount) {
            case 4:
                /* No need to wrap envelope from address */
+               /* FIXME: some parts of fetchmail don't handle null
+                * envelope senders, so use <> to mark null sender
+                * as a workaround. */
+               if (strspn(buf, " \t") == strlen(buf))
+                   strcpy(buf, "<>");
                sdps_envfrom = xmalloc(strlen(buf)+1);
                strcpy(sdps_envfrom,buf);
                break;