diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-25 06:22:14 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-25 06:22:14 +0000 |
commit | 3c2b96ae3364a3bc206679f49a858f8fee505ba4 (patch) | |
tree | 7bbd532dc625beaa7ec0baaf6cfd0f7f5f890d20 | |
parent | 60966f2e9a50c1f0c1b40f1739e7475cb4a67825 (diff) | |
download | fetchmail-3c2b96ae3364a3bc206679f49a858f8fee505ba4.tar.gz fetchmail-3c2b96ae3364a3bc206679f49a858f8fee505ba4.tar.bz2 fetchmail-3c2b96ae3364a3bc206679f49a858f8fee505ba4.zip |
Another pass at making multidrop work OK.
svn path=/trunk/; revision=376
-rw-r--r-- | INSTALL | 3 | ||||
-rw-r--r-- | driver.c | 46 | ||||
-rw-r--r-- | fetchmail.man | 10 |
3 files changed, 34 insertions, 25 deletions
@@ -74,6 +74,9 @@ distributed with Pine from the University of Washington. Other POP3 servers have been known to give it indigestion. Test carefully! If you have problems, switch to imap. +If you're going to use multi-drop mailboxes, test with particular care. +This code was very difficult to test and should be considered experimental. + 6. USE IT Enjoy! @@ -349,32 +349,34 @@ struct idlist **xmit_names; /* list of recipient names parsed out */ return; else { - char *cp = nxtaddr(hdr), *lname; + char *cp, *lname; - do { - char *atsign = strchr(cp, '@'); + if ((cp = nxtaddr(hdr)) != (char *)NULL) + do { + char *atsign = strchr(cp, '@'); - if (atsign) - if (queryctl->norewrite) - continue; - else - { - if (!is_host_alias(atsign+1, - queryctl->servername, - queryctl->canonical_name)) + if (atsign) + if (queryctl->norewrite) continue; - atsign[0] = '\0'; + else + { + if (!is_host_alias(atsign+1, + queryctl->servername, + queryctl->canonical_name)) + continue; + atsign[0] = '\0'; + } + lname = idpair_find(&queryctl->localnames, cp); + if (lname != (char *)NULL) + { + if (outlevel == O_VERBOSE) + fprintf(stderr, + "fetchmail: mapped %s to local %s\n", + cp, lname); + save_uid(xmit_names, -1, lname); } - if ((lname = idpair_find(&queryctl->localnames, cp))!=(char *)NULL) - { - if (outlevel == O_VERBOSE) - fprintf(stderr, - "fetchmail: mapped %s to local %s\n", - cp, lname); - save_uid(xmit_names, -1, lname); - } - } while - ((cp = nxtaddr((char *)NULL)) != (char *)NULL); + } while + ((cp = nxtaddr((char *)NULL)) != (char *)NULL); } } #endif /* HAVE_GETHOSTBYNAME */ diff --git a/fetchmail.man b/fetchmail.man index 5cab1cf5..0cfb5af0 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -683,14 +683,18 @@ to the mailserver. This creates a risk that name/password pairs might be snaffled with a packet sniffer or more sophisticated monitoring software. .PP -Retrieval and forwarding from multi-drop server mailboxes is only as -reliable as your mail server host's DNS service. Each host +Retrieval and forwarding from multi-drop server mailboxes is at most +as reliable as your mail server host's DNS service. Each host address part in each message of a multi-drop mailbox is checked with .BR gethostbyname (2) to see if it's an alias of the mail server. If it is, but the lookup fails due to network congestion or a crashed server, forwarding -will not get done correctly. +will not get done correctly. Note: this check will \fInot\fR catch +equivalences created by MX records! +.PP +The multi-drop mailbox code was hard to test thoroughly and may have obscure +failure modes, especially in the presence of DNS flakiness. .PP Under Linux, if fetchmail is run in daemon mode with the network inaccessible, each poll leaves a socket allocated but in CLOSE state |