aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2002-10-18 10:20:44 +0000
committerEric S. Raymond <esr@thyrsus.com>2002-10-18 10:20:44 +0000
commitba67703a83775ce97c7002a46961b4a3c1ae9fe2 (patch)
treeb9cbd875c96bc74f906fad561ed8e6095c38ce11
parent229ddf4336f2f7c8135990f48c76f8ac771d8f3d (diff)
downloadfetchmail-ba67703a83775ce97c7002a46961b4a3c1ae9fe2.tar.gz
fetchmail-ba67703a83775ce97c7002a46961b4a3c1ae9fe2.tar.bz2
fetchmail-ba67703a83775ce97c7002a46961b4a3c1ae9fe2.zip
OTP fix patches from Stanislav Brabec.
svn path=/trunk/; revision=3735
-rw-r--r--NEWS2
-rw-r--r--conf.c2
-rw-r--r--fetchmail-FAQ.html39
-rwxr-xr-xfetchmailconf2
-rw-r--r--options.c4
-rw-r--r--pop3.c26
-rw-r--r--rcfile_l.l1
7 files changed, 58 insertions, 18 deletions
diff --git a/NEWS b/NEWS
index a78a250f..7e080500 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
(The `lines' figures total .c, .h, .l, and .y files under version control.)
+* OTP fix patches from Stanislav Brabec <utx@penguin.cz>
+
fetchmail-6.1.0 (Sun Sep 22 18:31:23 EDT 2002), 21999 lines:
* Updated French translation.
diff --git a/conf.c b/conf.c
index 089bb93a..4681523f 100644
--- a/conf.c
+++ b/conf.c
@@ -294,6 +294,8 @@ void dump_config(struct runctl *runp, struct query *querylist)
stringdump("auth", "kerberos_v5");
else if (ctl->server.authenticate == A_SSH)
stringdump("auth", "ssh");
+ else if (ctl->server.authenticate == A_OTP)
+ stringdump("auth", "otp");
#if defined(HAVE_GETHOSTBYNAME) && defined(HAVE_RES_SEARCH)
booldump("dns", ctl->server.dns);
diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html
index 844f95aa..0bdea96c 100644
--- a/fetchmail-FAQ.html
+++ b/fetchmail-FAQ.html
@@ -16,7 +16,7 @@ content="Frequently asked questions about fetchmail."/>
Page</a></td>
<td width="30%" align="center">To <a href="/~esr/sitemap.html">Site
Map</a></td>
-<td width="30%" align="right">$Date: 2002/09/17 09:15:33 $</td>
+<td width="30%" align="right">$Date: 2002/10/18 10:20:44 $</td>
</tr>
</table>
@@ -2993,21 +2993,34 @@ this has the side effect of forcing RETR use.</p>
<h2><a id="X6" name="X6">X6. My mail attachments are being dropped
or mangled.</a></h2>
-<p>This isn't fetchmail's doing -- fetchmail never drops lines in
-message bodies or attachments. It may be your POP server, or it may
-be the sender's mail user agent (or a bad combination of both).</p>
+<p>Fetchmail doesn't discard attachments; fetchmail doesn't have any idea
+that attachments are there. Fetchmail treats the body of each message as
+an uninterpreted byte stream and passes it through without alteration.
+If you are not receiving attachments through fetchmail, it is because
+your mailserver is not sending them to you.</p>
-<p>The Mail Max POP3 server and the InterChange and Imail IMAP
-servers are known to simply drop MIME attachments when uploading
-messages. We've had sporadic reports of problems with Microsoft
-Exchange and Outlook servers. Windows- and NT-based POP servers
+<p>The fix for this is to replace your mailserver with one that works.
+If its operating system makes this difficult, you should replace its
+operating system with one that works. Windows- and NT-based POP servers
seem especially prone to mangle attachments. If you are running one
of these, replacing your server with a Unix machine is probably the
only effective solution.</p>
+<p>We've had sporadic reports of problems with Microsoft Exchange and
+Outlook servers. These sometimes randomly fail to ship
+attachments to your client. They may also mangle the attachments
+they do pass through. If you see unreadable attachments with a
+ContentType of "application/x-tnef", you're having this problem.
+The <a href="http://world.std.com/~damned/software.html">TNEF</a>
+utility may help.</p>
+
+<p>The Mail Max POP3 server and the InterChange and Imail IMAP
+servers are known to simply drop MIME attachments when uploading
+messages.</p>
+
<p>We've also had a report that Lotus Notes sometimes trashes the
MIME type of messages. In particular, it seems to modify MIME
-headers introducing type application/pdf, mangling the type to
+headers of type application/pdf, mangling the type to
application/octet-stream. It may corrupt other MIME types as
well.</p>
@@ -3023,12 +3036,6 @@ the MIME parts in the body. This doesn't work. (I have heard a
rumor that this bug is scheduled to be fixed in Domino release 6;
you can find a workaround at contrib/domino.)</p>
-<p>Another rich source of attachment problems is Microsoft Exchange
-and Microsoft Outlook. If you see unreadable attachments with a
-ContentType of "application/x-tnef", you're having this problem.
-The <a href="http://world.std.com/~damned/software.html">TNEF</a>
-utility may help.</p>
-
<p>Rob Funk explains: Unfortunately there also remain many mail
user agents that don't write correct MIME messages. One big
offender is Sun MailTool attachments, which are formatted enough
@@ -3419,7 +3426,7 @@ the received date from the last Received header.</p>
Page</a></td>
<td width="30%" align="center">To <a href="/~esr/sitemap.html">Site
Map</a></td>
-<td width="30%" align="right">$Date: 2002/09/17 09:15:33 $</td>
+<td width="30%" align="right">$Date: 2002/10/18 10:20:44 $</td>
</tr>
</table>
diff --git a/fetchmailconf b/fetchmailconf
index 2afe5b33..4ce4a319 100755
--- a/fetchmailconf
+++ b/fetchmailconf
@@ -414,7 +414,7 @@ defaultports = {"auto":0,
"ETRN":25,
"ODMR":366}
-authlist = ("any", "password", "gssapi", "kerberos", "ssh")
+authlist = ("any", "password", "gssapi", "kerberos", "ssh", "otp")
listboxhelp = {
'title' : 'List Selection Help',
diff --git a/options.c b/options.c
index 188db02c..bd4ebe70 100644
--- a/options.c
+++ b/options.c
@@ -409,6 +409,8 @@ struct query *ctl; /* option record to be initialized */
ctl->server.authenticate = A_SSH;
else if (strcmp(optarg, "otp") == 0)
ctl->server.authenticate = A_OTP;
+ else if (strcmp(optarg, "opie") == 0)
+ ctl->server.authenticate = A_OTP;
else if (strcmp(optarg, "ntlm") == 0)
ctl->server.authenticate = A_NTLM;
else if (strcmp(optarg, "cram") == 0)
@@ -677,7 +679,7 @@ struct query *ctl; /* option record to be initialized */
P(GT_(" -p, --protocol specify retrieval protocol (see man page)\n"));
P(GT_(" -U, --uidl force the use of UIDLs (pop3 only)\n"));
P(GT_(" -P, --port TCP/IP service port to connect to\n"));
- P(GT_(" --auth authentication type (password/kerberos/ssh)\n"));
+ P(GT_(" --auth authentication type (password/kerberos/ssh/otp)\n"));
P(GT_(" -t, --timeout server nonresponse timeout\n"));
P(GT_(" -E, --envelope envelope address header\n"));
P(GT_(" -Q, --qvirtual prefix to remove from local user id\n"));
diff --git a/pop3.c b/pop3.c
index 76d6c437..e9ffbbaa 100644
--- a/pop3.c
+++ b/pop3.c
@@ -318,6 +318,32 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
/* ordinary validation, no one-time password or RPA */
gen_transact(sock, "USER %s", ctl->remotename);
+
+#if OPIE_ENABLE
+ /* see RFC1938: A One-Time Password System */
+ if (challenge = strstr(lastok, "otp-")) {
+ char response[OPIE_RESPONSE_MAX+1];
+ int i;
+
+ i = opiegenerator(challenge, !strcmp(ctl->password, "opie") ? "" : ctl->password, response);
+ if ((i == -2) && !run.poll_interval) {
+ char secret[OPIE_SECRET_MAX+1];
+ fprintf(stderr, GT_("Secret pass phrase: "));
+ if (opiereadpass(secret, sizeof(secret), 0))
+ i = opiegenerator(challenge, secret, response);
+ memset(secret, 0, sizeof(secret));
+ };
+
+ if (i) {
+ ok = PS_ERROR;
+ break;
+ };
+
+ ok = gen_transact(sock, "PASS %s", response);
+ break;
+ }
+#endif /* OPIE_ENABLE */
+
strcpy(shroud, ctl->password);
ok = gen_transact(sock, "PASS %s", ctl->password);
shroud[0] = '\0';
diff --git a/rcfile_l.l b/rcfile_l.l
index 60788b70..bf5379a2 100644
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -92,6 +92,7 @@ kerberos(_v)?4 { SETSTATE(0); yylval.proto = A_KERBEROS_V4; return AUTHTYPE;}
kerberos(_v)?5 { SETSTATE(0); yylval.proto = A_KERBEROS_V5; return AUTHTYPE;}
kerberos { SETSTATE(0); yylval.proto = A_KERBEROS_V4; return AUTHTYPE;}
ssh { SETSTATE(0); yylval.proto = A_SSH; return AUTHTYPE;}
+(otp|opie) { SETSTATE(0); yylval.proto = A_OTP; return AUTHTYPE;}
cram(-md5)? { SETSTATE(0); yylval.proto = A_CRAM_MD5; return AUTHTYPE;}
ntlm { SETSTATE(0); yylval.proto = A_NTLM; return AUTHTYPE;}
<AUTH>password { SETSTATE(0); yylval.proto = A_PASSWORD; return AUTHTYPE;}