From 19580930369179181789233ab2f311530d65edf1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 7 Feb 2001 08:01:13 +0000 Subject: First cut at ODMR support. svn path=/trunk/; revision=3028 --- Makefile.in | 23 ++++----- NEWS | 1 + README | 5 +- acconfig.h | 3 ++ conf.c | 3 ++ configure.in | 7 +++ env.c | 3 ++ fetchmail-FAQ.html | 13 +++-- fetchmail-features.html | 6 ++- fetchmail.c | 47 ++++++++++++------ fetchmail.h | 2 + fetchmail.man | 66 +++++++++++++++---------- fetchmailconf | 18 +++++-- imap.c | 129 +----------------------------------------------- rcfile_l.l | 1 + smtp.c | 3 ++ smtp.h | 1 + 17 files changed, 138 insertions(+), 193 deletions(-) diff --git a/Makefile.in b/Makefile.in index 65730bb1..cead2d1e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -95,8 +95,8 @@ ETAGS = etags CTAGS = ctags protobjs = rcfile_y.o rcfile_l.o socket.o getpass.o pop2.o pop3.o imap.o \ - etrn.o fetchmail.o idle.o env.o options.o daemon.o driver.o sink.o \ - rfc822.o smtp.o xmalloc.o uid.o mxget.o md5ify.o rpa.o \ + etrn.o odmr.o fetchmail.o idle.o env.o options.o daemon.o driver.o \ + sink.o rfc822.o smtp.o xmalloc.o uid.o mxget.o md5ify.o cram.o rpa.o \ interface.o netrc.o base64.o error.o unmime.o conf.o checkalias.o \ smbdes.o smbencrypt.o smbmd4.o smbutil.o ipv6-connect.o @@ -104,15 +104,16 @@ objs = $(protobjs) $(extras) $(EXTRAOBJ) srcs = $(srcdir)/socket.c $(srcdir)/getpass.c $(srcdir)/pop2.c \ $(srcdir)/pop3.c $(srcdir)/imap.c $(srcdir)/etrn.c \ - $(srcdir)/fetchmail.c $(srcdir)/env.c $(srcdir)/idle.c \ - $(srcdir)/options.c $(srcdir)/daemon.c $(srcdir)/driver.c \ - $(srcdir)/sink.c $(srcdir)/rfc822.c $(srcdir)/smtp.c \ - $(srcdir)/xmalloc.c $(srcdir)/uid.c $(srcdir)/mxget.c \ - $(srcdir)/md5ify.c $(srcdir)/rpa.c $(srcdir)/interface.c \ - $(srcdir)/netrc.c $(srcdir)/base64.c $(srcdir)/error.c \ - $(srcdir)/unmime.c $(srcdir)/conf.c $(srcdir)/checkalias.c \ - $(srcdir)/smbdes.c $(srcdir)/smbencrypt.c $(srcdir)/smbmd4.c \ - $(srcdir)/smbutil.c $(srcdir)/ipv6-connect.c + $(srcdir)/odmr.c $(srcdir)/fetchmail.c $(srcdir)/env.c \ + $(srcdir)/idle.c $(srcdir)/options.c $(srcdir)/daemon.c \ + $(srcdir)/driver.c $(srcdir)/sink.c $(srcdir)/rfc822.c \ + $(srcdir)/smtp.c $(srcdir)/xmalloc.c $(srcdir)/uid.c \ + $(srcdir)/mxget.c $(srcdir)/md5ify.c $(srcdir)/cram.c \ + $(srcdir)/rpa.c $(srcdir)/interface.c $(srcdir)/netrc.c \ + $(srcdir)/base64.c $(srcdir)/error.c $(srcdir)/unmime.c \ + $(srcdir)/conf.c $(srcdir)/checkalias.c $(srcdir)/smbdes.c \ + $(srcdir)/smbencrypt.c $(srcdir)/smbmd4.c $(srcdir)/smbutil.c \ + $(srcdir)/ipv6-connect.c .SUFFIXES: .SUFFIXES: .o .c .h .y .l .ps .dvi .info .texi diff --git a/NEWS b/NEWS index 4309c30d..3e2782d7 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ set when it should not have been (several reports). * FAQ change: mailing lists have moved to MailMan. * Deal with brain-dead netmind mail missing the RFC822 delimiter line. +* ODMR (RFC 2645) support -- untested! fetchmail-5.6.2 (Fri Jan 5 16:45:47 EST 2001), 19744 lines: diff --git a/README b/README index 44fb3890..b31037d5 100644 --- a/README +++ b/README @@ -11,8 +11,9 @@ fetchmail supports all standard mail-retrieval protocols in use on the Internet: POP2, POP3 (including POP3 with RFC1938 one-time passwords), RPOP, APOP, KPOP, Compuserve's POP3 with RPA, Microsoft's NTLM, Demon Internet's SDPS, all flavors of IMAP (including IMAP4rev1 with RFC1731 -Kerberos v4 or GSSAPI authentication or CRAM-MD5 authentication), and -ESMTP ETRN. Fetchmail also supports end-to-end encryption with OpenSSL. +Kerberos v4 or GSSAPI authentication or CRAM-MD5 authentication), +ESMTP ETRN, and ODMR. Fetchmail also supports end-to-end encryption with +OpenSSL. The fetchmail code was developed under Linux, but has also been extensively tested under the BSD variants, AIX, HP-UX versions 9 and diff --git a/acconfig.h b/acconfig.h index 7869b074..8ffc9d28 100644 --- a/acconfig.h +++ b/acconfig.h @@ -95,6 +95,9 @@ /* Define if you want ETRN support compiled in */ #undef ETRN_ENABLE +/* Define if you want ODMR support compiled in */ +#undef ODMR_ENABLE + /* Define if you want RPA support compiled in */ #undef RPA_ENABLE diff --git a/conf.c b/conf.c index 0de4c2a8..d2446392 100644 --- a/conf.c +++ b/conf.c @@ -169,6 +169,9 @@ void dump_config(struct runctl *runp, struct query *querylist) #ifdef ETRN_ENABLE printf("'etrn',"); #endif /* ETRN_ENABLE */ +#ifdef ODMR_ENABLE + printf("'odmr',"); +#endif /* ODMR_ENABLE */ #ifdef SSL_ENABLE printf("'ssl',"); #endif /* SSL_ENABLE */ diff --git a/configure.in b/configure.in index 1d8dcdd5..f692fce7 100644 --- a/configure.in +++ b/configure.in @@ -265,6 +265,13 @@ AC_ARG_ENABLE(ETRN, [with_ETRN=yes]) test "$with_ETRN" = "yes" && AC_DEFINE(ETRN_ENABLE) +### use option --disable-ODMR to omit the ODMR support +AC_ARG_ENABLE(ODMR, + [ --disable-ODMR don't compile in ODMR protocol support], + [with_ODMR=$enableval], + [with_ODMR=yes]) +test "$with_ODMR" = "yes" && AC_DEFINE(ODMR_ENABLE) + ### use option --enable-RPA to compile in the RPA support AC_ARG_ENABLE(RPA, [ --enable-RPA compile in RPA protocol support], diff --git a/env.c b/env.c index 1ea8895c..7aad7d52 100644 --- a/env.c +++ b/env.c @@ -215,6 +215,9 @@ const char *showproto(int proto) case P_APOP: return("APOP"); case P_RPOP: return("RPOP"); case P_ETRN: return("ETRN"); +#ifdef ODMR_ENABLE + case P_ODMR: return("ODMR"); +#endif /* ODMR_ENABLE */ default: return("unknown?!?"); } } diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html index edc2a455..e0f47e9a 100644 --- a/fetchmail-FAQ.html +++ b/fetchmail-FAQ.html @@ -10,7 +10,7 @@
Back to Fetchmail Home Page To Site Map -$Date: 2001/02/07 04:10:02 $ +$Date: 2001/02/07 08:01:08 $

Frequently Asked Questions About Fetchmail

@@ -357,7 +357,7 @@ The short answer: IMAP4rev1 running over Unix.

Here's a longer answer:

-Fetchmail will work with any POP, IMAP, or ESMTP/ETRN server that +Fetchmail will work with any POP, IMAP, ETRN, or ODMR server that conforms to the relevant RFCs (and even some outright broken ones like Microsoft Exchange and Novell GroupWise). This doesn't mean it works equally well with all, @@ -561,6 +561,11 @@ accept mail for your domain but then queue it to forward to your machine. ETRN just tells to server to flush its queue for your domain. Fetchmail doesn't actually get the mail in that case.

+You can use On-Demand Mail Relay (ODMR) with a dynamic IP address; +that's what it was designed for, and it provides capabilities very +similar to ETRN. Unfortunately ODMR servers are not yet widely +deployed, as of early 2001.

+ If you're using a dynamic-IP configuration, one other (non-fetchmail) problem you may run into with outgoing mail is that some sites will bounce your email because the hostname your giving them isn't real @@ -2298,7 +2303,7 @@ server mailbox and then routing based on what's in the To/Cc/Bcc lines.

In general, this is not really a good idea. It would be smarter to just let the mail sit in the mailserver's queue and use fetchmail's -ETRN mode to trigger SMTP sends periodically (of course, this means +ETRN or ODMR modes to trigger SMTP sends periodically (of course, this means you have to poll more frequently than the mailserver's expiration period). If you can't arrange this, try setting up a UUCP feed.

@@ -2986,7 +2991,7 @@ switching to IMAP and using a short expunge interval.

Back to Fetchmail Home Page To Site Map -$Date: 2001/02/07 04:10:02 $ +$Date: 2001/02/07 08:01:08 $

Eric S. Raymond <esr@snark.thyrsus.com>
diff --git a/fetchmail-features.html b/fetchmail-features.html index ae49ebef..5f441727 100644 --- a/fetchmail-features.html +++ b/fetchmail-features.html @@ -10,7 +10,7 @@
Back to Fetchmail Home Page To Site Map -$Date: 2000/12/06 17:42:20 $ +$Date: 2001/02/07 08:01:08 $

@@ -18,6 +18,8 @@

Since 5.0: