diff options
author | petef <petef@FreeBSD.org> | 2002-06-08 13:32:07 +0000 |
---|---|---|
committer | petef <petef@FreeBSD.org> | 2002-06-08 13:32:07 +0000 |
commit | 6901dac068d5f258b13893977565e5da62ede405 (patch) | |
tree | dfba168892153378f25488db75c535ce0a0e246b | |
parent | 724c34e57ecfbb967cd083060e681325f484d164 (diff) | |
download | FreeBSD-ports-6901dac068d5f258b13893977565e5da62ede405.zip FreeBSD-ports-6901dac068d5f258b13893977565e5da62ede405.tar.gz |
Fix a bug where asmail wouldn't correctly parse the imap4 port number
correctly.
PR: 34804
Submitted by: Fuyuhiko Maruyama <fuyuhik8@is.titech.ac.jp>
Approved by: maintainer timeout
-rw-r--r-- | mail/asmail/Makefile | 1 | ||||
-rw-r--r-- | mail/asmail/files/patch-asmail-pop.c | 45 |
2 files changed, 46 insertions, 0 deletions
diff --git a/mail/asmail/Makefile b/mail/asmail/Makefile index 28a910b..8cce777 100644 --- a/mail/asmail/Makefile +++ b/mail/asmail/Makefile @@ -7,6 +7,7 @@ PORTNAME= asmail PORTVERSION= 0.56 +PORTREVISION= 1 CATEGORIES= mail afterstep MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ ftp://gates.enemy.at/pub/ diff --git a/mail/asmail/files/patch-asmail-pop.c b/mail/asmail/files/patch-asmail-pop.c new file mode 100644 index 0000000..15eca82 --- /dev/null +++ b/mail/asmail/files/patch-asmail-pop.c @@ -0,0 +1,45 @@ +$FreeBSD$ + +--- pop.c.orig Thu Apr 13 19:08:02 2000 ++++ pop.c Sat May 5 04:06:47 2001 +@@ -196,7 +196,8 @@ + { + SOCKET *sock; + int sd, i, port = 0, type; +- char server[100], user[100], password[100], mailbox[100]; ++ char server[100], user[100], password[100]; ++ char mailbox[100] = "INBOX"; /* default mailbox */ + char *pnt; + static int InDuty = 0; + +@@ -229,18 +230,19 @@ + return -1; + } + +- /* optional portnumber */ ++ /* optional portnumber and mailbox for IMAP4 */ + pnt += strlen(password) + 1; +- if (sscanf(pnt, "%d", &port) != 1) +- switch (type) { +- case TYPE_POP: port = DEFAULTPORT; break; +- case TYPE_IMAP: port = DEFAULTIMAPPORT; break; +- } +- +- /* optional mailboxname for IMAP */ +- if (type == TYPE_IMAP) +- if (sscanf(pnt, "%100s", &mailbox) != 1) +- strcpy(mailbox, "INBOX"); ++ switch (type) { ++ case TYPE_POP: ++ port = DEFAULTPORT; ++ sscanf(pnt, "%d", &port); ++ break; ++ case TYPE_IMAP: ++ port = DEFAULTIMAPPORT; ++ if (sscanf(pnt, "%d %100s", &port, &mailbox) == 0) ++ sscanf(pnt, "%100s", &mailbox); ++ break; ++ } + + /* Feb. 17 2000: Removed toupper() of mailbox names. + * Some IMAP servers seem to have troubles with case-insensitive |